add cohere embedding models

This commit is contained in:
ishaan-jaff 2023-09-29 09:59:31 -07:00
parent 8213e23970
commit af914d4be1
5 changed files with 127 additions and 9 deletions

View file

@ -173,6 +173,19 @@ class ModelResponse(OpenAIObject):
d["choices"] = [choice.to_dict_recursive() for choice in self.choices]
return d
class EmbeddingResponse(OpenAIObject):
def __init__(self, id=None, choices=None, created=None, model=None, usage=None, stream=False, response_ms=None, **params):
self.object = "list"
if response_ms:
self._response_ms = response_ms
else:
self._response_ms = None
self.data = []
self.model = model
def to_dict_recursive(self):
d = super().to_dict_recursive()
return d
############################################################
def print_verbose(print_statement):