Skip to content

Commit

Permalink
Change the role to "user" in format function of ollama chat model (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijianma authored Sep 20, 2024
1 parent 7c7220a commit fbd0e11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/agentscope/models/ollama_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def format(
system_content = "\n".join(system_content_template)

system_message = {
"role": "system",
"role": "user",
"content": system_content,
}

Expand Down
2 changes: 1 addition & 1 deletion tests/format_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fbd0e11

Please sign in to comment.