Update retriever.py
This commit is contained in:
parent
e742dd06b2
commit
284b6971b3
@ -10,18 +10,18 @@ import os
|
|||||||
internal_url = "vector-store-01jse60hep6416b15n1nsj6ch8.cheetah.svc.cluster.local"
|
internal_url = "vector-store-01jse60hep6416b15n1nsj6ch8.cheetah.svc.cluster.local"
|
||||||
external_url = "183.111.96.67"
|
external_url = "183.111.96.67"
|
||||||
# http_host = os.getenv("WEAVIATE_HTTP_HOST", "183.111.96.67")
|
# http_host = os.getenv("WEAVIATE_HTTP_HOST", "183.111.96.67")
|
||||||
http_host = os.getenv("WEAVIATE_HTTP_HOST", internal_url)
|
http_host = os.getenv("WEAVIATE_HTTP_HOST", external_url)
|
||||||
# grpc_host = os.getenv("WEAVIATE_GRPC_HOST", "183.111.96.67")
|
# grpc_host = os.getenv("WEAVIATE_GRPC_HOST", "183.111.96.67")
|
||||||
grpc_host = os.getenv("WEAVIATE_GRPC_HOST", internal_url)
|
grpc_host = os.getenv("WEAVIATE_GRPC_HOST", external_url)
|
||||||
weaviate_api_key = os.getenv("WEAVIATE_API_KEY", "01jse60hwsf37za5kmnkzzcwa9")
|
weaviate_api_key = os.getenv("WEAVIATE_API_KEY", "01jse60hwsf37za5kmnkzzcwa9")
|
||||||
|
|
||||||
def get_retriever():
|
def get_retriever():
|
||||||
client = weaviate.connect_to_custom(
|
client = weaviate.connect_to_custom(
|
||||||
http_host=http_host, # Hostname for the HTTP API connection
|
http_host=http_host, # Hostname for the HTTP API connection
|
||||||
http_port=80, # Default is 80, WCD uses 443
|
http_port=31117, # Default is 80, WCD uses 443
|
||||||
http_secure=False, # Whether to use https (secure) for the HTTP API connection
|
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=grpc_host, # Hostname for the gRPC API connection
|
||||||
grpc_port=50051, # Default is 50051, WCD uses 443
|
grpc_port=31373, # Default is 50051, WCD uses 443
|
||||||
grpc_secure=False, # Whether to use a secure channel for the gRPC API connection
|
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
|
auth_credentials=Auth.api_key(weaviate_api_key), # API key for authentication
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user