From 0d807ab4b67aa9341880c32801463a3d71e3ab17 Mon Sep 17 00:00:00 2001 From: localsoo Date: Mon, 21 Apr 2025 02:05:54 +0000 Subject: [PATCH] Update rag_chain.py --- app/rag_chain.py | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/app/rag_chain.py b/app/rag_chain.py index 3ae09db..9164e5a 100644 --- a/app/rag_chain.py +++ b/app/rag_chain.py @@ -38,18 +38,28 @@ def build_rag_chain(): # ) # ) - connection_params = { - "http": { - "host": "183.111.96.67", - "port": 32668, - "secure": False - }, - "grpc": { - "host": "183.111.96.67", - "port": 32619, - "secure": False - }, - "auth_credentials": auth_config + # connection_params = { + # "http": { + # "host": "183.111.96.67", + # "port": 32668, + # "secure": False + # }, + # "grpc": { + # "host": "183.111.96.67", + # "port": 32619, + # "secure": False + # }, + # "auth_credentials": auth_config + # } + http_config = { + "host": "183.111.96.67", + "port": 32668, + "secure": False + } + grpc_config = { + "host": "183.111.96.67", + "port": 32619, + "secure": False } # connection_params = ConnectionParams( @@ -64,6 +74,12 @@ def build_rag_chain(): # auth_credentials=auth_config # ) + connection_params = ConnectionParams( + http=http_config, + grpc=grpc_config, + auth_credentials=auth + ) + client = WeaviateClient(connection_params=connection_params) # client = weaviate.connect_to_custom(