mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-19 12:14:20 +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:
parent
ee73f1ab1d
commit
ed470e18b3
@ -220,7 +220,7 @@ class GPT4All:
|
|||||||
|
|
||||||
if self._is_chat_session_activated:
|
if self._is_chat_session_activated:
|
||||||
self.current_chat_session.append({"role": "user", "content": prompt})
|
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
|
generate_kwargs['reset_context'] = len(self.current_chat_session) == 1
|
||||||
else:
|
else:
|
||||||
generate_kwargs['reset_context'] = True
|
generate_kwargs['reset_context'] = True
|
||||||
|
@ -61,7 +61,7 @@ copy_prebuilt_C_lib(SRC_CLIB_DIRECtORY,
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name=package_name,
|
name=package_name,
|
||||||
version="1.0.2",
|
version="1.0.3",
|
||||||
description="Python bindings for GPT4All",
|
description="Python bindings for GPT4All",
|
||||||
author="Richard Guo",
|
author="Richard Guo",
|
||||||
author_email="richard@nomic.ai",
|
author_email="richard@nomic.ai",
|
||||||
|
Loading…
Reference in New Issue
Block a user