making docker container identification a litle more flexible

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-07-31 20:25:24 -04:00
parent 7d1cc14629
commit fe3697ade6

View file

@ -166,7 +166,7 @@ class WeaviateVectorIOAdapter(
self.metadata_collection_name = "openai_vector_stores_metadata" self.metadata_collection_name = "openai_vector_stores_metadata"
def _get_client(self) -> weaviate.Client: def _get_client(self) -> weaviate.Client:
if self.config.weaviate_cluster_url == "localhost:8080": if "localhost" in self.config.weaviate_cluster_url:
log.info("using Weaviate locally in container") log.info("using Weaviate locally in container")
host, port = self.config.weaviate_cluster_url.split(":") host, port = self.config.weaviate_cluster_url.split(":")
key = "local_test" key = "local_test"