forked from phoenix/litellm-mirror
feat(utils.py): support sync streaming for custom llm provider
This commit is contained in:
parent
9f97436308
commit
b4e3a77ad0
5 changed files with 139 additions and 10 deletions
|
@ -2713,6 +2713,14 @@ def completion(
|
|||
|
||||
## CALL FUNCTION
|
||||
response = handler_fn()
|
||||
if stream is True:
|
||||
return CustomStreamWrapper(
|
||||
completion_stream=response,
|
||||
model=model,
|
||||
custom_llm_provider=custom_llm_provider,
|
||||
logging_obj=logging,
|
||||
)
|
||||
|
||||
else:
|
||||
raise ValueError(
|
||||
f"Unable to map your input to a model. Check your input - {args}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue