Skip to content

Commit

Permalink
fix: missing role in api response
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Apr 22, 2024
1 parent b468e25 commit 4b10b9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
public class ChatMessage {

public String content;
public String role;

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static ChatResponse fromMessage(String message) {
choice.index = 0;
choice.message = new ai.azure.openai.rag.workshop.backend.rest.ChatMessage();
choice.message.content = message;
choice.message.role = "assistant";
chatResponse.choices.add(choice);
return chatResponse;
}
Expand Down

0 comments on commit 4b10b9f

Please sign in to comment.