mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
bug fixes for response object
This commit is contained in:
parent
c20ba023c2
commit
6cd4c5531e
5 changed files with 3 additions and 2 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -12,6 +12,7 @@ from .integrations.aispend import AISpendLogger
|
||||||
from .integrations.berrispend import BerriSpendLogger
|
from .integrations.berrispend import BerriSpendLogger
|
||||||
from .integrations.supabase import Supabase
|
from .integrations.supabase import Supabase
|
||||||
from openai.error import OpenAIError as OriginalError
|
from openai.error import OpenAIError as OriginalError
|
||||||
|
from openai.openai_object import OpenAIObject
|
||||||
from .exceptions import AuthenticationError, InvalidRequestError, RateLimitError, ServiceUnavailableError, OpenAIError
|
from .exceptions import AuthenticationError, InvalidRequestError, RateLimitError, ServiceUnavailableError, OpenAIError
|
||||||
from typing import List, Dict, Union
|
from typing import List, Dict, Union
|
||||||
####### ENVIRONMENT VARIABLES ###################
|
####### ENVIRONMENT VARIABLES ###################
|
||||||
|
@ -87,7 +88,7 @@ class Choices:
|
||||||
result = f"{{\n 'finish_reason': '{self.finish_reason}',\n 'index': {self.index},\n 'message': {self.message}\n}}"
|
result = f"{{\n 'finish_reason': '{self.finish_reason}',\n 'index': {self.index},\n 'message': {self.message}\n}}"
|
||||||
return result
|
return result
|
||||||
|
|
||||||
class ModelResponse:
|
class ModelResponse(dict):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.choices: List[Choices] = [Choices()]
|
self.choices: List[Choices] = [Choices()]
|
||||||
self.created: str = None
|
self.created: str = None
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "litellm"
|
name = "litellm"
|
||||||
version = "0.1.421"
|
version = "0.1.422"
|
||||||
description = "Library to easily interface with LLM API providers"
|
description = "Library to easily interface with LLM API providers"
|
||||||
authors = ["BerriAI"]
|
authors = ["BerriAI"]
|
||||||
license = "MIT License"
|
license = "MIT License"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue