mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 00:48:04 +08:00
fix: resolve remaining CI failures
- app_model_config_service.py: add AppMode.AGENT to exhaustive match - app_service.py: fix possibly unbound default_model_dict variable Made-with: Cursor
This commit is contained in:
@ -14,5 +14,5 @@ class AppModelConfigService:
|
||||
return AgentChatAppConfigManager.config_validate(tenant_id, config)
|
||||
case AppMode.COMPLETION:
|
||||
return CompletionAppConfigManager.config_validate(tenant_id, config)
|
||||
case AppMode.WORKFLOW | AppMode.ADVANCED_CHAT | AppMode.CHANNEL | AppMode.RAG_PIPELINE:
|
||||
case AppMode.WORKFLOW | AppMode.ADVANCED_CHAT | AppMode.AGENT | AppMode.CHANNEL | AppMode.RAG_PIPELINE:
|
||||
raise ValueError(f"Invalid app mode: {app_mode}")
|
||||
|
||||
@ -173,7 +173,8 @@ class AppService:
|
||||
db.session.commit()
|
||||
|
||||
if app_mode == AppMode.AGENT:
|
||||
self._init_agent_workflow(app, account, default_model_dict if default_model_config else None)
|
||||
model_dict = default_model_config.get("model") if default_model_config else None
|
||||
self._init_agent_workflow(app, account, model_dict)
|
||||
|
||||
app_was_created.send(app, account=account)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user