mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-31 16:16:45 +00:00
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
@@ -340,10 +340,12 @@ class GPT4All:
|
||||
generate_kwargs["reset_context"] = reset
|
||||
self.current_chat_session.append({"role": "user", "content": prompt})
|
||||
|
||||
if self._format_chat_prompt_template.__func__ is GPT4All._format_chat_prompt_template:
|
||||
fct_func = self._format_chat_prompt_template.__func__ # type: ignore[attr-defined]
|
||||
if fct_func is GPT4All._format_chat_prompt_template:
|
||||
if reset:
|
||||
# ingest system prompt
|
||||
self.model.prompt_model(self.current_chat_session[0]["content"], "%1",
|
||||
_pyllmodel.empty_response_callback,
|
||||
n_batch=n_batch, n_predict=0, special=True)
|
||||
prompt_template = self._current_prompt_template.format("%1")
|
||||
else:
|
||||
|
Reference in New Issue
Block a user