MCPcopy Index your code
hub / github.com/coder/coder / DeleteChatModelConfig

Method DeleteChatModelConfig

codersdk/chats.go:2285–2295  ·  view source on GitHub ↗

DeleteChatModelConfig deletes an admin-managed chat model config.

(ctx context.Context, modelConfigID uuid.UUID)

Source from the content-addressed store, hash-verified

2283
2284// DeleteChatModelConfig deletes an admin-managed chat model config.
2285func (c *ExperimentalClient) DeleteChatModelConfig(ctx context.Context, modelConfigID uuid.UUID) error {
2286 res, err := c.Request(ctx, http.MethodDelete, fmt.Sprintf("/api/experimental/chats/model-configs/%s", modelConfigID), nil)
2287 if err != nil {
2288 return err
2289 }
2290 defer res.Body.Close()
2291 if res.StatusCode != http.StatusNoContent {
2292 return ReadBodyAsError(res)
2293 }
2294 return nil
2295}
2296
2297// GetChatCostSummary returns an aggregate cost summary for the specified
2298// user. Zero-valued StartDate or EndDate fields are omitted from the

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 2