Skip to content

Commit

Permalink
Fix: Invalid Message Role
Browse files Browse the repository at this point in the history
  • Loading branch information
amengus87 committed Jun 12, 2024
1 parent d8f3cf3 commit 94c9f37
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ public Optional<ChatMessage> convertToChatMessage(OpenAiCompletionMessage comple
break;
case "system":
chatMessage = new SystemMessage((String) completionMessage.getContent());
break;
case "assistant":
chatMessage = new AiMessage((String) completionMessage.getContent());
break;
default:
throw new IllegalArgumentException("Invalid Message Role: " + completionMessage.getRole());
}
Expand Down

0 comments on commit 94c9f37

Please sign in to comment.