From c963a9c7cf5ae8f050893e610b2b7812e023247c Mon Sep 17 00:00:00 2001 From: Daniel Bustamante Ospina <dbustamante70@gmail.com> Date: Tue, 4 Mar 2025 15:06:48 -0800 Subject: [PATCH] Add code snippet in tool agent docs for clarity (#18005) --- docs/docs/understanding/agent/tools.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/docs/understanding/agent/tools.md b/docs/docs/understanding/agent/tools.md index ea48a4fca4..47f940956b 100644 --- a/docs/docs/understanding/agent/tools.md +++ b/docs/docs/understanding/agent/tools.md @@ -33,6 +33,13 @@ finance_tools.extend([multiply, add]) And we'll ask a different question than last time, necessitating the use of the new tools: ```python +workflow = AgentWorkflow.from_tools_or_functions( + finance_tools, + llm=OpenAI(model="gpt-4o-mini"), + system_prompt="You are a helpful assistant.", +) + + async def main(): response = await workflow.run( user_msg="What's the current stock price of NVIDIA?" -- GitLab