Skip to content

Fix an error with 1.1 example code#3

Open
seratch wants to merge 1 commit intowandb:mainfrom
seratch:1.1-fix
Open

Fix an error with 1.1 example code#3
seratch wants to merge 1 commit intowandb:mainfrom
seratch:1.1-fix

Conversation

@seratch
Copy link

@seratch seratch commented Jul 24, 2025

Thanks for creating a great course with OpenAI Agents SDK! This pull request primarily resolves the following runtime error in example 1.1:

weave.trace.op.OpCallError: Error calling openai.responses.parse: got an unexpected keyword argument 'format'

Also, I adjusted the input string to make the example easier for beginners to understand. If the tewam does not like the additional changes, please feel free to revert that part!

Copy link
Author

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few comments for reviewers



@weave.op()
def response(instructions: str, user_input: str, format: BaseModel):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the format parameter is unused

instructions=instructions,
input=user_input,
format=SentenceEntities,
text_format=SentenceEntities,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the essential change in this PR, so please feel free to revert others if necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant