From fbd0e1104444473ce5941a929c7a0d54b695999a Mon Sep 17 00:00:00 2001 From: zhijianma Date: Fri, 20 Sep 2024 16:34:50 +0800 Subject: [PATCH] Change the role to "user" in format function of ollama chat model (#443) --- src/agentscope/models/ollama_model.py | 2 +- tests/format_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agentscope/models/ollama_model.py b/src/agentscope/models/ollama_model.py index 55cc5083c..0dec98e34 100644 --- a/src/agentscope/models/ollama_model.py +++ b/src/agentscope/models/ollama_model.py @@ -359,7 +359,7 @@ def format( system_content = "\n".join(system_content_template) system_message = { - "role": "system", + "role": "user", "content": system_content, } diff --git a/tests/format_test.py b/tests/format_test.py index 00582d2ff..de0ccb510 100644 --- a/tests/format_test.py +++ b/tests/format_test.py @@ -283,7 +283,7 @@ def test_ollama_chat(self) -> None: # correct format ground_truth = [ { - "role": "system", + "role": "user", "content": ( "You are a helpful assistant\n" "\n"