mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
add cohere embedding models
This commit is contained in:
parent
8213e23970
commit
af914d4be1
5 changed files with 127 additions and 9 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue