mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
feat(utils.py): support 'stream_options' param across all providers
Closes https://github.com/BerriAI/litellm/issues/3553
This commit is contained in:
parent
34f31a1994
commit
54dacfdf61
2 changed files with 66 additions and 5 deletions
|
@ -1993,10 +1993,14 @@ def test_openai_chat_completion_complete_response_call():
|
|||
|
||||
|
||||
# test_openai_chat_completion_complete_response_call()
|
||||
def test_openai_stream_options_call():
|
||||
@pytest.mark.parametrize(
|
||||
"model",
|
||||
["gpt-3.5-turbo", "azure/chatgpt-v-2"],
|
||||
)
|
||||
def test_openai_stream_options_call(model):
|
||||
litellm.set_verbose = False
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
model=model,
|
||||
messages=[{"role": "system", "content": "say GM - we're going to make it "}],
|
||||
stream=True,
|
||||
stream_options={"include_usage": True},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue