-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The deep agent intro notebook (https://cookbook.openai.com/examples/deep_research_api/introduction_to_deep_research_api#inspect-intermediate-steps) states: "Set the background parameter to True. Since a Deep Research task can take several minutes to execute, enabling background mode will allow you to run the request asynchronously without having to worry about timeouts or other connectivity issues."
But the code doesn't actually set it in:
response = client.responses.create(
model="o3-deep-research",
input=[
{
"role": "developer",
"content": [
{
"type": "input_text",
"text": system_message,
}
]
},
{
"role": "user",
"content": [
{
"type": "input_text",
"text": user_query,
}
]
}
],
reasoning={
"summary": "auto"
},
tools=[
{
"type": "web_search_preview"
},
{
"type": "code_interpreter",
"container": {
"type": "auto",
"file_ids": []
}
}
]
)
Fix:
add background=True
parameter in the call, e.g.
response = client.responses.create(
model="o3-deep-research",
input=[
{
"role": "developer",
"content": [
{
"type": "input_text",
"text": system_message,
}
]
},
{
"role": "user",
"content": [
{
"type": "input_text",
"text": user_query,
}
]
}
],
background=True,
reasoning={
"summary": "auto"
},
tools=[
{
"type": "web_search_preview"
},
{
"type": "code_interpreter",
"container": {
"type": "auto",
"file_ids": []
}
}
]
)
and the polling code should be added too? cf: https://platform.openai.com/docs/guides/background#polling-background-responses
But maybe it makes the notebook too complex. As an alternative, link to https://platform.openai.com/docs/guides/background
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working