[Misc] Fix docs display problem of streaming mode and other related issues (#667)
Signed-off-by: Gaohan123 <hgaoaf@connect.ust.hk>
This commit is contained in:
1 parent
aaba243832
commit
75cdf1cb4e
9 files changed
+77
No files matched your search
@@ -230,6 +230,10 @@ Provide multiple images in `content` (order matters):
|
||||
``````py
|
||||
--8<-- "examples/online_serving/image_to_image/openai_chat_client.py"
|
||||
``````
|
||||
??? abstract "run_curl_image_edit.sh"
|
||||
``````sh
|
||||
--8<-- "examples/online_serving/image_to_image/run_curl_image_edit.sh"
|
||||
``````
|
||||
??? abstract "run_server.sh"
|
||||
``````sh
|
||||
--8<-- "examples/online_serving/image_to_image/run_server.sh"
|
||||
|
||||
@@ -137,6 +137,7 @@ response = client.chat.completions.create(
|
||||
# Response contains two choices: one with text, one with audio
|
||||
print(response.choices[0].message.content) # Text response
|
||||
print(response.choices[1].message.audio) # Audio response
|
||||
```
|
||||
|
||||
## Streaming Output
|
||||
If you want to enable streaming output, please set the argument as below. The final output will be obtained just after generated by corresponding stage. Now we only support text streaming output. Other modalities can output normally.
|
||||
|
||||
@@ -145,6 +145,7 @@ response = client.chat.completions.create(
|
||||
# Response contains two choices: one with text, one with audio
|
||||
print(response.choices[0].message.content) # Text response
|
||||
print(response.choices[1].message.audio) # Audio response
|
||||
```
|
||||
|
||||
## Streaming Output
|
||||
If you want to enable streaming output, please set the argument as below. The final output will be obtained just after generated by corresponding stage. Now we only support text streaming output. Other modalities can output normally.
|
||||
|
||||
Reference in new issue
Block a user