Update RAG.py
Browse files
RAG.py
CHANGED
|
@@ -204,7 +204,7 @@ You are designed to provide reliable, accurate, and engaging assistance.
|
|
| 204 |
# Chat function
|
| 205 |
#===========================================
|
| 206 |
|
| 207 |
-
|
| 208 |
query = state['query']
|
| 209 |
context = state['context']
|
| 210 |
metadata = state['metadata']
|
|
@@ -240,7 +240,7 @@ Web Context (Real-time Search):
|
|
| 240 |
Final Answer:
|
| 241 |
"""
|
| 242 |
|
| 243 |
-
selected_llm =
|
| 244 |
messages = [SYSTEM_PROMPT] + history + [HumanMessage(content=prompt)]
|
| 245 |
response = selected_llm.invoke(messages)
|
| 246 |
return {
|
|
|
|
| 204 |
# Chat function
|
| 205 |
#===========================================
|
| 206 |
|
| 207 |
+
def chat(state:Ragbot_State):
|
| 208 |
query = state['query']
|
| 209 |
context = state['context']
|
| 210 |
metadata = state['metadata']
|
|
|
|
| 240 |
Final Answer:
|
| 241 |
"""
|
| 242 |
|
| 243 |
+
selected_llm = get_llm(model_name)
|
| 244 |
messages = [SYSTEM_PROMPT] + history + [HumanMessage(content=prompt)]
|
| 245 |
response = selected_llm.invoke(messages)
|
| 246 |
return {
|