Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion messages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading