From 6d066bb12dfbaa3cefa83f204c431fb0d0ef02fa Mon Sep 17 00:00:00 2001 From: Denny Depok <61371551+kodernubie@users.noreply.github.com> Date: Fri, 8 Nov 2024 20:54:27 +0700 Subject: [PATCH] Support Attachments in MessageRequest (#890) * add attachments in MessageRequest * Move tools const to message * remove const, just use assistanttool const --- messages.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/messages.go b/messages.go index eefc29a3..90236393 100644 --- a/messages.go +++ b/messages.go @@ -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 {