mirror of
https://github.com/langgenius/dify.git
synced 2026-05-01 16:08:04 +08:00
refactor apps
This commit is contained in:
@ -105,6 +105,18 @@ class App(db.Model):
|
||||
tenant = db.session.query(Tenant).filter(Tenant.id == self.tenant_id).first()
|
||||
return tenant
|
||||
|
||||
@property
|
||||
def is_agent(self) -> bool:
|
||||
app_model_config = self.app_model_config
|
||||
if not app_model_config:
|
||||
return False
|
||||
if not app_model_config.agent_mode:
|
||||
return False
|
||||
if self.app_model_config.agent_mode_dict.get('enabled', False) \
|
||||
and self.app_model_config.agent_mode_dict.get('strategy', '') in ['function_call', 'react']:
|
||||
return True
|
||||
return False
|
||||
|
||||
@property
|
||||
def deleted_tools(self) -> list:
|
||||
# get agent mode tools
|
||||
|
||||
Reference in New Issue
Block a user