I’m working on the OpenAI assistant API, more specifically, I’m interested in the function call part.
What I’d like to know is whether it’s possible to pass a list or even a vector as the expected output in a function call?
Example:
Suppose I have an assistant that searches for products in my database, but if the function it called returns more than one product and I want all of these returned products to be formatted in a message and displayed to the user, how could I do this?
1 Like
You loop over those records, concatenate a response (in a format of your choosing though natural language or JSON probably best) and send that back to the LLM as an answer.
The vector representations are used as a means to find the records, and are not generally sent back to the LLM as they are meaningless to humans and not useful tokens.
1 Like
I see.
And I imagined doing something similar, but I wanted to know if there was a different way and maybe even easier to do it.
Thank you for your answer, I will leave the post open for a while longer before confirming your answer as the solution.