GetChatAdvisorConfig returns the deployment-wide advisor configuration.
(ctx context.Context)
| 2555 | |
| 2556 | // GetChatAdvisorConfig returns the deployment-wide advisor configuration. |
| 2557 | func (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. |
| 2571 | func (c *ExperimentalClient) UpdateChatAdvisorConfig(ctx context.Context, req UpdateAdvisorConfigRequest) error { |