GetChatDebugRetentionDays returns the configured chat debug run retention period.
(ctx context.Context)
| 2665 | // GetChatDebugRetentionDays returns the configured chat debug run |
| 2666 | // retention period. |
| 2667 | func (c *ExperimentalClient) GetChatDebugRetentionDays(ctx context.Context) (ChatDebugRetentionDaysResponse, error) { |
| 2668 | res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/debug-retention-days", nil) |
| 2669 | if err != nil { |
| 2670 | return ChatDebugRetentionDaysResponse{}, err |
| 2671 | } |
| 2672 | defer res.Body.Close() |
| 2673 | if res.StatusCode != http.StatusOK { |
| 2674 | return ChatDebugRetentionDaysResponse{}, ReadBodyAsError(res) |
| 2675 | } |
| 2676 | var resp ChatDebugRetentionDaysResponse |
| 2677 | return resp, json.NewDecoder(res.Body).Decode(&resp) |
| 2678 | } |
| 2679 | |
| 2680 | // UpdateChatDebugRetentionDays updates the chat debug run retention period. |
| 2681 | func (c *ExperimentalClient) UpdateChatDebugRetentionDays(ctx context.Context, req UpdateChatDebugRetentionDaysRequest) error { |