Refactor Weaviate config to include cluster URL in memory adapter

This commit is contained in:
Zain Hasan 2024-09-23 21:13:24 -04:00
parent 2fc9bd95a6
commit ba8044d243
3 changed files with 11 additions and 8 deletions

View file

@ -44,7 +44,8 @@ class MemoryClient(Memory):
},
headers={
"Content-Type": "application/json",
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234"}),
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234",
"weaviate_cluster_url": "http://localhost:8080"}),
},
timeout=20,
)
@ -70,7 +71,8 @@ class MemoryClient(Memory):
},
headers={
"Content-Type": "application/json",
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234"}),
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234",
"weaviate_cluster_url": "http://localhost:8080"}),
},
timeout=20,
)
@ -94,7 +96,8 @@ class MemoryClient(Memory):
},
headers={
"Content-Type": "application/json",
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234"}),
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234",
"weaviate_cluster_url": "http://localhost:8080"}),
},
timeout=20,
)
@ -116,7 +119,8 @@ class MemoryClient(Memory):
},
headers={
"Content-Type": "application/json",
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234"}),
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234",
"weaviate_cluster_url": "http://localhost:8080"}),
},
timeout=20,
)