Find answers from the community

Updated 2 years ago

My `FnRetrieverOpenAIAgent from

At a glance

The community member is experiencing an error with their FnRetrieverOpenAIAgent.from_retriever() function, which was previously working but now throws an exception: "There is no current event loop in thread 'Thread-1'". They have tried upgrading the llama-index package to version 0.8.4, but the issue persists. The community members discuss potential causes, such as the code changes in the newer version, and suggest trying older versions. However, the issue seems to be related to the tool's behavior rather than the package version. The community members are unable to identify a clear solution and suggest reproducing the issue locally to debug further.

Useful resources
My FnRetrieverOpenAIAgent.from_retriever(obj_index.as_retriever(), verbose=True, chat_history=self.chat_history, system_prompt=self.system_prompt )
was working until recently, now I'm getting the following error:
DEBUG:llama_index.indices.utils:> Top 1 nodes:
[Node 2339e84f-5d1e-4b56-9f7e-ad3d8a555f7b] [Similarity score: 0.680813] Tool name: get_location_information
Tool description: get_location_information(address: str, cate...
An exception occurred: There is no current event loop in thread 'Thread-1'.

Any ideas what could have went wrong during update ? Thanks a lot
L
c
11 comments
what llama-index version do you have?
I have 0.8.3 installed
hmm can you try 0.8.4?
From 0.7.24.post1 I get the error:
I tried 0.8.4 but still got the error so I started downgrading until last working package, I should update more frequently 🫠
That error isn't possible in 0.8.4, that specific line of code has changed πŸ‘€
The traceback still has the old version of code?
I restore the virtual environment, now the exception is no longer showed up during start up.
The exception occurs after "Tool description"
DEBUG:llama_index.indices.utils:> Top 2 nodes: > [Node 3bd65261-cbc8-4f76-b973-df35165d2bed] [Similarity score: 0.70184] Tool name: get_weather_details Tool description: get_weather_details(address: str) -> dict F... > [Node d04bb907-f2a8-41a3-a871-3567ca7565d7] [Similarity score: 0.68918] Tool name: get_location_information Tool description: get_location_information(address: str, cate... An exception occurred: There is no current event loop in thread 'Thread-1'. 2023-08-18 12:29:06.831747 : Sorry, there was an error with the system: There is no current event loop in thread 'Thread-1'.
It should go like:
... Tool description: get_location_information(address: str, cate... DEBUG:openai:message='Request to OpenAI API' method=post path=https://api.openai.com/v1/chat/completions

Why would it not Request to OpenAI API?
well, it's not requesting because something about the tool is barfing, I still see that event loop issue πŸ€” I'll have to reproduce this locally to debug properly
Add a reply
Sign up and join the conversation on Discord