forked from phoenix/litellm-mirror
add streaming for together-ai
This commit is contained in:
parent
23fc936b65
commit
3c3d144584
3 changed files with 36 additions and 3 deletions
|
@ -375,9 +375,13 @@ def completion(
|
|||
"model": model,
|
||||
"prompt": prompt,
|
||||
"request_type": "language-model-inference",
|
||||
**optional_params
|
||||
},
|
||||
headers=headers
|
||||
)
|
||||
if stream == True:
|
||||
response = CustomStreamWrapper(res, "together_ai")
|
||||
return response
|
||||
|
||||
completion_response = res.json()['output']['choices'][0]['text']
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue