Skip to content

fix agent_oracle close connection error#178

Merged
drbrady8800 merged 1 commit intomainfrom
fix-rag-index-file-close-conn
May 13, 2025
Merged

fix agent_oracle close connection error#178
drbrady8800 merged 1 commit intomainfrom
fix-rag-index-file-close-conn

Conversation

@emmakodes
Copy link
Contributor

@emmakodes emmakodes commented May 6, 2025

When I run python examples/agentic_oracle.py, I get a closed weaviateclient after processing the first file.
weaviate.exceptions.WeaviateClosedClientError: The WeaviateClientis closed. Runclient.connect() to (re)connect!

Right now, I added a client_created flag to track whether we created the client within the function and close if only client is created within the rag_index_file function so that we don't have a closed connection when we are processing more than one files from RAGTool __init__ method. With this pr, agentic_oracle.py runs successfully

@emmakodes emmakodes requested a review from drbrady8800 May 6, 2025 13:36
@drbrady8800 drbrady8800 merged commit 3a136e6 into main May 13, 2025
2 checks passed
@drbrady8800 drbrady8800 deleted the fix-rag-index-file-close-conn branch May 13, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants