Skip to content

Commit d42bc43

Browse files
committed
Fix linter errors
1 parent f325336 commit d42bc43

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

chatgpt-python-api/basic_chatgpt_call.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
client = OpenAI()
44

55
text_response = client.responses.create(
6-
model="gpt-5",
7-
input="Tell me a joke about Python programming"
6+
model="gpt-5", input="Tell me a joke about Python programming"
87
)
98

109
print(f"Joke:\n{text_response.output_text}")

chatgpt-python-api/structured_output.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,28 @@
33

44
client = OpenAI()
55

6+
67
class CodeOutput(BaseModel):
78
function_name: str
89
code: str
910
explanation: str
1011
example_usage: str
1112

13+
1214
code_response = client.responses.parse(
1315
model="gpt-5",
1416
input=[
1517
{
1618
"role": "developer",
17-
"content": ("You are a coding assistant. Generate clean,"
18-
"well-documented Python code."
19-
)
19+
"content": (
20+
"You are a coding assistant. Generate clean,"
21+
"well-documented Python code."
22+
),
2023
},
2124
{
2225
"role": "user",
23-
"content": "Write a simple Python function to add two numbers"
24-
}
26+
"content": "Write a simple Python function to add two numbers",
27+
},
2528
],
2629
text_format=CodeOutput,
2730
)

0 commit comments

Comments
 (0)