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

Method GetChatAdvisorConfig

codersdk/chats.go:2557–2568  ·  view source on GitHub ↗

GetChatAdvisorConfig returns the deployment-wide advisor configuration.

(ctx context.Context)

Source from the content-addressed store, hash-verified

2555
2556// GetChatAdvisorConfig returns the deployment-wide advisor configuration.
2557func (c *ExperimentalClient) GetChatAdvisorConfig(ctx context.Context) (AdvisorConfig, error) {
2558 res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/advisor", nil)
2559 if err != nil {
2560 return AdvisorConfig{}, err
2561 }
2562 defer res.Body.Close()
2563 if res.StatusCode != http.StatusOK {
2564 return AdvisorConfig{}, ReadBodyAsError(res)
2565 }
2566 var resp AdvisorConfig
2567 return resp, json.NewDecoder(res.Body).Decode(&resp)
2568}
2569
2570// UpdateChatAdvisorConfig updates the deployment-wide advisor configuration.
2571func (c *ExperimentalClient) UpdateChatAdvisorConfig(ctx context.Context, req UpdateAdvisorConfigRequest) error {

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45