File tree Expand file tree Collapse file tree
agentstack/tools/weaviate Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,9 +22,10 @@ def search_collection(
2222 Returns:
2323 str: JSON string containing search results
2424 """
25- url = os .environ .get ("WEAVIATE_TOOL_URL" )
26- api_key = os .environ .get ("WEAVIATE_TOOL_API_KEY" )
27- openai_key = os .environ .get ("WEAVIATE_TOOL_OPENAI_API_KEY" )
25+ url = os .environ .get ("WEAVIATE_URL" )
26+ api_key = os .environ .get ("WEAVIATE_API_KEY" )
27+ openai_key = os .environ .get ("WEAVIATE_OPENAI_API_KEY" ) or \
28+ os .environ .get ("OPENAI_API_KEY" )
2829
2930 if not url or not api_key or not openai_key :
3031 raise ValueError ("Missing required environment variables" )
@@ -69,9 +70,10 @@ def create_collection(
6970 Returns:
7071 str: Success message
7172 """
72- url = os .environ .get ("WEAVIATE_TOOL_URL" )
73- api_key = os .environ .get ("WEAVIATE_TOOL_API_KEY" )
74- openai_key = os .environ .get ("WEAVIATE_TOOL_OPENAI_API_KEY" )
73+ url = os .environ .get ("WEAVIATE_URL" )
74+ api_key = os .environ .get ("WEAVIATE_API_KEY" )
75+ openai_key = os .environ .get ("WEAVIATE_OPENAI_API_KEY" ) or \
76+ os .environ .get ("OPENAI_API_KEY" )
7577
7678 if not url or not api_key or not openai_key :
7779 raise ValueError ("Missing required environment variables" )
Original file line number Diff line number Diff line change 33 "url" : " https://github.com/weaviate/weaviate-python-client" ,
44 "category" : " vector-store" ,
55 "env" : {
6- "WEAVIATE_TOOL_URL " : null ,
7- "WEAVIATE_TOOL_API_KEY " : null ,
8- "WEAVIATE_TOOL_OPENAI_API_KEY " : null
6+ "WEAVIATE_URL " : null ,
7+ "WEAVIATE_API_KEY " : null ,
8+ "WEAVIATE_OPENAI_API_KEY " : null
99 },
1010 "dependencies" : [
1111 " weaviate-client>=3.0.0" ,
You can’t perform that action at this time.
0 commit comments