-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: add tool error logging #1804
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
base: main
Are you sure you want to change the base?
Conversation
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.
Can we just log them directly? You can use the existing log data flag to either just log "tool failed" or f"tool failed {input} {error}"
ad42545
to
b2cc08a
Compare
Done. However, I’m now uncertain about the purpose of this flag. The reason of PR is that I couldn’t detect tool failures in production, not just in debug mode. I assumed that not everyone wanted to log tool errors, which is why I included the flag that, by default, maintains the current behavior but allows enabling error logs. Now, by default, we log everything, and in debug mode, we can hide some data which is useless imho. @rm-openai please take a look at this. |
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.
@rm-openai is this the change you suggested?
Currently there is no way to log errors other than providing failure_error_function in each function_tool decorator use. Current PR provides env variable OPENAI_AGENTS_LOG_TOOL_ERRORS that enables such logs.