forked from phoenix/litellm-mirror
bug fixes for response object
This commit is contained in:
parent
24666a30fe
commit
f0b104f37f
5 changed files with 3 additions and 2 deletions
|
@ -12,6 +12,7 @@ from .integrations.aispend import AISpendLogger
|
|||
from .integrations.berrispend import BerriSpendLogger
|
||||
from .integrations.supabase import Supabase
|
||||
from openai.error import OpenAIError as OriginalError
|
||||
from openai.openai_object import OpenAIObject
|
||||
from .exceptions import AuthenticationError, InvalidRequestError, RateLimitError, ServiceUnavailableError, OpenAIError
|
||||
from typing import List, Dict, Union
|
||||
####### 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}}"
|
||||
return result
|
||||
|
||||
class ModelResponse:
|
||||
class ModelResponse(dict):
|
||||
def __init__(self):
|
||||
self.choices: List[Choices] = [Choices()]
|
||||
self.created: str = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue