Don't allow None for org id (partial mypy only change) more to come (#2613)
This commit is contained in:
@@ -210,7 +210,7 @@ class ForgeAgent:
|
|||||||
)
|
)
|
||||||
return task, step
|
return task, step
|
||||||
|
|
||||||
async def create_task(self, task_request: TaskRequest, organization_id: str | None = None) -> Task:
|
async def create_task(self, task_request: TaskRequest, organization_id: str) -> Task:
|
||||||
webhook_callback_url = str(task_request.webhook_callback_url) if task_request.webhook_callback_url else None
|
webhook_callback_url = str(task_request.webhook_callback_url) if task_request.webhook_callback_url else None
|
||||||
totp_verification_url = str(task_request.totp_verification_url) if task_request.totp_verification_url else None
|
totp_verification_url = str(task_request.totp_verification_url) if task_request.totp_verification_url else None
|
||||||
task = await app.DATABASE.create_task(
|
task = await app.DATABASE.create_task(
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ class AgentFunction:
|
|||||||
return
|
return
|
||||||
|
|
||||||
async def validate_task_execution(
|
async def validate_task_execution(
|
||||||
self, organization_id: str | None = None, task_id: str | None = None, task_version: str | None = None
|
self, organization_id: str, task_id: str | None = None, task_version: str | None = None
|
||||||
) -> None:
|
) -> None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ class AgentDB:
|
|||||||
LOG.error("UnexpectedError", exc_info=True)
|
LOG.error("UnexpectedError", exc_info=True)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
async def get_task_steps(self, task_id: str, organization_id: str | None = None) -> list[Step]:
|
async def get_task_steps(self, task_id: str, organization_id: str) -> list[Step]:
|
||||||
try:
|
try:
|
||||||
async with self.Session() as session:
|
async with self.Session() as session:
|
||||||
if steps := (
|
if steps := (
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class Step(BaseModel):
|
|||||||
order: int
|
order: int
|
||||||
is_last: bool
|
is_last: bool
|
||||||
retry_index: int = 0
|
retry_index: int = 0
|
||||||
organization_id: str | None = None
|
organization_id: str
|
||||||
input_token_count: int = 0
|
input_token_count: int = 0
|
||||||
output_token_count: int = 0
|
output_token_count: int = 0
|
||||||
reasoning_token_count: int | None = None
|
reasoning_token_count: int | None = None
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ class Task(TaskBase):
|
|||||||
None,
|
None,
|
||||||
description="The reason for the task failure.",
|
description="The reason for the task failure.",
|
||||||
)
|
)
|
||||||
organization_id: str | None = None
|
organization_id: str
|
||||||
workflow_run_id: str | None = None
|
workflow_run_id: str | None = None
|
||||||
workflow_permanent_id: str | None = None
|
workflow_permanent_id: str | None = None
|
||||||
order: int | None = None
|
order: int | None = None
|
||||||
|
|||||||
Reference in New Issue
Block a user