Added table for chat history

This commit is contained in:
Saurab-Shrestha 2024-04-03 14:11:08 +05:45
parent 542ed0ef4e
commit 355271be93
11 changed files with 357 additions and 24 deletions

View file

@ -129,9 +129,7 @@ class ChatService:
else None
)
system_prompt = (
chat_engine_input.system_message.content
if chat_engine_input.system_message
else None
"You can only answer questions about the provided context. If you know the answer but it is not based in the provided context, don't provide the answer, just state the answer is not in the context provided."
)
chat_history = (
chat_engine_input.chat_history if chat_engine_input.chat_history else None
@ -165,14 +163,11 @@ class ChatService:
else None
)
system_prompt = (
chat_engine_input.system_message.content
if chat_engine_input.system_message
else None
"You can only answer questions about the provided context. If you know the answer but it is not based in the provided context, don't provide the answer, just state the answer is not in the context provided."
)
chat_history = (
chat_engine_input.chat_history if chat_engine_input.chat_history else None
)
chat_engine = self._chat_engine(
system_prompt=system_prompt,
use_context=use_context,