Skip to content

Conversation

@lfayoux
Copy link
Contributor

@lfayoux lfayoux commented Aug 14, 2023

  • if there are no datasets to list return an empty list
  • don't run dataset tests in CI

@lfayoux lfayoux requested review from a team and sanderland as code owners August 14, 2023 20:09
@lfayoux lfayoux requested a review from harry-cohere August 14, 2023 20:09
cohere/client.py Outdated
Dataset.from_dict({"meta": response.get("meta"), **r}, wait_fn=self.wait_for_dataset)
for r in response["datasets"]
]
if "datasets" in response
Copy link
Contributor

Choose a reason for hiding this comment

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

I would use for r in response.get('datasets',[]) or for r in (response.get('datasets') or []) but that's just a suggestion

@lfayoux lfayoux merged commit 669ec6e into main Aug 15, 2023
@lfayoux lfayoux deleted the fix-dataset-list branch August 15, 2023 14:47
fede-kamel pushed a commit to fede-kamel/cohere-python that referenced this pull request Jan 26, 2026
* fix dataset list key error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants