Update app.py
Browse files
app.py
CHANGED
@@ -369,9 +369,9 @@ llm = HuggingFaceEndpoint(
|
|
369 |
task="text-generation",
|
370 |
timeout=10
|
371 |
)
|
372 |
-
from langchain_community.chat_message_histories import ChatMessageHistory
|
373 |
|
374 |
-
|
|
|
375 |
|
376 |
agent_tools = [ipc_tool, crpc_tool, doj_tool, faq_tool]
|
377 |
|
@@ -408,7 +408,7 @@ def chatbot_response(history,query):
|
|
408 |
message = HumanMessage(content=[{"type": "text", "text": query}])
|
409 |
|
410 |
# Invoke the model with the multimodal message
|
411 |
-
result = agent.invoke([message],handle_parsing_errors=True)
|
412 |
response = result['output']
|
413 |
intermediate_steps = result.get('intermediate_steps', [])
|
414 |
|
|
|
369 |
task="text-generation",
|
370 |
timeout=10
|
371 |
)
|
|
|
372 |
|
373 |
+
|
374 |
+
llm_chain = LLMChain(prompt=prompt, llm=llm)
|
375 |
|
376 |
agent_tools = [ipc_tool, crpc_tool, doj_tool, faq_tool]
|
377 |
|
|
|
408 |
message = HumanMessage(content=[{"type": "text", "text": query}])
|
409 |
|
410 |
# Invoke the model with the multimodal message
|
411 |
+
result = agent.invoke([history,message],handle_parsing_errors=True)
|
412 |
response = result['output']
|
413 |
intermediate_steps = result.get('intermediate_steps', [])
|
414 |
|