Skip to content

Commit

Permalink
Support Attachments in MessageRequest (sashabaranov#890)
Browse files Browse the repository at this point in the history
* add attachments in MessageRequest

* Move tools const to message

* remove const, just use assistanttool const
  • Loading branch information
kodernubie authored Nov 8, 2024
1 parent f5e6e0e commit 6d066bb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ type ImageFile struct {
}

type MessageRequest struct {
Role string `json:"role"`
Content string `json:"content"`
FileIds []string `json:"file_ids,omitempty"` //nolint:revive // backwards-compatibility
Metadata map[string]any `json:"metadata,omitempty"`
Role string `json:"role"`
Content string `json:"content"`
FileIds []string `json:"file_ids,omitempty"` //nolint:revive // backwards-compatibility
Metadata map[string]any `json:"metadata,omitempty"`
Attachments []ThreadAttachment `json:"attachments,omitempty"`
}

type MessageFile struct {
Expand Down

0 comments on commit 6d066bb

Please sign in to comment.