Skip to content

Commit a8238bb

Browse files
authored
[Chore][Doc] uses model id determined from OpenAI client (#17815)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
1 parent d43f914 commit a8238bb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/online_serving/openai_chat_completion_structured_outputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def main():
138138
api_key="-",
139139
)
140140

141-
model = "Qwen/Qwen2.5-3B-Instruct"
141+
model = client.models.list().data[0].id
142142

143143
print("Guided Choice Completion:")
144144
print(guided_choice_completion(client, model))

examples/online_serving/openai_chat_completion_structured_outputs_structural_tag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def main():
5959
}]
6060

6161
response = client.chat.completions.create(
62-
model="meta-llama/Llama-3.1-8B-Instruct",
62+
model=client.models.list().data[0].id,
6363
messages=messages,
6464
response_format={
6565
"type":

examples/online_serving/openai_chat_completion_structured_outputs_with_reasoning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
like DeepSeekR1. The thinking process will not be guided by the JSON
55
schema provided by the user. Only the final output will be structured.
66
7-
To run this example, you need to start the vLLM server with the reasoning
7+
To run this example, you need to start the vLLM server with the reasoning
88
parser:
99
1010
```bash

0 commit comments

Comments
 (0)