Find answers from the community

Updated 8 months ago

Has anyone had trouble with Anthropic

At a glance

A community member is experiencing an error when using Anthropic models and ChatMode Context, specifically an "Encountered exception writing response to history" error. The community members discuss the issue, with one suggesting the community member is using FastAPI and asking about the version of llama-index being used. The community member confirms they are using FastAPI via Chainlit, and provides the versions of llama-index and llama-index-llms-anthropic they are using. Another community member suggests that using llama-index-core==0.10.45 may fix the issue, and the original community member says they will try that.

Has anyone had trouble with Anthropic models and ChatMode Context? I get this error when the astream_chat tries to run awrite_response_to_history:

Plain Text
Encountered exception writing response to history: <asyncio.locks.Event object at 0x7f606d050690 [unset]> is bound to a different event loop


/llama_index/core/chat_engine/types.py -> StreamingAgentChatResponse.awrite_response_to_history()
L
H
4 comments
are you using fastapi? What version of llama-index? Could have sworn we solved this
Yeah, my app is running through FastAPI via Chainlit.

These are the dependencies that probably matter
Plain Text
llama-index = "^0.10.33"
llama-index-llms-anthropic = "^0.1.5"
Hmm, I'm not sure which versions poetry is installing from that, but I feel like llama-index-core==0.10.45 would have this fixed
I'll try that out. Thanks!
Add a reply
Sign up and join the conversation on Discord