Unverified Commit 27bebcd8 authored by Harry Mellor's avatar Harry Mellor Committed by GitHub
Browse files

Convert `examples` to `ruff-format` (#18400)


Signed-off-by: default avatarHarry Mellor <19981378+hmellor@users.noreply.github.com>
parent e7523c2e
...@@ -45,12 +45,12 @@ def main(): ...@@ -45,12 +45,12 @@ def main():
# Round 2 # Round 2
messages.append({"role": "assistant", "content": content}) messages.append({"role": "assistant", "content": content})
messages.append({ messages.append(
"role": {
"user", "role": "user",
"content": "content": "How many Rs are there in the word 'strawberry'?",
"How many Rs are there in the word 'strawberry'?", }
}) )
response = client.chat.completions.create(model=model, messages=messages) response = client.chat.completions.create(model=model, messages=messages)
reasoning_content = response.choices[0].message.reasoning_content reasoning_content = response.choices[0].message.reasoning_content
......
...@@ -43,9 +43,7 @@ def main(): ...@@ -43,9 +43,7 @@ def main():
# ruff: noqa: E501 # ruff: noqa: E501
# For granite: add: `extra_body={"chat_template_kwargs": {"thinking": True}}` # For granite: add: `extra_body={"chat_template_kwargs": {"thinking": True}}`
stream = client.chat.completions.create(model=model, stream = client.chat.completions.create(model=model, messages=messages, stream=True)
messages=messages,
stream=True)
print("client: Start streaming chat completions...") print("client: Start streaming chat completions...")
printed_reasoning_content = False printed_reasoning_content = False
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment