From 24a02c195d310c472aee9cef3d35fc91e720748e Mon Sep 17 00:00:00 2001 From: localsoo Date: Mon, 21 Apr 2025 00:30:43 +0000 Subject: [PATCH] Update rag_chain.py --- app/rag_chain.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/rag_chain.py b/app/rag_chain.py index be616a6..ce03842 100644 --- a/app/rag_chain.py +++ b/app/rag_chain.py @@ -8,17 +8,16 @@ from langchain.llms import HuggingFaceHub def build_rag_chain(): # 1. Weaviate 클라이언트 - client = weaviate.Client( - url=os.getenv("WEAVIATE_URL", "http://183.111.96.67:30846"), - auth_client_secret=weaviate.AuthApiKey(os.getenv("WEAVIATE_API_KEY", "01jryrcctd8c8vxbj4bs2ywrgs")), - additional_headers={"X-HuggingFace-Api-Key": os.getenv("OPENAI_API_KEY", "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")} - ) + auth_config = weaviate.AuthApiKey(api_key="01jryrcctd8c8vxbj4bs2ywrgs") + + client = weaviate.Client("http://183.111.96.67:32668", auth_client_secret=auth_config) + # 2. 벡터스토어 vectorstore = Weaviate( client=client, - index_name="LangDocs", + index_name="Test", text_key="text", embedding= HuggingFaceEmbeddings( model_name="sentence-transformers/all-MiniLM-L6-v2"