mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 02:45:53 +08:00
fix: retriever_resource missing (#1317)
This commit is contained in:
parent
cbf095465c
commit
9cba1c8bf4
@ -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,
|
||||||
return_resource: bool = False, retriever_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'):
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user