Skip to content

Commit

Permalink
bug: Fix AddSystemMessage (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspermarstal authored Sep 19, 2024
1 parent 0103142 commit a33979b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cellm/AddIn/Prompts/PromptBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ public PromptBuilder SetTemperature(double temperature)

public PromptBuilder AddSystemMessage()
{
if (!string.IsNullOrEmpty(_systemMessage))
if (string.IsNullOrEmpty(_systemMessage))
{
throw new CellmException("Cannot add empty system message");
}

_messages.Prepend(new Message(_systemMessage!, Role.System));
_messages.Add(new Message(_systemMessage!, Role.System));
return this;
}

Expand Down

0 comments on commit a33979b

Please sign in to comment.