Clear chat history between chat sessions (#1116)

This commit is contained in:
Andriy Mulyar 2023-06-30 20:50:38 -04:00 committed by GitHub
parent 4a24b586df
commit 19412cfa5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -237,13 +237,13 @@ class GPT4All:
'''
# Code to acquire resource, e.g.:
self._is_chat_session_activated = True
self._current_chat_session = []
self.current_chat_session = []
try:
yield self
finally:
# Code to release resource, e.g.:
self._is_chat_session_activated = False
self._current_chat_session = []
self.current_chat_session = []
def _format_chat_prompt_template(
self, messages: List[Dict], default_prompt_header=True, default_prompt_footer=True

View File

@ -61,7 +61,7 @@ copy_prebuilt_C_lib(SRC_CLIB_DIRECtORY,
setup(
name=package_name,
version="1.0.0",
version="1.0.1",
description="Python bindings for GPT4All",
author="Richard Guo",
author_email="richard@nomic.ai",