diff --git a/CHANGELOG.md b/CHANGELOG.md index cea2eaa9e..d90abbd31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 4.27 +- [#308] (https://github.com/cohere-ai/cohere-python/pull/308) + - Datasets: add validation_warnings + ## 4.26.1 - [#306] (https://github.com/cohere-ai/cohere-python/pull/306) diff --git a/cohere/responses/dataset.py b/cohere/responses/dataset.py index 27e7275ab..383c4a24f 100644 --- a/cohere/responses/dataset.py +++ b/cohere/responses/dataset.py @@ -20,6 +20,7 @@ class BaseDataset(CohereObject, JobWithStatus): dataset_type: str validation_status: str validation_error: Optional[str] + validation_warnings: List[str] created_at: datetime updated_at: datetime download_urls: List[str] @@ -34,6 +35,7 @@ def __init__( validation_status: str, created_at: str, updated_at: str, + validation_warnings: List[str], validation_error: str = None, download_urls: List[str] = None, wait_fn=None, @@ -47,6 +49,7 @@ def __init__( self.download_urls = download_urls self._wait_fn = wait_fn self.validation_error = validation_error + self.validation_warnings = validation_warnings @classmethod def from_dict(cls, data: Dict[str, Any], wait_fn) -> "Dataset": @@ -64,6 +67,7 @@ def from_dict(cls, data: Dict[str, Any], wait_fn) -> "Dataset": download_urls=download_urls, wait_fn=wait_fn, validation_error=data.get("validation_error"), + validation_warnings=data.get("validation_warnings", []), ) def has_terminal_status(self) -> bool: diff --git a/pyproject.toml b/pyproject.toml index cf3f915a0..b34eb672d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cohere" -version = "4.26.1" +version = "4.27" description = "" authors = ["Cohere"] readme = "README.md" diff --git a/tests/sync/test_chat.py b/tests/sync/test_chat.py index d72c10aae..314f984b7 100644 --- a/tests/sync/test_chat.py +++ b/tests/sync/test_chat.py @@ -1,6 +1,6 @@ import unittest -import pytest +import pytest from utils import get_api_key import cohere