You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a tool that returns both text content and structured content, so I'm using ToolResult.
Using -> ToolResult as my return type annotation causes the outputSchema to disappear, fair enough.
Using the type of my structured_content as the return type annotation makes the outputSchema come back, although this seems wrong because I'm actually returning a ToolResult, and I can't see why my linter's not complaining (it may be misconfigured?)
Is there a better way? I tried -> ToolResult[ActualStructuredContentType] but it doesn't seem to be genericizable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a tool that returns both text content and structured content, so I'm using ToolResult.
-> ToolResultas my return type annotation causes theoutputSchemato disappear, fair enough.structured_contentas the return type annotation makes theoutputSchemacome back, although this seems wrong because I'm actually returning aToolResult, and I can't see why my linter's not complaining (it may be misconfigured?)Is there a better way? I tried
-> ToolResult[ActualStructuredContentType]but it doesn't seem to be genericizable.Beta Was this translation helpful? Give feedback.
All reactions