You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The OpenAI Agents SDK provides a robust framework for integrating various tools into agents, enabling them to perform tasks such as data retrieval, web searches, and code execution. Here's an overview of the key points regarding tool integration:\n",
150
+
"\n",
151
+
"**Types of Tools:**\n",
152
+
"\n",
153
+
"1. **Hosted Tools:** These are pre-built tools running on OpenAI's servers, accessible via the [`OpenAIResponsesModel`]. Examples include:\n",
154
+
" - **WebSearchTool:** Enables agents to perform web searches.\n",
155
+
" - **FileSearchTool:** Allows retrieval of information from OpenAI Vector Stores.\n",
156
+
" - **ComputerTool:** Facilitates automation of computer-based tasks.\n",
157
+
"\n",
158
+
"2. **Function Calling:** This feature allows agents to utilize any Python function as a tool, enhancing their versatility.\n",
159
+
"\n",
160
+
"3. **Agents as Tools:** Agents can employ other agents as tools, enabling hierarchical task management without transferring control.\n",
161
+
"\n",
162
+
"**Implementing Tools:**\n",
163
+
"\n",
164
+
"- **Function Tools:** By decorating Python functions with `@function_tool`, they can be seamlessly integrated as tools for agents.\n",
165
+
"\n",
166
+
"**Tool Execution Flow:**\n",
167
+
"\n",
168
+
"- During an agent's operation, if a tool call is identified in the response, the SDK processes the tool call, appends the tool's response to the message history, and continues the loop until a final output is produced.\n",
169
+
"\n",
170
+
"**Error Handling:**\n",
171
+
"\n",
172
+
"- The SDK offers mechanisms to handle errors gracefully, allowing agents to recover from tool-related issues and continue their tasks effectively.\n",
173
+
"\n",
174
+
"For a comprehensive understanding and implementation details, refer to the [tools documentation](https://github.com/openai/openai-agents-python/blob/main/docs/tools.md)."
🚀 **[Open in Google Colab](https://colab.research.google.com/drive/18owxL5MyPPlmp4IqfveN1JOSCYQ4GFnu?usp=sharing)**
2
+
3
+
The OpenAI Agents SDK provides a robust framework for integrating various tools into agents, enabling them to perform tasks such as data retrieval, web searches, and code execution. Here's an overview of the key points regarding tool integration:
4
+
5
+
**Types of Tools:**
6
+
7
+
1.**Hosted Tools:** These are pre-built tools running on OpenAI's servers, accessible via the [`OpenAIResponsesModel`]. Examples include:
8
+
-**WebSearchTool:** Enables agents to perform web searches.
9
+
-**FileSearchTool:** Allows retrieval of information from OpenAI Vector Stores.
10
+
-**ComputerTool:** Facilitates automation of computer-based tasks.
11
+
12
+
2.**Function Calling:** This feature allows agents to utilize any Python function as a tool, enhancing their versatility.
13
+
14
+
3.**Agents as Tools:** Agents can employ other agents as tools, enabling hierarchical task management without transferring control.
15
+
16
+
**Implementing Tools:**
17
+
18
+
-**Function Tools:** By decorating Python functions with `@function_tool`, they can be seamlessly integrated as tools for agents.
19
+
20
+
**Tool Execution Flow:**
21
+
22
+
- During an agent's operation, if a tool call is identified in the response, the SDK processes the tool call, appends the tool's response to the message history, and continues the loop until a final output is produced.
23
+
24
+
**Error Handling:**
25
+
26
+
- The SDK offers mechanisms to handle errors gracefully, allowing agents to recover from tool-related issues and continue their tasks effectively.
27
+
28
+
For a comprehensive understanding and implementation details, refer to the [tools documentation](https://github.com/openai/openai-agents-python/blob/main/docs/tools.md).
0 commit comments