From da80fa40bc4df804495f85e42056f90e51f5afdc Mon Sep 17 00:00:00 2001 From: Shaun Zhang Date: Mon, 22 Sep 2025 17:27:25 +0800 Subject: [PATCH] fix python_api example (#10196) ### What problem does this PR solve? Fix coding example in example ### Type of change - [x] Documentation Update --- docs/references/python_api_reference.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/references/python_api_reference.md b/docs/references/python_api_reference.md index 79c62424b..abd1c393e 100644 --- a/docs/references/python_api_reference.md +++ b/docs/references/python_api_reference.md @@ -85,11 +85,11 @@ completion = client.chat.completions.create( ) if stream: -for chunk in completion: - print(chunk) - if reference and chunk.choices[0].finish_reason == "stop": - print(f"Reference:\n{chunk.choices[0].delta.reference}") - print(f"Final content:\n{chunk.choices[0].delta.final_content}") + for chunk in completion: + print(chunk) + if reference and chunk.choices[0].finish_reason == "stop": + print(f"Reference:\n{chunk.choices[0].delta.reference}") + print(f"Final content:\n{chunk.choices[0].delta.final_content}") else: print(completion.choices[0].message.content) if reference: