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
When CohereAPIError happens, error is not propagated to Jupyter AI, langchain is stuck in the loop
Reproduce
Choose Cohere model, use bad API key
Attempt to send a chat message
Note that there is no response from Jupyternaut, note terminal error messages and server getting stuck in a loop
Current conversation:
Human: test
AI:
Retrying langchain.llms.cohere.completion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised CohereAPIError: invalid api token.
Retrying langchain.llms.cohere.completion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised CohereAPIError: invalid api token.
Retrying langchain.llms.cohere.completion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised CohereAPIError: invalid api token.
Expected behavior
Usual behavior: error is propagated to Jupyter AI, caught by ChatHandler, Jupyternaut sends error stack trace to user.
Tried implementing a workaround without success:
handling exception via try-except cohere.CohereAPIError block to CohereProvider._acall()
handling exception via try-except cohere.CohereAPIError in BaseProvider._generate_in_executor() and BaseProvider._call_in_executor()
The text was updated successfully, but these errors were encountered:
Description
When CohereAPIError happens, error is not propagated to Jupyter AI, langchain is stuck in the loop
Reproduce
Expected behavior
Usual behavior: error is propagated to Jupyter AI, caught by ChatHandler, Jupyternaut sends error stack trace to user.
Tried implementing a workaround without success:
try-except cohere.CohereAPIError
block toCohereProvider._acall()
try-except cohere.CohereAPIError
inBaseProvider._generate_in_executor()
andBaseProvider._call_in_executor()
The text was updated successfully, but these errors were encountered: