Add Iterators to Custom Objects#19
Merged
jeffistyping merged 27 commits intomainfrom Jul 7, 2021
Merged
Conversation
doo doo doo dooo we are
sample to generate
* Initial change from dicts to objects * add newline at EOF * Add __str__ methods to objects * Change naming of objects to remove 'Cohere' * Change object names to be nouns * change sanity-test.py and rename ChooseBest object
Co-authored-by: jeff <jeff@cohere.ai>
) * change version number for release * Remove unused self.model Variable (#11) Co-authored-by: jeff <jeff@cohere.ai> * change version number for release * add request dependency, add type annotations: * missed something * add init and request type annotations Co-authored-by: Jeff <jeffrey-hui@users.noreply.github.com> Co-authored-by: jeff <jeff@cohere.ai>
* Seperate files from * fix version again * include import for easier user access * Update __init__.py add missing double quotes * Make more formatting changes and update sanity-test.py
jimwu6
reviewed
Jul 7, 2021
jimwu6
approved these changes
Jul 7, 2021
Contributor
jimwu6
left a comment
There was a problem hiding this comment.
Added comments to separate stuff in sanity-test.py, so take a look
LGTM otherwise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Python response objects that just wrap around a list object (BestChoices, Embeddings, Similarities) should be iterable.
For example, Embeddings returned from the
Embedendpoint can be iterated through by using:Users should expect to be able to do this instead: