refactor: use &str for generate_photo_description image parameter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -483,11 +483,11 @@ Analyze the image and use specific details from both the visual content and the
|
|||||||
/// Generate a brief visual description of a photo for use in RAG query enrichment.
|
/// Generate a brief visual description of a photo for use in RAG query enrichment.
|
||||||
/// Returns 1-2 sentences describing people, location, and activity visible in the image.
|
/// Returns 1-2 sentences describing people, location, and activity visible in the image.
|
||||||
/// Only called when the model has vision capabilities.
|
/// Only called when the model has vision capabilities.
|
||||||
pub async fn generate_photo_description(&self, image_base64: String) -> Result<String> {
|
pub async fn generate_photo_description(&self, image_base64: &str) -> Result<String> {
|
||||||
let prompt = "Briefly describe what you see in this image in 1-2 sentences. \
|
let prompt = "Briefly describe what you see in this image in 1-2 sentences. \
|
||||||
Focus on the people, location, and activity.";
|
Focus on the people, location, and activity.";
|
||||||
let system = "You are a scene description assistant. Be concise and factual.";
|
let system = "You are a scene description assistant. Be concise and factual.";
|
||||||
let images = vec![image_base64];
|
let images = vec![image_base64.to_string()];
|
||||||
|
|
||||||
let description = self
|
let description = self
|
||||||
.generate_with_images(prompt, Some(system), Some(images))
|
.generate_with_images(prompt, Some(system), Some(images))
|
||||||
|
|||||||
Reference in New Issue
Block a user