Skip to content

Commit 94c8afd

Browse files
Fixed system message and custom chat history
1 parent 7e4a6da commit 94c8afd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "llama-cpp-agent"
7-
version = "0.2.9"
7+
version = "0.2.10"
88
description = "A framework for building LLM based AI agents with llama.cpp."
99

1010
readme = "ReadMe.md"

src/llama_cpp_agent/llm_agent.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,9 @@ def get_response_role_and_completion(
382382
):
383383
if len(chat_history.get_chat_messages()) == 0:
384384
if system_prompt:
385-
chat_history.add_message({"role": "system", "content": system_prompt})
385+
chat_history.add_message({"role": Roles.system, "content": system_prompt})
386386
else:
387-
chat_history.add_message({"role": "system", "content": self.system_prompt})
387+
chat_history.add_message({"role": Roles.system, "content": self.system_prompt})
388388

389389
if message is not None and add_message_to_chat_history:
390390
chat_history.add_message(

0 commit comments

Comments
 (0)