diff --git a/chat.go b/chat.go index 995860c4..3a79b890 100644 --- a/chat.go +++ b/chat.go @@ -262,7 +262,7 @@ type ChatCompletionRequest struct { // Controls effort on reasoning for reasoning models. It can be set to "low", "medium", or "high". ReasoningEffort string `json:"reasoning_effort,omitempty"` // Metadata to store with the completion. - Metadata map[string]string `json:"metadata,omitempty"` + Metadata map[string]any `json:"metadata,omitempty"` } type StreamOptions struct { diff --git a/messages.go b/messages.go index 3852d2e3..31844ef8 100644 --- a/messages.go +++ b/messages.go @@ -162,7 +162,7 @@ func (c *Client) RetrieveMessage( func (c *Client) ModifyMessage( ctx context.Context, threadID, messageID string, - metadata map[string]string, + metadata map[string]any, ) (msg Message, err error) { urlSuffix := fmt.Sprintf("/threads/%s/%s/%s", threadID, messagesSuffix, messageID) req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix), diff --git a/messages_test.go b/messages_test.go index b25755f9..3abc5871 100644 --- a/messages_test.go +++ b/messages_test.go @@ -233,7 +233,7 @@ func TestMessages(t *testing.T) { } msg, err = client.ModifyMessage(ctx, threadID, messageID, - map[string]string{ + map[string]any{ "foo": "bar", }) checks.NoError(t, err, "ModifyMessage error")