mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-11-01 14:23:32 +00:00
python: Only eval latest message in chat sessions (#1149)
* python: Only eval latest message in chat sessions * python: version bump
This commit is contained in:
@@ -220,7 +220,7 @@ class GPT4All:
|
||||
|
||||
if self._is_chat_session_activated:
|
||||
self.current_chat_session.append({"role": "user", "content": prompt})
|
||||
generate_kwargs['prompt'] = self._format_chat_prompt_template(messages=self.current_chat_session)
|
||||
generate_kwargs['prompt'] = self._format_chat_prompt_template(messages=self.current_chat_session[-1:])
|
||||
generate_kwargs['reset_context'] = len(self.current_chat_session) == 1
|
||||
else:
|
||||
generate_kwargs['reset_context'] = True
|
||||
|
||||
Reference in New Issue
Block a user