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
82247c0f
Unverified
Commit
82247c0f
authored
Jan 03, 2024
by
takatost
Committed by
GitHub
Jan 03, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: agent strategy missing in app model config (#1863)
parent
d70d61b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
application_manager.py
api/core/application_manager.py
+4
-3
No files found.
api/core/application_manager.py
View file @
82247c0f
...
@@ -376,7 +376,8 @@ class ApplicationManager:
...
@@ -376,7 +376,8 @@ class ApplicationManager:
and
'enabled'
in
copy_app_model_config_dict
[
'agent_mode'
]
and
copy_app_model_config_dict
[
'agent_mode'
][
and
'enabled'
in
copy_app_model_config_dict
[
'agent_mode'
]
and
copy_app_model_config_dict
[
'agent_mode'
][
'enabled'
]:
'enabled'
]:
agent_dict
=
copy_app_model_config_dict
.
get
(
'agent_mode'
)
agent_dict
=
copy_app_model_config_dict
.
get
(
'agent_mode'
)
if
agent_dict
[
'strategy'
]
in
[
'router'
,
'react_router'
]:
agent_strategy
=
agent_dict
.
get
(
'strategy'
,
'router'
)
if
agent_strategy
in
[
'router'
,
'react_router'
]:
dataset_ids
=
[]
dataset_ids
=
[]
for
tool
in
agent_dict
.
get
(
'tools'
,
[]):
for
tool
in
agent_dict
.
get
(
'tools'
,
[]):
key
=
list
(
tool
.
keys
())[
0
]
key
=
list
(
tool
.
keys
())[
0
]
...
@@ -402,7 +403,7 @@ class ApplicationManager:
...
@@ -402,7 +403,7 @@ class ApplicationManager:
retrieve_strategy
=
DatasetRetrieveConfigEntity
.
RetrieveStrategy
.
value_of
(
retrieve_strategy
=
DatasetRetrieveConfigEntity
.
RetrieveStrategy
.
value_of
(
dataset_configs
[
'retrieval_model'
]
dataset_configs
[
'retrieval_model'
]
),
),
single_strategy
=
agent_
dict
[
'strategy'
]
single_strategy
=
agent_
strategy
)
)
)
)
else
:
else
:
...
@@ -419,7 +420,7 @@ class ApplicationManager:
...
@@ -419,7 +420,7 @@ class ApplicationManager:
)
)
)
)
else
:
else
:
if
agent_
dict
[
'strategy'
]
==
'react'
:
if
agent_
strategy
==
'react'
:
strategy
=
AgentEntity
.
Strategy
.
CHAIN_OF_THOUGHT
strategy
=
AgentEntity
.
Strategy
.
CHAIN_OF_THOUGHT
else
:
else
:
strategy
=
AgentEntity
.
Strategy
.
FUNCTION_CALLING
strategy
=
AgentEntity
.
Strategy
.
FUNCTION_CALLING
...
...
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