Skip to content

Release v2.12.3

Choose a tag to compare

@github-actions github-actions released this 11 Jun 15:45
574e83f
fix: Adding NEQ filter type in sdk (#215)

[Linked
issue](https://github.com/cohere-ai/cohere-compass-sdk/issues/211)

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

## Description
This PR introduces a new filter type, `NEQ`, to the `FilterType` enum in
the `cohere_compass/models/search.py` file. This addition allows for
filtering documents based on values that are not equal to a specified
value.

## Changes
- **New Filter Type**: Added `NEQ = "$neq"` to the `FilterType` enum,
enabling inequality filtering.
- **Test for `NEQ` Filter**: Introduced
`test_search_documents_with_neq_filter` in
`tests/test_compass_client.py` to verify the functionality of the new
filter type.
- **Serialization Test**: Added `test_search_filter_neq_serialization`
to ensure correct JSON serialization of the `NEQ` filter.

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