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
9cba1c8b
Unverified
Commit
9cba1c8b
authored
Oct 11, 2023
by
takatost
Committed by
GitHub
Oct 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: retriever_resource missing (#1317)
parent
cbf09546
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
orchestrator_rule_parser.py
api/core/orchestrator_rule_parser.py
+2
-1
dataset_retriever_tool.py
api/core/tool/dataset_retriever_tool.py
+1
-1
model.py
api/models/model.py
+2
-1
No files found.
api/core/orchestrator_rule_parser.py
View file @
9cba1c8b
...
@@ -37,12 +37,13 @@ class OrchestratorRuleParser:
...
@@ -37,12 +37,13 @@ class OrchestratorRuleParser:
def
to_agent_executor
(
self
,
conversation_message_task
:
ConversationMessageTask
,
memory
:
Optional
[
BaseChatMemory
],
def
to_agent_executor
(
self
,
conversation_message_task
:
ConversationMessageTask
,
memory
:
Optional
[
BaseChatMemory
],
rest_tokens
:
int
,
chain_callback
:
MainChainGatherCallbackHandler
,
rest_tokens
:
int
,
chain_callback
:
MainChainGatherCallbackHandler
,
ret
urn_resource
:
bool
=
False
,
ret
riever_from
:
str
=
'dev'
)
->
Optional
[
AgentExecutor
]:
retriever_from
:
str
=
'dev'
)
->
Optional
[
AgentExecutor
]:
if
not
self
.
app_model_config
.
agent_mode_dict
:
if
not
self
.
app_model_config
.
agent_mode_dict
:
return
None
return
None
agent_mode_config
=
self
.
app_model_config
.
agent_mode_dict
agent_mode_config
=
self
.
app_model_config
.
agent_mode_dict
model_dict
=
self
.
app_model_config
.
model_dict
model_dict
=
self
.
app_model_config
.
model_dict
return_resource
=
self
.
app_model_config
.
retriever_resource_dict
.
get
(
'enabled'
,
False
)
chain
=
None
chain
=
None
if
agent_mode_config
and
agent_mode_config
.
get
(
'enabled'
):
if
agent_mode_config
and
agent_mode_config
.
get
(
'enabled'
):
...
...
api/core/tool/dataset_retriever_tool.py
View file @
9cba1c8b
...
@@ -30,7 +30,7 @@ class DatasetRetrieverTool(BaseTool):
...
@@ -30,7 +30,7 @@ class DatasetRetrieverTool(BaseTool):
dataset_id
:
str
dataset_id
:
str
k
:
int
=
3
k
:
int
=
3
conversation_message_task
:
ConversationMessageTask
conversation_message_task
:
ConversationMessageTask
return_resource
:
str
return_resource
:
bool
retriever_from
:
str
retriever_from
:
str
@
classmethod
@
classmethod
...
...
api/models/model.py
View file @
9cba1c8b
...
@@ -196,7 +196,8 @@ class AppModelConfig(db.Model):
...
@@ -196,7 +196,8 @@ class AppModelConfig(db.Model):
user_input_form
=
self
.
user_input_form
,
user_input_form
=
self
.
user_input_form
,
dataset_query_variable
=
self
.
dataset_query_variable
,
dataset_query_variable
=
self
.
dataset_query_variable
,
pre_prompt
=
self
.
pre_prompt
,
pre_prompt
=
self
.
pre_prompt
,
agent_mode
=
self
.
agent_mode
agent_mode
=
self
.
agent_mode
,
retriever_resource
=
self
.
retriever_resource
)
)
return
new_app_model_config
return
new_app_model_config
...
...
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