-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Handling of tool errors (e.g. Database) #432
Comments
Would just making sure any error message is put on the Thread help? I don't see it anywhere above except the log message. Python langchain has elaborate configuration for 'Handling Tool Errors,' but is that unnecessary complexity? |
This looks better:
Return error below in database.rb. Maybe in other tools too? #
# Evaluates a sql expression
#
# @param input [String] sql expression
# @return [Array] results
#
def execute(input:)
Langchain.logger.info("Executing \"#{input}\"", for: self.class)
db[input].to_a
rescue Sequel::DatabaseError => e
Langchain.logger.error(e.message, for: self.class)
e.message ###### ADDED THIS #######
end |
This was referenced Apr 24, 2024
Fixed by #743 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example below shows where a Tool raises an error, but the Assistant doesn't recognize it and happily gives wrong answer. Maybe the Assistant can at least acknowledge that an error happened, and in the specific case below if the Assistant gets access to a 'schema' function/tool, it should work better.
The text was updated successfully, but these errors were encountered: