Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
LAE
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
文靖昊
LAE
Commits
75467574
Commit
75467574
authored
Jul 17, 2024
by
tinywell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: Update agent.py to fix prompt handling and remove unused import
parent
9a5edb67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
agent.py
src/server/agent.py
+3
-4
No files found.
src/server/agent.py
View file @
75467574
...
...
@@ -3,7 +3,7 @@ from typing import Any, List, Sequence, Union
from
langchain_core.prompts
import
PromptTemplate
from
langchain.agents
import
AgentExecutor
,
create_tool_calling_agent
,
create_structured_chat_agent
from
langchain.tools
import
BaseTool
from
langgraph.prebuilt
import
create_react_agent
#
from langgraph.prebuilt import create_react_agent
from
langchain_core.language_models
import
BaseLanguageModel
...
...
@@ -115,9 +115,8 @@ class Agent:
self
.
prompt
=
prompt
if
not
prompt
:
agent
=
create_react_agent
(
llm
,
tools
,
debug
=
verbose
)
self
.
agent_executor
=
agent
else
:
raise
ValueError
(
"PromptTemplate is required"
)
agent
=
create_chart_agent
(
llm
,
tools
,
prompt
,
**
args
)
self
.
agent_executor
=
AgentExecutor
(
agent
=
agent
,
tools
=
tools
,
verbose
=
verbose
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment