Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mjfelis committed Nov 9, 2024
1 parent 2fd890d commit 9b87090
Showing 1 changed file with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,26 @@ public List<OllamaChatMessage> getMessagesFromHistory(UUID connectionId) {
OllamaChatMessage m = new OllamaChatMessage();
OllamaChatMessageRole role;
try {
role = OllamaChatMessageRole.getRole(h.getRole().toString());

/*switch (h.getRole()) {
case ASSISTANT: {
}
case USER: {
}
case TOOL: {
}
default:
case SYSTEM: {
}
}*/

role = OllamaChatMessageRole.getRole(h.getRole().toString().toLowerCase());
} catch (RoleNotFoundException e) {
role = OllamaChatMessageRole.SYSTEM;
}
Expand Down

0 comments on commit 9b87090

Please sign in to comment.