-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrun_input.py
More file actions
72 lines (50 loc) · 2.33 KB
/
Copy pathrun_input.py
File metadata and controls
72 lines (50 loc) · 2.33 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, List, Union, Optional
from .webhook import Webhook
from .._models import BaseModel
from .task_spec import TaskSpec
from .mcp_server import McpServer
from .shared.source_policy import SourcePolicy
from .task_advanced_settings import TaskAdvancedSettings
__all__ = ["RunInput"]
class RunInput(BaseModel):
"""Request to run a task."""
input: Union[str, Dict[str, object]]
"""Input to the task, either text or a JSON object."""
processor: str
"""Processor to use for the task."""
advanced_settings: Optional[TaskAdvancedSettings] = None
"""Advanced search configuration for a task run."""
enable_events: Optional[bool] = None
"""Controls tracking of task run execution progress.
When set to true, progress events are recorded and can be accessed via the
[Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
no progress events are tracked. Note that progress tracking cannot be enabled
after a run has been created. The flag is set to true by default for premium
processors (pro and above).
"""
mcp_servers: Optional[List[McpServer]] = None
"""Optional list of MCP servers to use for the run."""
memory_scope_key: Optional[str] = None
"""User-provided key identifying the memory scope to use.
Omit to use personal memory, if available.
"""
metadata: Optional[Dict[str, Union[str, float, bool]]] = None
"""User-provided metadata stored with the run.
Keys and values must be strings with a maximum length of 16 and 512 characters
respectively.
"""
previous_interaction_id: Optional[str] = None
"""Interaction ID to use as context for this request."""
source_policy: Optional[SourcePolicy] = None
"""Source policy for web search results.
This policy governs which sources are allowed/disallowed in results.
"""
task_spec: Optional[TaskSpec] = None
"""Specification for a task.
Auto output schemas can be specified by setting `output_schema={"type":"auto"}`.
Not specifying a TaskSpec is the same as setting an auto output schema.
For convenience bare strings are also accepted as input or output schemas.
"""
webhook: Optional[Webhook] = None
"""Webhooks for Task Runs."""