Skip to content

Commit

Permalink
only cast str because of BerriAI/litellm#2790
Browse files Browse the repository at this point in the history
  • Loading branch information
phact committed Apr 2, 2024
1 parent 5647344 commit 2edda67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impl/services/inference_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def get_async_chat_completion_response(
type_hints = get_type_hints(acompletion)

for key, value in litellm_kwargs.items():
if value is not None and key in type_hints:
if value is not None and key in type_hints and isinstance(value, str):
type_hint = type_hints[key]
# handle optional
if hasattr(type_hint, "__origin__") and type_hint.__origin__ == Union:
Expand Down

0 comments on commit 2edda67

Please sign in to comment.