Skip to content

Release v2.9.0

Choose a tag to compare

@github-actions github-actions released this 13 Apr 16:55
2de2dc5
feat: index retention policy (#194)

<!-- begin-generated-description -->

## Description
This PR introduces retention policy management to the Cohere Compass
SDK. It includes models, API endpoints, and client methods for setting,
retrieving, and deleting retention policies on indexes.

## Changes
- **New Models**:
- `RetentionPolicy` model added to define retention policy
configuration.
- `RetentionType` enum added to specify policy types (`fixed` or
`sliding`).
- **API Endpoints**:
  - Added endpoints for managing retention policies:
    - `set_retention_policy`
    - `get_retention_policy`
    - `delete_retention_policy`
- **Client Methods**:
- Added methods to `CompassClient` and `CompassAsyncClient` for managing
retention policies:
    - `set_retention_policy`
    - `get_retention_policy`
    - `delete_retention_policy`
- **IndexDetails Model Update**:
- Added `retention_policy` field to `IndexDetails` model to include
retention policy information.

<!-- end-generated-description -->