Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to force the tool output as final output. #201

Closed
harshdy opened this issue Dec 10, 2024 · 2 comments
Closed

How to force the tool output as final output. #201

harshdy opened this issue Dec 10, 2024 · 2 comments

Comments

@harshdy
Copy link

harshdy commented Dec 10, 2024

My tool is fetching the details from the web and formatting it to Json. I want my tool object as final output from the agent, I was wondering is there any method do this.

@samuelcolvin
Copy link
Member

If you just want a tool which finishes the run, use the result_type, see https://ai.pydantic.dev/results/.

If you want to end a run within or after a function tool, see #142

@samuelcolvin
Copy link
Member

Closing for now as I think that answer your question, but happy to answer more questions, or open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants