UpdateChatTemplateAllowlist updates the deployment-wide chat template allowlist.
(ctx context.Context, req ChatTemplateAllowlist)
| 2733 | |
| 2734 | // UpdateChatTemplateAllowlist updates the deployment-wide chat template allowlist. |
| 2735 | func (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. |
| 2748 | func (c *ExperimentalClient) UpdateUserChatCustomPrompt(ctx context.Context, req UserChatCustomPrompt) (UserChatCustomPrompt, error) { |