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

Method UpdateChatSystemPrompt

codersdk/chats.go:2377–2387  ·  view source on GitHub ↗

UpdateChatSystemPrompt updates the deployment-wide chat system prompt.

(ctx context.Context, req UpdateChatSystemPromptRequest)

Source from the content-addressed store, hash-verified

2375
2376// UpdateChatSystemPrompt updates the deployment-wide chat system prompt.
2377func (c *ExperimentalClient) UpdateChatSystemPrompt(ctx context.Context, req UpdateChatSystemPromptRequest) error {
2378 res, err := c.Request(ctx, http.MethodPut, "/api/experimental/chats/config/system-prompt", req)
2379 if err != nil {
2380 return err
2381 }
2382 defer res.Body.Close()
2383 if res.StatusCode != http.StatusNoContent {
2384 return ReadBodyAsError(res)
2385 }
2386 return nil
2387}
2388
2389// GetChatPlanModeInstructions returns the deployment-wide plan mode instructions.
2390func (c *ExperimentalClient) GetChatPlanModeInstructions(ctx context.Context) (ChatPlanModeInstructionsResponse, error) {

Callers 1

TestChatSystemPromptFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestChatSystemPromptFunction · 0.76