-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: improve decorated tool output #499
Conversation
Signed-off-by: MICHAEL DESMOND <mdesmond@us.ibm.com>
e59bbd1
to
6db6d04
Compare
Signed-off-by: MICHAEL DESMOND <mdesmond@us.ibm.com>
Signed-off-by: MICHAEL DESMOND <mdesmond@us.ibm.com>
else: | ||
return tool_function(**tool_input_dict) | ||
return StringToolOutput(result=str(result)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this also check if result is dict then use JSONToolOutput else default to StringToolOutput?
@@ -46,7 +46,7 @@ class OpenMeteoToolInput(BaseModel): | |||
) | |||
|
|||
|
|||
class OpenMeteoTool(Tool[OpenMeteoToolInput, ToolRunOptions]): | |||
class OpenMeteoTool(Tool[OpenMeteoToolInput, ToolRunOptions, StringToolOutput]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that we have JSONToolOutput isnt the output from OpenMeteo more accurately a JSONToolOutput instead of StringToolOutput?
Signed-off-by: MICHAEL DESMOND <mdesmond@us.ibm.com>
Checklist
yarn lint
oryarn lint:fix
yarn format
oryarn format:fix
yarn test:unit
yarn test:e2e