mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 07:14:20 +00:00
connection to container debugged
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
e13a2a64fe
commit
bc461567f6
1 changed files with 16 additions and 8 deletions
|
@ -139,10 +139,18 @@ class WeaviateVectorIOAdapter(
|
|||
self.metadata_collection_name = "openai_vector_stores_metadata"
|
||||
|
||||
def _get_client(self) -> weaviate.Client:
|
||||
# if self.config.test_environment:
|
||||
if True:
|
||||
key = "local::test"
|
||||
client = weaviate.connect_to_local(
|
||||
host="localhost",
|
||||
port="8080",
|
||||
)
|
||||
else:
|
||||
key = f"{self.config.weaviate_cluster_url}::{self.config.weaviate_api_key}"
|
||||
if key in self.client_cache:
|
||||
return self.client_cache[key]
|
||||
|
||||
print(f"connecting with {self.config.weaviate_cluster_url} and key {self.config.weaviate_api_key}")
|
||||
client = weaviate.connect_to_weaviate_cloud(
|
||||
cluster_url=self.config.weaviate_cluster_url,
|
||||
auth_credentials=Auth.api_key(self.config.weaviate_api_key),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue