fix: add json struct tags to Message for API serialization
Message is used as a type alias by go-ml. Without json tags, HTTP backends that serialize messages to JSON (e.g. OpenAI API) would produce incorrect field names. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
c61ec9f5c7
commit
15ee86ec62
1 changed files with 2 additions and 2 deletions
|
|
@ -79,8 +79,8 @@ type Token struct {
|
|||
|
||||
// Message represents a chat message for multi-turn conversation.
|
||||
type Message struct {
|
||||
Role string // "system", "user", "assistant"
|
||||
Content string
|
||||
Role string `json:"role"` // "system", "user", "assistant"
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
// ClassifyResult holds the output for a single prompt in a batch classification.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue