Skip to content
Snippets Groups Projects
Unverified Commit c963a9c7 authored by Daniel Bustamante Ospina's avatar Daniel Bustamante Ospina Committed by GitHub
Browse files

Add code snippet in tool agent docs for clarity (#18005)

parent 3669383d
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,13 @@ finance_tools.extend([multiply, add]) ...@@ -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: And we'll ask a different question than last time, necessitating the use of the new tools:
```python ```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(): async def main():
response = await workflow.run( response = await workflow.run(
user_msg="What's the current stock price of NVIDIA?" user_msg="What's the current stock price of NVIDIA?"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment