Skip to content

Commit

Permalink
mistral: respect ChatMessageTypeTool
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc committed Mar 26, 2024
1 parent 87b90eb commit 5e9b694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llms/mistral/mistralmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func setMistralChatMessageRole(msg *llms.MessageContent, chatMsg *sdk.ChatMessag
chatMsg.Role = "assistant"
case schema.ChatMessageTypeGeneric, schema.ChatMessageTypeHuman:
chatMsg.Role = "user"
case schema.ChatMessageTypeFunction:
case schema.ChatMessageTypeFunction, schema.ChatMessageTypeTool:
chatMsg.Role = "tool"
case schema.ChatMessageTypeSystem:
chatMsg.Role = "system"
Expand Down

0 comments on commit 5e9b694

Please sign in to comment.