retab 0.0.35__py3-none-any.whl → 0.0.37__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. {uiform → retab}/_utils/ai_models.py +2 -2
  2. {uiform → retab}/_utils/benchmarking.py +15 -16
  3. {uiform → retab}/_utils/chat.py +9 -14
  4. {uiform → retab}/_utils/display.py +0 -3
  5. {uiform → retab}/_utils/json_schema.py +9 -14
  6. {uiform → retab}/_utils/mime.py +11 -14
  7. {uiform → retab}/_utils/responses.py +9 -3
  8. {uiform → retab}/_utils/stream_context_managers.py +1 -1
  9. {uiform → retab}/_utils/usage/usage.py +28 -28
  10. {uiform → retab}/client.py +32 -31
  11. {uiform → retab}/resources/consensus/client.py +17 -36
  12. {uiform → retab}/resources/consensus/completions.py +24 -47
  13. {uiform → retab}/resources/consensus/completions_stream.py +26 -38
  14. {uiform → retab}/resources/consensus/responses.py +31 -80
  15. {uiform → retab}/resources/consensus/responses_stream.py +31 -79
  16. {uiform → retab}/resources/documents/client.py +59 -45
  17. {uiform → retab}/resources/documents/extractions.py +181 -90
  18. {uiform → retab}/resources/evals.py +56 -43
  19. retab/resources/evaluations/__init__.py +3 -0
  20. retab/resources/evaluations/client.py +301 -0
  21. retab/resources/evaluations/documents.py +233 -0
  22. retab/resources/evaluations/iterations.py +452 -0
  23. {uiform → retab}/resources/files.py +2 -2
  24. {uiform → retab}/resources/jsonlUtils.py +220 -216
  25. retab/resources/models.py +73 -0
  26. retab/resources/processors/automations/client.py +244 -0
  27. {uiform → retab}/resources/processors/automations/endpoints.py +77 -118
  28. retab/resources/processors/automations/links.py +294 -0
  29. {uiform → retab}/resources/processors/automations/logs.py +30 -19
  30. {uiform → retab}/resources/processors/automations/mailboxes.py +136 -174
  31. retab/resources/processors/automations/outlook.py +337 -0
  32. {uiform → retab}/resources/processors/automations/tests.py +22 -25
  33. {uiform → retab}/resources/processors/client.py +179 -164
  34. {uiform → retab}/resources/schemas.py +78 -66
  35. {uiform → retab}/resources/secrets/external_api_keys.py +1 -5
  36. retab/resources/secrets/webhook.py +64 -0
  37. {uiform → retab}/resources/usage.py +39 -2
  38. {uiform → retab}/types/ai_models.py +13 -13
  39. {uiform → retab}/types/automations/cron.py +19 -12
  40. {uiform → retab}/types/automations/endpoints.py +7 -4
  41. {uiform → retab}/types/automations/links.py +7 -3
  42. {uiform → retab}/types/automations/mailboxes.py +9 -9
  43. {uiform → retab}/types/automations/outlook.py +15 -11
  44. retab/types/browser_canvas.py +3 -0
  45. {uiform → retab}/types/chat.py +2 -2
  46. {uiform → retab}/types/completions.py +9 -12
  47. retab/types/consensus.py +19 -0
  48. {uiform → retab}/types/db/annotations.py +3 -3
  49. {uiform → retab}/types/db/files.py +8 -6
  50. {uiform → retab}/types/documents/create_messages.py +18 -20
  51. {uiform → retab}/types/documents/extractions.py +69 -24
  52. {uiform → retab}/types/evals.py +5 -5
  53. retab/types/evaluations/__init__.py +31 -0
  54. retab/types/evaluations/documents.py +30 -0
  55. retab/types/evaluations/iterations.py +112 -0
  56. retab/types/evaluations/model.py +73 -0
  57. retab/types/events.py +79 -0
  58. {uiform → retab}/types/extractions.py +33 -10
  59. retab/types/inference_settings.py +15 -0
  60. retab/types/jobs/base.py +54 -0
  61. retab/types/jobs/batch_annotation.py +12 -0
  62. {uiform → retab}/types/jobs/evaluation.py +1 -2
  63. {uiform → retab}/types/logs.py +37 -34
  64. retab/types/metrics.py +32 -0
  65. {uiform → retab}/types/mime.py +22 -20
  66. {uiform → retab}/types/modalities.py +10 -10
  67. retab/types/predictions.py +19 -0
  68. {uiform → retab}/types/schemas/enhance.py +4 -2
  69. {uiform → retab}/types/schemas/evaluate.py +7 -4
  70. {uiform → retab}/types/schemas/generate.py +6 -3
  71. {uiform → retab}/types/schemas/layout.py +1 -1
  72. {uiform → retab}/types/schemas/object.py +13 -14
  73. {uiform → retab}/types/schemas/templates.py +1 -3
  74. {uiform → retab}/types/secrets/external_api_keys.py +0 -1
  75. {uiform → retab}/types/standards.py +18 -1
  76. {retab-0.0.35.dist-info → retab-0.0.37.dist-info}/METADATA +7 -6
  77. retab-0.0.37.dist-info/RECORD +107 -0
  78. retab-0.0.37.dist-info/top_level.txt +1 -0
  79. retab-0.0.35.dist-info/RECORD +0 -111
  80. retab-0.0.35.dist-info/top_level.txt +0 -1
  81. uiform/_utils/benchmarking copy.py +0 -588
  82. uiform/resources/deployments/__init__.py +0 -9
  83. uiform/resources/deployments/client.py +0 -78
  84. uiform/resources/deployments/endpoints.py +0 -322
  85. uiform/resources/deployments/links.py +0 -452
  86. uiform/resources/deployments/logs.py +0 -211
  87. uiform/resources/deployments/mailboxes.py +0 -496
  88. uiform/resources/deployments/outlook.py +0 -531
  89. uiform/resources/deployments/tests.py +0 -158
  90. uiform/resources/models.py +0 -45
  91. uiform/resources/processors/automations/client.py +0 -78
  92. uiform/resources/processors/automations/links.py +0 -356
  93. uiform/resources/processors/automations/outlook.py +0 -444
  94. uiform/resources/secrets/webhook.py +0 -62
  95. uiform/types/consensus.py +0 -10
  96. uiform/types/deployments/cron.py +0 -59
  97. uiform/types/deployments/endpoints.py +0 -28
  98. uiform/types/deployments/links.py +0 -36
  99. uiform/types/deployments/mailboxes.py +0 -67
  100. uiform/types/deployments/outlook.py +0 -76
  101. uiform/types/deployments/webhooks.py +0 -21
  102. uiform/types/events.py +0 -76
  103. uiform/types/jobs/base.py +0 -150
  104. uiform/types/jobs/batch_annotation.py +0 -22
  105. uiform/types/secrets/__init__.py +0 -0
  106. {uiform → retab}/__init__.py +0 -0
  107. {uiform → retab}/_resource.py +0 -0
  108. {uiform → retab}/_utils/__init__.py +0 -0
  109. {uiform → retab}/_utils/usage/__init__.py +0 -0
  110. {uiform → retab}/py.typed +0 -0
  111. {uiform → retab}/resources/__init__.py +0 -0
  112. {uiform → retab}/resources/consensus/__init__.py +0 -0
  113. {uiform → retab}/resources/documents/__init__.py +0 -0
  114. {uiform → retab}/resources/finetuning.py +0 -0
  115. {uiform → retab}/resources/openai_example.py +0 -0
  116. {uiform → retab}/resources/processors/__init__.py +0 -0
  117. {uiform → retab}/resources/processors/automations/__init__.py +0 -0
  118. {uiform → retab}/resources/prompt_optimization.py +0 -0
  119. {uiform → retab}/resources/secrets/__init__.py +0 -0
  120. {uiform → retab}/resources/secrets/client.py +0 -0
  121. {uiform → retab}/types/__init__.py +0 -0
  122. {uiform → retab}/types/automations/__init__.py +0 -0
  123. {uiform → retab}/types/automations/webhooks.py +0 -0
  124. {uiform → retab}/types/db/__init__.py +0 -0
  125. {uiform/types/deployments → retab/types/documents}/__init__.py +0 -0
  126. {uiform → retab}/types/documents/correct_orientation.py +0 -0
  127. {uiform/types/documents → retab/types/jobs}/__init__.py +0 -0
  128. {uiform → retab}/types/jobs/finetune.py +0 -0
  129. {uiform → retab}/types/jobs/prompt_optimization.py +0 -0
  130. {uiform → retab}/types/jobs/webcrawl.py +0 -0
  131. {uiform → retab}/types/pagination.py +0 -0
  132. {uiform/types/jobs → retab/types/schemas}/__init__.py +0 -0
  133. {uiform/types/schemas → retab/types/secrets}/__init__.py +0 -0
  134. {retab-0.0.35.dist-info → retab-0.0.37.dist-info}/WHEEL +0 -0
@@ -1,67 +0,0 @@
1
- import copy
2
- import datetime
3
- import json
4
- import os
5
- import re
6
- from typing import Any, ClassVar, Dict, List, Literal, Optional
7
-
8
- import nanoid # type: ignore
9
- from pydantic import BaseModel, EmailStr, Field, HttpUrl, computed_field, field_serializer, field_validator
10
- from pydantic_core import Url
11
-
12
- from ..._utils.json_schema import clean_schema
13
- from ..._utils.mime import generate_blake2b_hash_from_string
14
- from ..modalities import Modality
15
- from ..pagination import ListMetadata
16
-
17
- domain_pattern = re.compile(r"^(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$")
18
-
19
- from openai.types.chat.chat_completion_reasoning_effort import ChatCompletionReasoningEffort
20
-
21
- from ..logs import AutomationConfig, UpdateAutomationRequest
22
-
23
-
24
- class Mailbox(AutomationConfig):
25
- EMAIL_PATTERN: ClassVar[str] = f".*@{os.getenv('EMAIL_DOMAIN', 'mailbox.uiform.com')}$"
26
- object: Literal['deployment.mailbox'] = "deployment.mailbox"
27
- id: str = Field(default_factory=lambda: "mb_" + nanoid.generate(), description="Unique identifier for the mailbox")
28
-
29
- # Email Specific config
30
- email: str = Field(..., pattern=EMAIL_PATTERN)
31
- authorized_domains: list[str] = Field(default_factory=list, description="List of authorized domains to receive the emails from")
32
- authorized_emails: List[EmailStr] = Field(default_factory=list, description="List of emails to access the link")
33
-
34
- # Normalize email fields (case-insensitive)
35
- @field_validator("email", mode="before")
36
- def normalize_email(cls, value: str) -> str:
37
- return value.strip().lower()
38
-
39
- @field_validator("authorized_emails", mode="before")
40
- def normalize_authorized_emails(cls, emails: List[str]) -> List[str]:
41
- return [email.strip().lower() for email in emails]
42
-
43
- @field_validator('authorized_domains', mode='before')
44
- def validate_domain(cls, list_domains: list[str]) -> list[str]:
45
- for domain in list_domains:
46
- if not domain_pattern.match(domain):
47
- raise ValueError(f"Invalid domain: {domain}")
48
- return list_domains
49
-
50
-
51
- class ListMailboxes(BaseModel):
52
- data: list[Mailbox]
53
- list_metadata: ListMetadata
54
-
55
-
56
- # Inherits from the methods of UpdateAutomationRequest
57
- class UpdateMailboxRequest(UpdateAutomationRequest):
58
-
59
- # ------------------------------
60
- # Email Specific config
61
- # ------------------------------
62
- authorized_domains: Optional[list[str]] = None
63
- authorized_emails: Optional[List[EmailStr]] = None
64
-
65
- @field_validator("authorized_emails", mode="before")
66
- def normalize_authorized_emails(cls, emails: Optional[List[str]]) -> Optional[List[str]]:
67
- return [email.strip().lower() for email in emails] if emails else None
@@ -1,76 +0,0 @@
1
- import copy
2
- import datetime
3
- import json
4
- import os
5
- import re
6
- from typing import Any, ClassVar, Dict, List, Literal, Optional
7
-
8
- import nanoid # type: ignore
9
- from openai.types.chat.chat_completion_reasoning_effort import ChatCompletionReasoningEffort
10
- from pydantic import BaseModel, EmailStr, Field, HttpUrl, computed_field, field_serializer, field_validator, model_validator
11
- from pydantic_core import Url
12
-
13
- from ..._utils.json_schema import clean_schema, convert_schema_to_layout
14
- from ..._utils.mime import generate_blake2b_hash_from_string
15
- from ..logs import AutomationConfig, UpdateAutomationRequest
16
- from ..modalities import Modality
17
- from ..pagination import ListMetadata
18
-
19
- domain_pattern = re.compile(r"^(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$")
20
-
21
-
22
- class AutomationLevel(BaseModel):
23
- distance_threshold: float = Field(default=0.9, description="Distance threshold for the automation")
24
- score_threshold: float = Field(default=0.9, description="Score threshold for the automation")
25
-
26
-
27
- class MatchParams(BaseModel):
28
- endpoint: str = Field(..., description="Endpoint for matching parameters")
29
- headers: Dict[str, str] = Field(..., description="Headers for the request")
30
- path: str = Field(..., description="Path for matching parameters")
31
-
32
-
33
- class FetchParams(BaseModel):
34
- endpoint: str = Field(..., description="Endpoint for fetching parameters")
35
- headers: Dict[str, str] = Field(..., description="Headers for the request")
36
- name: str = Field(..., description="Name of the fetch parameter")
37
-
38
-
39
- class Outlook(AutomationConfig):
40
- object: Literal['deployment.outlook'] = "deployment.outlook"
41
- id: str = Field(default_factory=lambda: "outlook_" + nanoid.generate(), description="Unique identifier for the outlook")
42
-
43
- authorized_domains: list[str] = Field(default_factory=list, description="List of authorized domains to receive the emails from")
44
- authorized_emails: List[EmailStr] = Field(default_factory=list, description="List of emails to access the link")
45
-
46
- layout_schema: Optional[dict[str, Any]] = Field(default=None, description="Layout schema format used to display the data")
47
-
48
- # Optional Fields for data integration
49
- match_params: List[MatchParams] = Field(default_factory=list, description="List of match parameters for the outlook automation")
50
- fetch_params: List[FetchParams] = Field(default_factory=list, description="List of fetch parameters for the outlook automation")
51
-
52
- @model_validator(mode='before')
53
- @classmethod
54
- def compute_layout_schema(cls, values: dict[str, Any]) -> dict[str, Any]:
55
- if values.get('layout_schema') is None:
56
- values['layout_schema'] = convert_schema_to_layout(values['json_schema'])
57
- return values
58
-
59
- class ListOutlooks(BaseModel):
60
- data: list[Outlook]
61
- list_metadata: ListMetadata
62
-
63
-
64
- # Inherits from the methods of UpdateAutomationRequest
65
- class UpdateOutlookRequest(UpdateAutomationRequest):
66
- authorized_domains: Optional[list[str]] = None
67
- authorized_emails: Optional[List[EmailStr]] = None
68
-
69
- match_params: Optional[List[MatchParams]] = None
70
- fetch_params: Optional[List[FetchParams]] = None
71
-
72
- layout_schema: Optional[dict[str, Any]] = None
73
-
74
- @field_validator("authorized_emails", mode="before")
75
- def normalize_authorized_emails(cls, emails: Optional[List[str]]) -> Optional[List[str]]:
76
- return [email.strip().lower() for email in emails] if emails else None
@@ -1,21 +0,0 @@
1
- from typing import Any, Optional
2
-
3
- from pydantic import BaseModel, EmailStr
4
-
5
- from uiform.types.documents.extractions import UiParsedChatCompletion
6
-
7
- from ..mime import BaseMIMEData, MIMEData
8
-
9
-
10
- class WebhookRequest(BaseModel):
11
- completion: UiParsedChatCompletion
12
- user: Optional[EmailStr] = None
13
- file_payload: MIMEData
14
- metadata: Optional[dict[str, Any]] = None
15
-
16
-
17
- class BaseWebhookRequest(BaseModel):
18
- completion: UiParsedChatCompletion
19
- user: Optional[EmailStr] = None
20
- file_payload: BaseMIMEData
21
- metadata: Optional[dict[str, Any]] = None
uiform/types/events.py DELETED
@@ -1,76 +0,0 @@
1
- import datetime
2
- from typing import Any, Literal, Optional
3
-
4
- import nanoid # type: ignore
5
- from pydantic import BaseModel, Field
6
-
7
- metadata_key = Literal[
8
- 'user',
9
- 'organization',
10
- 'link',
11
- 'mailbox',
12
- 'cron',
13
- 'outlook',
14
- 'extraction',
15
- 'webhook',
16
- 'reconciliation',
17
- 'preprocessing',
18
- 'schema',
19
- 'data_structure',
20
- 'file',
21
- 'preprocessing',
22
- 'dataset',
23
- 'dataset_membership',
24
- 'endpoint',
25
- 'automation',
26
- 'template',
27
- ]
28
-
29
- event_type = Literal[
30
- 'extraction.created',
31
- 'messages.created',
32
- 'document.orientation_corrected',
33
- 'consensus.reconciled',
34
- 'automation.created',
35
- 'automation.updated',
36
- 'automation.deleted',
37
- 'automation.webhook',
38
- 'preprocessing.created',
39
- 'link.created',
40
- 'link.updated',
41
- 'link.deleted',
42
- 'link.webhook',
43
- 'mailbox.created',
44
- 'mailbox.updated',
45
- 'mailbox.deleted',
46
- 'mailbox.webhook',
47
- 'outlook.created',
48
- 'outlook.updated',
49
- 'outlook.deleted',
50
- 'outlook.webhook',
51
- 'schema.generated',
52
- 'schema.promptified',
53
- 'schema.system_promptfile.created',
54
- 'file.updated',
55
- 'file.deleted',
56
- 'template.created',
57
- 'template.deleted',
58
- 'template.sample_document_uploaded',
59
- 'template.sample_document_deleted',
60
- 'template.updated',
61
- ]
62
-
63
-
64
- class Event(BaseModel):
65
- object: Literal['event'] = "event"
66
- id: str = Field(default_factory=lambda: "event_" + nanoid.generate(), description="Unique identifier for the event")
67
- event: str = Field(..., description="A string that distinguishes the event type. Ex: user.created, user.updated, user.deleted, etc.")
68
- created_at: datetime.datetime = Field(default_factory=lambda: datetime.datetime.now(datetime.timezone.utc))
69
- data: dict[str, Any] = Field(..., description="Event payload. Payloads match the corresponding API objects.")
70
- metadata: Optional[dict[metadata_key, str]] = Field(
71
- default=None, description="Ids giving informations about the event. Ex: user.created.metadata = {'user': 'usr_8478973619047837'}"
72
- )
73
-
74
-
75
- class StoredEvent(Event):
76
- organization_id: str = Field(..., description="Organization ID")
uiform/types/jobs/base.py DELETED
@@ -1,150 +0,0 @@
1
- from typing import Literal, Optional, Self
2
-
3
- from openai.types.chat.chat_completion_reasoning_effort import ChatCompletionReasoningEffort
4
- from pydantic import BaseModel, Field, model_validator
5
-
6
- from ..modalities import Modality
7
-
8
- SelectionMode = Literal["all", "manual"]
9
-
10
-
11
- # This is the input data for the prepare_dataset job
12
- class PrepareDatasetInputData(BaseModel):
13
- dataset_id: Optional[str] = None
14
- schema_id: Optional[str] = None
15
- schema_data_id: Optional[str] = None
16
-
17
- selection_model: SelectionMode = "all"
18
-
19
- @model_validator(mode="after")
20
- def validate_input(self) -> Self:
21
- # The preference is:
22
- # 1. dataset_id
23
- # 2. schema_id
24
- # 3. schema_data_id
25
- if self.dataset_id is None and self.schema_id is None and self.schema_data_id is None:
26
- raise ValueError("At least one of dataset_id, schema_id, or schema_data_id must be provided")
27
-
28
- return self
29
-
30
-
31
- # This is the input data for the split_dataset job
32
- class DatasetSplitInputData(BaseModel):
33
- dataset_id: str
34
- train_size: Optional[int | float] = None
35
- eval_size: Optional[int | float] = None
36
-
37
- @model_validator(mode="after")
38
- def validate_input(self) -> Self:
39
- if self.train_size is not None and self.eval_size is not None:
40
- raise ValueError("train_size and eval_size cannot both be provided")
41
- return self
42
-
43
-
44
- # This is the input data for the batch annotation job
45
- class InferenceSettings(BaseModel):
46
- model: str = "gpt-4o-mini"
47
- temperature: float = 0.0
48
- modality: Modality = "native"
49
- reasoning_effort: ChatCompletionReasoningEffort = "medium"
50
- image_resolution_dpi: int = 96
51
- browser_canvas: Literal['A3', 'A4', 'A5'] = 'A4'
52
- n_consensus: int = Field(default=1, description="Number of consensus rounds to perform")
53
-
54
-
55
- class AnnotationInputData(BaseModel):
56
- data_file: str
57
- schema_id: str
58
- inference_settings: InferenceSettings
59
-
60
-
61
- # This is the input data for the evaluation job
62
- class EvaluationInputData(BaseModel):
63
- eval_data_file: str
64
- schema_id: str
65
- inference_settings_1: InferenceSettings | None = None
66
- inference_settings_2: InferenceSettings
67
-
68
-
69
- # from pydantic import BaseModel, Field, model_validator
70
- # from typing import Literal, Optional, Any
71
- # import datetime
72
-
73
-
74
- # JobType = Literal["prompt-optimization", "annotate-files", "finetune-dataset", "webcrawl"]
75
- # JobStatus = Literal["pending", "running", "completed", "failed"]
76
- #### JOBS ####
77
-
78
- # class JobTemplateCreateRequest(BaseModel):
79
- # job_type: JobType
80
- # default_input_data: dict = Field(default_factory=dict)
81
- # description: Optional[str] = None
82
- # cron: Optional[str] = None
83
-
84
-
85
- # class JobTemplateDocument(BaseModel):
86
- # object: Literal["job_template"] = "job_template"
87
- # id: str
88
- # type: JobType
89
- # identity: Any | None = None
90
- # description: Optional[str] = None
91
- # default_input_data: dict = Field(default_factory=dict)
92
- # # For scheduled jobs, include a valid CRON expression (None for on-demand only jobs)
93
- # cron: Optional[str] = None
94
- # next_run: Optional[datetime.datetime] = None
95
- # created_at: Optional[datetime.datetime] = None
96
- # updated_at: Optional[datetime.datetime] = None
97
- # is_active: bool = True # Change to status.
98
-
99
- # class JobTemplateUpdateRequest(BaseModel):
100
- # cron: Optional[str] = None
101
- # default_input_data: Optional[dict] = None
102
- # description: Optional[str] = None
103
- # is_active: Optional[bool] = None # Change to status.
104
-
105
-
106
- #### EXECUTIONS ####
107
-
108
- # class JobExecutionCreateRequest(BaseModel):
109
- # type: JobType
110
- # template_id: Optional[str] = None
111
- # input_data: dict = Field(default_factory=dict)
112
-
113
- # @model_validator(mode='before')
114
- # @classmethod
115
- # def validate_job_identifiers(cls, data: Any) -> Any:
116
- # if isinstance(data, dict):
117
- # if bool(data.get('job_type')) == bool(data.get('job_template_id')):
118
- # raise ValueError("Either job_type or job_template_id must be provided")
119
- # return data
120
-
121
- # class JobExecutionResponse(BaseModel):
122
- # id: str
123
- # template_id: Optional[str] = None
124
- # type: JobType
125
- # status: JobStatus
126
- # result: Optional[dict] = None
127
- # error: Optional[str] = None
128
- # created_at: Optional[datetime.datetime] = None
129
- # updated_at: Optional[datetime.datetime] = None
130
-
131
- # class JobExecutionDocument(BaseModel):
132
- # object: Literal["job_execution"] = "job_execution"
133
- # id: str
134
- # template_id: Optional[str] = None
135
- # type: JobType
136
- # identity: Any | None = None
137
- # status: JobStatus
138
- # input_data_gcs_path: str
139
- # result: Optional[dict] = None
140
- # error: Optional[str] = None
141
- # created_at: Optional[datetime.datetime] = None
142
- # updated_at: Optional[datetime.datetime] = None
143
- # checkpoint: Any = None # Useful for jobs that need to be resumed
144
- # checkpoint_data: Optional[dict] = None
145
- # needs: list[str] = Field(default_factory=list, description="list of jobs execution id that must be completed before this job can run")
146
-
147
-
148
- # class Workflow(BaseModel):
149
- # name: str
150
- # jobs: list[JobExecutionDocument]
@@ -1,22 +0,0 @@
1
- from typing import Literal, Optional
2
-
3
- from openai.types.chat.chat_completion_reasoning_effort import ChatCompletionReasoningEffort
4
- from pydantic import BaseModel, Field
5
-
6
- from ..modalities import Modality
7
-
8
-
9
- class InferenceSettings(BaseModel):
10
- model: str = "gpt-4o-mini"
11
- temperature: float = 0.0
12
- modality: Modality
13
- image_resolution_dpi: int = 96
14
- browser_canvas: Literal['A3', 'A4', 'A5'] = 'A4'
15
- reasoning_effort: ChatCompletionReasoningEffort = "medium"
16
-
17
-
18
- class AnnotationInputData(BaseModel):
19
- dataset_id: str
20
- files_ids: Optional[list[str]] = None
21
- upsert: bool = False
22
- inference_settings: InferenceSettings
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes