-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtask_run.py
More file actions
56 lines (37 loc) · 1.56 KB
/
Copy pathtask_run.py
File metadata and controls
56 lines (37 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, List, Union, Optional
from typing_extensions import Literal
from pydantic import Field as FieldInfo
from .._models import BaseModel
from .shared.warning import Warning
from .shared.error_object import ErrorObject
__all__ = ["TaskRun"]
class TaskRun(BaseModel):
"""Status of a task run."""
created_at: Optional[str] = None
"""Timestamp of the creation of the task, as an RFC 3339 string."""
interaction_id: str
"""Identifier for this interaction.
Pass this value as `previous_interaction_id` to reuse context for a future
request.
"""
is_active: bool
"""Whether the run is currently active, i.e.
status is one of {'cancelling', 'queued', 'running'}.
"""
modified_at: Optional[str] = None
"""Timestamp of the last modification to the task, as an RFC 3339 string."""
processor: str
"""Processor used for the run."""
run_id: str
"""ID of the task run."""
status: Literal["queued", "action_required", "running", "completed", "failed", "cancelling", "cancelled"]
"""Status of the run."""
error: Optional[ErrorObject] = None
"""An error message."""
metadata: Optional[Dict[str, Union[str, float, bool]]] = None
"""User-provided metadata stored with the run."""
task_group_id: Optional[str] = FieldInfo(alias="taskgroup_id", default=None)
"""ID of the taskgroup to which the run belongs."""
warnings: Optional[List[Warning]] = None
"""Warnings for the run, if any."""