add error_code_mapping and extracted_information_schema to task v2 (#1950)
This commit is contained in:
@@ -588,6 +588,8 @@ class TaskV2Model(Base):
|
||||
totp_verification_url = Column(String, nullable=True)
|
||||
totp_identifier = Column(String, nullable=True)
|
||||
proxy_location = Column(String, nullable=True)
|
||||
extracted_information_schema = Column(JSON, nullable=True)
|
||||
error_code_mapping = Column(JSON, nullable=True)
|
||||
|
||||
created_at = Column(DateTime, default=datetime.datetime.utcnow, nullable=False)
|
||||
modified_at = Column(DateTime, default=datetime.datetime.utcnow, onupdate=datetime.datetime.utcnow, nullable=False)
|
||||
|
||||
@@ -41,6 +41,8 @@ class TaskV2(BaseModel):
|
||||
totp_identifier: str | None = None
|
||||
proxy_location: ProxyLocation | None = None
|
||||
webhook_callback_url: str | None = None
|
||||
extracted_information_schema: dict | list | str | None = None
|
||||
error_code_mapping: dict | None = None
|
||||
|
||||
created_at: datetime
|
||||
modified_at: datetime
|
||||
@@ -117,6 +119,8 @@ class TaskV2Request(BaseModel):
|
||||
totp_identifier: str | None = None
|
||||
proxy_location: ProxyLocation | None = None
|
||||
publish_workflow: bool = False
|
||||
extracted_information_schema: dict | list | str | None = None
|
||||
error_code_mapping: dict[str, str] | None = None
|
||||
|
||||
@field_validator("url", "webhook_callback_url", "totp_verification_url")
|
||||
@classmethod
|
||||
|
||||
@@ -1395,6 +1395,7 @@ async def _summarize_task_v2(
|
||||
"task_v2_summary",
|
||||
user_goal=task_v2.prompt,
|
||||
task_history=task_history,
|
||||
extracted_information_schema=task_v2.extracted_information_schema,
|
||||
local_datetime=datetime.now(context.tz_info).isoformat(),
|
||||
)
|
||||
task_v2_summary_resp = await app.LLM_API_HANDLER(
|
||||
|
||||
Reference in New Issue
Block a user