Commit b9362b30 authored by John Wang's avatar John Wang

Merge branch 'feat/universal-chat' into deploy/dev

parents fb5841c3 ce879f6d
...@@ -60,7 +60,7 @@ def universal_chat_app_required(view=None): ...@@ -60,7 +60,7 @@ def universal_chat_app_required(view=None):
} }
}), }),
user_input_form=json.dumps([]), user_input_form=json.dumps([]),
pre_prompt=None, pre_prompt='',
agent_mode=json.dumps({"enabled": True, "strategy": "function_call", "tools": []}), agent_mode=json.dumps({"enabled": True, "strategy": "function_call", "tools": []}),
) )
......
...@@ -257,8 +257,8 @@ And answer according to the language of the user's question. ...@@ -257,8 +257,8 @@ And answer according to the language of the user's question.
histories = cls.get_history_messages_from_memory(memory, rest_tokens) histories = cls.get_history_messages_from_memory(memory, rest_tokens)
human_message_prompt += "\n\n" if human_message_prompt else "" human_message_prompt += "\n\n" if human_message_prompt else ""
human_message_prompt += "Here is the chat histories between human and assistant, " \ human_message_prompt += "Here is the chat histories between human and assistant, " \
"inside <histories></histories> XML tags.\n\n<histories>" "inside <histories></histories> XML tags.\n\n<histories>\n"
human_message_prompt += histories + "</histories>" human_message_prompt += histories + "\n</histories>"
human_message_prompt += query_prompt human_message_prompt += query_prompt
...@@ -270,7 +270,7 @@ And answer according to the language of the user's question. ...@@ -270,7 +270,7 @@ And answer according to the language of the user's question.
messages.append(human_message) messages.append(human_message)
return messages, ['\nHuman:'] return messages, ['\nHuman:', '</histories>']
@classmethod @classmethod
def get_llm_callbacks(cls, llm: BaseLanguageModel, def get_llm_callbacks(cls, llm: BaseLanguageModel,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment