UpdateChatRetentionDays updates the chat retention period.
(ctx context.Context, req UpdateChatRetentionDaysRequest)
| 2651 | |
| 2652 | // UpdateChatRetentionDays updates the chat retention period. |
| 2653 | func (c *ExperimentalClient) UpdateChatRetentionDays(ctx context.Context, req UpdateChatRetentionDaysRequest) error { |
| 2654 | res, err := c.Request(ctx, http.MethodPut, "/api/experimental/chats/config/retention-days", req) |
| 2655 | if err != nil { |
| 2656 | return err |
| 2657 | } |
| 2658 | defer res.Body.Close() |
| 2659 | if res.StatusCode != http.StatusNoContent { |
| 2660 | return ReadBodyAsError(res) |
| 2661 | } |
| 2662 | return nil |
| 2663 | } |
| 2664 | |
| 2665 | // GetChatDebugRetentionDays returns the configured chat debug run |
| 2666 | // retention period. |