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
Hi, I'd like to propose a small change to how we handle tool call errors.
Currently if a tool callback raises or returns an {:error, message}, the tool message result is marked with is_error: true and the retry mechanism kicks in. If the error cannot be resolved, we soon reach the Exceeded max failure count error. At that point no tool call response is seems to be appended to the chain. If we try to add more messages ourselves (e.g. when the user writes again), we then see:
[error]Error during chat call. Reason: "An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'.
The following tool_call_ids did not have response messages: call_r4igz6MU7ca0eIRWxUcgAM4S"
[error] Error running LLMChain: "An assistant message with 'tool_calls' must be followed by tool messages
responding to each 'tool_call_id'.
The following tool_call_ids did not have response messages: call_r4igz6MU7ca0eIRWxUcgAM4S"
I'm not sure if this is intended behavior. Also, I'm not sure what would be the best way to recover from this state, but all ideas I came up with sound overly complicated.
Instead, if I do not allow the callbacks to crash and purely return a string explaining that there was an error and the we should retry calling, then the model is able to manage things for us. It decides to retry a few times on its own and communicates with the user through the whole process, after x times it gives up.
Proposal:
I would like to have the best of both words:
keep the ability to use error tuples and the automatic retries (we do not need to tell users about every little retry).
append an error response to the chain so that the llm or the user can decide what to do, instead of "blocking" the chain.
In any case, I'd be available to work on this, no matter what the solution should be.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi, I'd like to propose a small change to how we handle tool call errors.
Currently if a tool callback raises or returns an
{:error, message}
, the tool message result is marked withis_error: true
and the retry mechanism kicks in. If the error cannot be resolved, we soon reach theExceeded max failure count
error. At that point no tool call response is seems to be appended to the chain. If we try to add more messages ourselves (e.g. when the user writes again), we then see:I'm not sure if this is intended behavior. Also, I'm not sure what would be the best way to recover from this state, but all ideas I came up with sound overly complicated.
Instead, if I do not allow the callbacks to crash and purely return a string explaining that there was an error and the we should retry calling, then the model is able to manage things for us. It decides to retry a few times on its own and communicates with the user through the whole process, after x times it gives up.
Proposal:
I would like to have the best of both words:
In any case, I'd be available to work on this, no matter what the solution should be.
Thanks!
The text was updated successfully, but these errors were encountered: