fix python_api example (#10196)

### What problem does this PR solve?

Fix coding example in example

### Type of change

- [x] Documentation Update
This commit is contained in:
Shaun Zhang
2025-09-22 17:27:25 +08:00
committed by GitHub
parent 94dbd4aac9
commit da80fa40bc

View File

@ -85,7 +85,7 @@ completion = client.chat.completions.create(
)
if stream:
for chunk in completion:
for chunk in completion:
print(chunk)
if reference and chunk.choices[0].finish_reason == "stop":
print(f"Reference:\n{chunk.choices[0].delta.reference}")