Using image with agents
I'm trying to allow my agent to use an image URL I send him and call a tool to describe the image(s).
The problem is that by providing it in my content such as :
{type: "image", [...]} my agent can't retrieve the URL anymore. So in the following calls, it can't perform actions on my image.
I found a solution for it to work but it's to add an other message in my content with the image url (but it's ugly AND, how am I supposed to hide it from the user ?).
That way my agent will have the url for further tool called.
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Ok I added it to the context when generating the text, instead of in the save message, is this the right way, how will I be able to re-use it later.. It's only available for the current call 🤔 ?
Edit: Mhh it's not available. Pretty obvious ahahShould I save the url as a system prompt instead ? What's the good practice to save hidden data for the LLM to use, in the chat ? Maybe I should add it as a system prompt instead ? It's now persistent and my agent correctly retrieve the image url, but... now it's visible in the should (ofc I can filter it out), and I don't think it's the correct way to add persistent context anyway 🤔