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 { diff --git a/thread.go b/thread.go index bc08e2bc..0a53e31e 100644 --- a/thread.go +++ b/thread.go @@ -9,6 +9,12 @@ const ( threadsSuffix = "/threads" ) +const ( + ThreadAttachmentToolCodeInterpreter = "code_interpreter" + ThreadAttachmentToolFunction = "function" + ThreadAttachmentToolFileSearch = "file_search" +) + type Thread struct { ID string `json:"id"` Object string `json:"object"`