refac
This commit is contained in:
@@ -187,10 +187,11 @@ def _resolve_model_features(app, model_id: str) -> dict:
|
|||||||
config = app.state.config
|
config = app.state.config
|
||||||
features = {}
|
features = {}
|
||||||
|
|
||||||
|
# code_interpreter is excluded: it requires the frontend event emitter
|
||||||
|
# and does not work in headless backend execution.
|
||||||
feature_checks = {
|
feature_checks = {
|
||||||
"web_search": getattr(config, "ENABLE_WEB_SEARCH", False),
|
"web_search": getattr(config, "ENABLE_WEB_SEARCH", False),
|
||||||
"image_generation": getattr(config, "ENABLE_IMAGE_GENERATION", False),
|
"image_generation": getattr(config, "ENABLE_IMAGE_GENERATION", False),
|
||||||
"code_interpreter": getattr(config, "ENABLE_CODE_INTERPRETER", False),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for feature_id in default_feature_ids:
|
for feature_id in default_feature_ids:
|
||||||
@@ -235,7 +236,7 @@ async def execute_automation(app, automation: AutomationModel) -> None:
|
|||||||
automation.user_id,
|
automation.user_id,
|
||||||
ChatForm(
|
ChatForm(
|
||||||
chat={
|
chat={
|
||||||
"title": f"[Automation] {automation.name}",
|
"title": automation.name,
|
||||||
"models": [model_id],
|
"models": [model_id],
|
||||||
"history": {
|
"history": {
|
||||||
"currentId": user_msg_id,
|
"currentId": user_msg_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user