MCPcopy Create free account
hub / github.com/coder/coder / SubmitToolResults

Method SubmitToolResults

codersdk/chats.go:3429–3439  ·  view source on GitHub ↗

SubmitToolResults submits the results of dynamic tool calls for a chat that is in requires_action status.

(ctx context.Context, chatID uuid.UUID, req SubmitToolResultsRequest)

Source from the content-addressed store, hash-verified

3427// SubmitToolResults submits the results of dynamic tool calls for a chat
3428// that is in requires_action status.
3429func (c *ExperimentalClient) SubmitToolResults(ctx context.Context, chatID uuid.UUID, req SubmitToolResultsRequest) error {
3430 res, err := c.Request(ctx, http.MethodPost, fmt.Sprintf("/api/experimental/chats/%s/tool-results", chatID), req)
3431 if err != nil {
3432 return err
3433 }
3434 defer res.Body.Close()
3435 if res.StatusCode != http.StatusNoContent {
3436 return ReadBodyAsError(res)
3437 }
3438 return nil
3439}
3440
3441// GetChatsByWorkspace returns a mapping of workspace ID to the latest
3442// non-archived chat ID for each requested workspace. Workspaces with

Callers 1

TestSubmitToolResultsFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestSubmitToolResultsFunction · 0.76