Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 4 additions & 0 deletions cohere/responses/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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,
Expand All @@ -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":
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cohere"
version = "4.26.1"
version = "4.27"
description = ""
authors = ["Cohere"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion tests/sync/test_chat.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
import pytest

import pytest
Copy link
Contributor Author

@raphaelcristal raphaelcristal Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why this was moved. was done by the pre-commit

from utils import get_api_key

import cohere
Expand Down