mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-31 19:45:15 +02:00
feat(automations): static_inputs on triggers + vertical-slice api/services
This commit is contained in:
parent
84d99f19a2
commit
27ab367a13
27 changed files with 915 additions and 356 deletions
|
|
@ -11,7 +11,7 @@ AGENT_TASK_ACTION = ActionDefinition(
|
|||
type="agent_task",
|
||||
name="Agent task",
|
||||
description="Run a multi_agent_chat turn from an automation step.",
|
||||
params_schema=AgentTaskActionParams.model_json_schema(),
|
||||
params_model=AgentTaskActionParams,
|
||||
build_handler=build_handler,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ from dataclasses import dataclass
|
|||
from typing import Any
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
|
||||
|
|
@ -30,5 +31,10 @@ class ActionDefinition:
|
|||
type: str
|
||||
name: str
|
||||
description: str
|
||||
params_schema: dict[str, Any]
|
||||
params_model: type[BaseModel]
|
||||
build_handler: ActionHandlerFactory
|
||||
|
||||
@property
|
||||
def params_schema(self) -> dict[str, Any]:
|
||||
"""JSON Schema (draft 2020-12) derived from ``params_model``."""
|
||||
return self.params_model.model_json_schema()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue