Update retriever.py

This commit is contained in:
groupuser 2025-04-23 08:58:58 +00:00
parent 59afa7be8c
commit 81ab4ff5d1

@ -9,6 +9,7 @@ import os
internal_url = "vector-store-01jse60hep6416b15n1nsj6ch8.cheetah.svc.cluster.local"
external_url = "183.111.96.67"
weaviate_host = os.getenv("WEAVIATE_HOST", external_url)
# http_host = os.getenv("WEAVIATE_HTTP_HOST", "183.111.96.67")
http_host = os.getenv("WEAVIATE_HTTP_HOST", external_url)# grpc_host = os.getenv("WEAVIATE_GRPC_HOST", "183.111.96.67")
http_port = os.getenv("WEAVIATE_HTTP_PORT", 8000)
@ -19,10 +20,10 @@ weaviate_api_key = os.getenv("WEAVIATE_API_KEY", "01jse60hwsf37za5kmnkzzcwa9")
def get_retriever():
client = weaviate.connect_to_custom(
http_host=http_host, # Hostname for the HTTP API connection
http_host=weaviate_host, # Hostname for the HTTP API connection
http_port=http_port, # Default is 80, WCD uses 443
http_secure=False, # Whether to use https (secure) for the HTTP API connection
grpc_host=grpc_host, # Hostname for the gRPC API connection
grpc_host=weaviate_host, # Hostname for the gRPC API connection
grpc_port=grpc_port, # Default is 50051, WCD uses 443
grpc_secure=False, # Whether to use a secure channel for the gRPC API connection
auth_credentials=Auth.api_key(weaviate_api_key), # API key for authentication