Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Llama Index
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
run-llama
Llama Index
Commits
c963a9c7
Unverified
Commit
c963a9c7
authored
1 month ago
by
Daniel Bustamante Ospina
Committed by
GitHub
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/docs/understanding/agent/tools.md
+7
-0
7 additions, 0 deletions
docs/docs/understanding/agent/tools.md
with
7 additions
and
0 deletions
docs/docs/understanding/agent/tools.md
+
7
−
0
View file @
c963a9c7
...
@@ -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?
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment