fix(types/utils.py): fix streaming function name

This commit is contained in:
Krrish Dholakia 2024-07-10 21:56:47 -07:00
parent 31829855c0
commit 1019355527
2 changed files with 10 additions and 8 deletions

View file

@ -166,7 +166,9 @@ class FunctionCall(OpenAIObject):
class Function(OpenAIObject):
arguments: str
name: str
name: Optional[
str
] # can be None - openai e.g.: ChoiceDeltaToolCallFunction(arguments='{"', name=None), type=None)
def __init__(
self,

View file

@ -9483,8 +9483,8 @@ class CustomStreamWrapper:
model_response.choices[0].delta = Delta(**_json_delta)
except Exception as e:
verbose_logger.error(
"litellm.CustomStreamWrapper.chunk_creator(): Exception occured - {}".format(
str(e)
"litellm.CustomStreamWrapper.chunk_creator(): Exception occured - {}\n{}".format(
str(e), traceback.format_exc()
)
)
verbose_logger.debug(traceback.format_exc())