Skip to content

Commit

Permalink
fix: Assistant Prompts and Status, send channel_id with request (#1344)
Browse files Browse the repository at this point in the history
This is a fix for [PR
1331](#1331), which I mistakenly
removed the channel_id parameter from the API request during feedback.

Without channel_id provided, the call always returns
`invalid_arguments`.
  • Loading branch information
MattDavisRV authored Nov 12, 2024
1 parent 00d0e9a commit a99606f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assistant.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ func (api *Client) SetAssistantThreadsSuggestedPromptsContext(ctx context.Contex
values.Add("thread_ts", params.ThreadTS)
}

values.Add("channel_id", params.ChannelID)

// Send Prompts as JSON
prompts, err := json.Marshal(params.Prompts)
if err != nil {
Expand Down Expand Up @@ -98,6 +100,8 @@ func (api *Client) SetAssistantThreadsStatusContext(ctx context.Context, params
values.Add("thread_ts", params.ThreadTS)
}

values.Add("channel_id", params.ChannelID)

// Always send the status parameter, if empty, it will clear any existing status
values.Add("status", params.Status)

Expand Down

0 comments on commit a99606f

Please sign in to comment.