mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 20:12:55 +01:00
Added table for chat history
This commit is contained in:
parent
542ed0ef4e
commit
355271be93
11 changed files with 357 additions and 24 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue