How to return application data from Function? #5529
Unanswered
arielmoraes
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
Have you explored using middleware for this? You can exit the function calling loop early, after your tool runs. If your tool returns the function in the specified "structured representation", you'll have access to that data, and avoid the last hop to the model where it puts a "natural language spin" on the original query (using the tool call results). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to return some application data from some function output. For example, I queried something from my database and I want to return a structured representation of that object, without passing or serializing it to the model.
I tried a few things:
In other words, how can I inject some data and access it from the caller (where the RunStreamingAsync was called)?
EDIT: after a debug session, I found out that the AdditionalProperties can be accessed in the Result property of a FunctionResultContent.
EDIT: Another question, how to return data from the TextSearchProvider?
Beta Was this translation helpful? Give feedback.
All reactions