update action config

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-07-30 20:53:03 -04:00
parent edf4514ba2
commit c46acc7b40
2 changed files with 3 additions and 2 deletions

View file

@ -167,6 +167,7 @@ class WeaviateVectorIOAdapter(
def _get_client(self) -> weaviate.Client:
if self.config.weaviate_cluster_url == "localhost:8080":
log.info("using Weaviate locally in container")
host, port = self.config.weaviate_cluster_url.split(":")
key = "local_test"
client = weaviate.connect_to_local(
@ -174,6 +175,7 @@ class WeaviateVectorIOAdapter(
port=port,
)
else:
log.info("Using Weaviate remote cluster with URL")
key = f"{self.config.weaviate_cluster_url}::{self.config.weaviate_api_key}"
if key in self.client_cache:
return self.client_cache[key]