Skip to content

Commit af86258

Browse files
authored
fix: use dot notation for ActionSearch object to prevent TypeError
This fix addresses a TypeError: 'ActionSearch' object is not subscriptable caused by treating an ActionSearch object like a dictionary. The code now correctly uses dot notation (search.action.query instead of search.action["query"]).
1 parent ad69166 commit af86258

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/deep_research_api/introduction_to_deep_research_api.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
"source": [
253253
"# Find the first web search step\n",
254254
"search = next(item for item in response.output if item.type == \"web_search_call\")\n",
255-
"print(\"Query:\", search.action[\"query\"])\n",
255+
"print(\"Query:\", search.action.query)\n",
256256
"print(\"Status:\", search.status)"
257257
]
258258
},

0 commit comments

Comments
 (0)