Update rag_chain.py
This commit is contained in:
parent
d437d8c39e
commit
98d8f399af
@ -14,12 +14,15 @@ def build_rag_chain():
|
|||||||
additional_headers={"X-HuggingFace-Api-Key": os.getenv("OPENAI_API_KEY", "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")}
|
additional_headers={"X-HuggingFace-Api-Key": os.getenv("OPENAI_API_KEY", "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")}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# 2. 벡터스토어
|
# 2. 벡터스토어
|
||||||
vectorstore = Weaviate(
|
vectorstore = Weaviate(
|
||||||
client=client,
|
client=client,
|
||||||
index_name="LangDocs",
|
index_name="LangDocs",
|
||||||
text_key="text",
|
text_key="text",
|
||||||
embedding=HuggingFaceEmbeddings() # HuggingFaceEmbeddings() 로 교체 가능
|
embedding= HuggingFaceEmbeddings(
|
||||||
|
model_name="sentence-transformers/all-MiniLM-L6-v2"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# 3. HuggingFace LLM (예: mistralai/Mistral-7B-Instruct-v0.2)
|
# 3. HuggingFace LLM (예: mistralai/Mistral-7B-Instruct-v0.2)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user