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.24
- [#296] (https://github.com/cohere-ai/cohere-python/pull/296)
- Allow passing of delimiter for csv

## 4.23
- [#294] (https://github.com/cohere-ai/cohere-python/pull/294)
- Allow passing of ParseInfo for datasets
Expand Down
5 changes: 4 additions & 1 deletion cohere/responses/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,13 @@ async def wait(

@dataclass
class ParseInfo:
separator: Optional[str]
separator: Optional[str] = None
delimiter: Optional[str] = None

def get_params(self) -> Dict[str, str]:
params = {}
if self.separator:
params["text_separator"] = self.separator
if self.delimiter:
params["csv_delimiter"] = self.delimiter
return params
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.23"
version = "4.24"
description = ""
authors = ["Cohere"]
readme = "README.md"
Expand Down