Spaces:
Sleeping
Sleeping
Update chatbot/core.py
Browse files- chatbot/core.py +4 -1
chatbot/core.py
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
-
from
|
2 |
from chatbot.llm import gemini_llm
|
3 |
from chatbot.memory import memory
|
4 |
from chatbot.prompts import chat_prompt
|
5 |
from langchain.chains import ConversationalRetrievalChain
|
6 |
|
|
|
|
|
|
|
7 |
qa_chain = ConversationalRetrievalChain.from_llm(
|
8 |
llm=gemini_llm,
|
9 |
retriever=get_retriever, # Dynamic Wikipedia search
|
|
|
1 |
+
from langchain.retrievers import WikipediaRetriever
|
2 |
from chatbot.llm import gemini_llm
|
3 |
from chatbot.memory import memory
|
4 |
from chatbot.prompts import chat_prompt
|
5 |
from langchain.chains import ConversationalRetrievalChain
|
6 |
|
7 |
+
# Create the retriever
|
8 |
+
retriever = WikipediaRetriever()
|
9 |
+
|
10 |
qa_chain = ConversationalRetrievalChain.from_llm(
|
11 |
llm=gemini_llm,
|
12 |
retriever=get_retriever, # Dynamic Wikipedia search
|