Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Create Llama
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
Create Llama
Commits
bc2d503f
Commit
bc2d503f
authored
1 month ago
by
leehuwuj
Browse files
Options
Downloads
Patches
Plain Diff
raise error if there is no tools
parent
b4f07672
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/components/engines/python/agent/engine.py
+3
-1
3 additions, 1 deletion
templates/components/engines/python/agent/engine.py
with
3 additions
and
1 deletion
templates/components/engines/python/agent/engine.py
+
3
−
1
View file @
bc2d503f
...
...
@@ -3,7 +3,6 @@ from typing import List
from
llama_index.core.agent.workflow
import
AgentWorkflow
# from llama_index.core.agent import AgentRunner
from
llama_index.core.settings
import
Settings
from
llama_index.core.tools
import
BaseTool
...
...
@@ -29,6 +28,9 @@ def get_engine(params=None, **kwargs):
configured_tools
:
List
[
BaseTool
]
=
ToolFactory
.
from_env
()
tools
.
extend
(
configured_tools
)
if
len
(
tools
)
==
0
:
raise
RuntimeError
(
"
Please provide at least one tool!
"
)
return
AgentWorkflow
.
from_tools_or_functions
(
tools_or_functions
=
tools
,
# type: ignore
llm
=
Settings
.
llm
,
...
...
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