GetChatSystemPrompt returns the deployment-wide chat system prompt.
(ctx context.Context)
| 2361 | |
| 2362 | // GetChatSystemPrompt returns the deployment-wide chat system prompt. |
| 2363 | func (c *ExperimentalClient) GetChatSystemPrompt(ctx context.Context) (ChatSystemPromptResponse, error) { |
| 2364 | res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/system-prompt", nil) |
| 2365 | if err != nil { |
| 2366 | return ChatSystemPromptResponse{}, err |
| 2367 | } |
| 2368 | defer res.Body.Close() |
| 2369 | if res.StatusCode != http.StatusOK { |
| 2370 | return ChatSystemPromptResponse{}, ReadBodyAsError(res) |
| 2371 | } |
| 2372 | var resp ChatSystemPromptResponse |
| 2373 | return resp, json.NewDecoder(res.Body).Decode(&resp) |
| 2374 | } |
| 2375 | |
| 2376 | // UpdateChatSystemPrompt updates the deployment-wide chat system prompt. |
| 2377 | func (c *ExperimentalClient) UpdateChatSystemPrompt(ctx context.Context, req UpdateChatSystemPromptRequest) error { |