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

Method UpdateChatTemplateAllowlist

codersdk/chats.go:2735–2745  ·  view source on GitHub ↗

UpdateChatTemplateAllowlist updates the deployment-wide chat template allowlist.

(ctx context.Context, req ChatTemplateAllowlist)

Source from the content-addressed store, hash-verified

2733
2734// UpdateChatTemplateAllowlist updates the deployment-wide chat template allowlist.
2735func (c *ExperimentalClient) UpdateChatTemplateAllowlist(ctx context.Context, req ChatTemplateAllowlist) error {
2736 res, err := c.Request(ctx, http.MethodPut, "/api/experimental/chats/config/template-allowlist", req)
2737 if err != nil {
2738 return err
2739 }
2740 defer res.Body.Close()
2741 if res.StatusCode != http.StatusNoContent {
2742 return ReadBodyAsError(res)
2743 }
2744 return nil
2745}
2746
2747// UpdateUserChatCustomPrompt updates the user's custom chat prompt.
2748func (c *ExperimentalClient) UpdateUserChatCustomPrompt(ctx context.Context, req UserChatCustomPrompt) (UserChatCustomPrompt, error) {

Callers 1

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1