GetChatWorkspaceTTL returns the configured chat workspace TTL.
(ctx context.Context)
| 2610 | |
| 2611 | // GetChatWorkspaceTTL returns the configured chat workspace TTL. |
| 2612 | func (c *ExperimentalClient) GetChatWorkspaceTTL(ctx context.Context) (ChatWorkspaceTTLResponse, error) { |
| 2613 | res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/workspace-ttl", nil) |
| 2614 | if err != nil { |
| 2615 | return ChatWorkspaceTTLResponse{}, err |
| 2616 | } |
| 2617 | defer res.Body.Close() |
| 2618 | if res.StatusCode != http.StatusOK { |
| 2619 | return ChatWorkspaceTTLResponse{}, ReadBodyAsError(res) |
| 2620 | } |
| 2621 | var resp ChatWorkspaceTTLResponse |
| 2622 | return resp, json.NewDecoder(res.Body).Decode(&resp) |
| 2623 | } |
| 2624 | |
| 2625 | // UpdateChatWorkspaceTTL updates the chat workspace TTL setting. |
| 2626 | func (c *ExperimentalClient) UpdateChatWorkspaceTTL(ctx context.Context, req UpdateChatWorkspaceTTLRequest) error { |