Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
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
ai-tech
dify
Commits
2d1cb076
Unverified
Commit
2d1cb076
authored
Oct 12, 2023
by
takatost
Committed by
GitHub
Oct 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: dataset segment not exist return agent response (#1329)
parent
289c93d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
multi_dataset_router_agent.py
api/core/agent/agent/multi_dataset_router_agent.py
+2
-0
structed_multi_dataset_router_agent.py
api/core/agent/agent/structed_multi_dataset_router_agent.py
+2
-0
No files found.
api/core/agent/agent/multi_dataset_router_agent.py
View file @
2d1cb076
...
...
@@ -79,6 +79,8 @@ class MultiDatasetRouterAgent(OpenAIFunctionsAgent):
if
isinstance
(
tool_inputs
,
dict
)
and
'query'
in
tool_inputs
:
tool_inputs
[
'query'
]
=
kwargs
[
'input'
]
agent_decision
.
tool_input
=
tool_inputs
else
:
agent_decision
.
return_values
[
'output'
]
=
''
return
agent_decision
except
Exception
as
e
:
new_exception
=
self
.
model_instance
.
handle_exceptions
(
e
)
...
...
api/core/agent/agent/structed_multi_dataset_router_agent.py
View file @
2d1cb076
...
...
@@ -107,6 +107,8 @@ class StructuredMultiDatasetRouterAgent(StructuredChatAgent):
if
isinstance
(
tool_inputs
,
dict
)
and
'query'
in
tool_inputs
:
tool_inputs
[
'query'
]
=
kwargs
[
'input'
]
agent_decision
.
tool_input
=
tool_inputs
else
:
agent_decision
.
return_values
[
'output'
]
=
''
return
agent_decision
except
OutputParserException
:
return
AgentFinish
({
"output"
:
"I'm sorry, the answer of model is invalid, "
...
...
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