structifyai 1.171.0__py3-none-any.whl → 1.173.0__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.
- structify/_version.py +1 -1
- structify/resources/chat.py +98 -0
- structify/resources/polars.py +72 -29
- structify/types/__init__.py +2 -0
- structify/types/admin/admin_list_jobs_response.py +2 -0
- structify/types/admin_issue_found_response.py +9 -0
- structify/types/chat_admin_issue_found_params.py +13 -0
- structify/types/chat_create_session_params.py +1 -0
- structify/types/code_generate_code_params.py +1 -0
- structify/types/job_event_body.py +8 -0
- structify/types/job_list_response.py +2 -0
- structify/types/structure_run_async_params.py +2 -0
- structify/types/tool_invocation.py +2 -0
- {structifyai-1.171.0.dist-info → structifyai-1.173.0.dist-info}/METADATA +1 -1
- {structifyai-1.171.0.dist-info → structifyai-1.173.0.dist-info}/RECORD +17 -15
- {structifyai-1.171.0.dist-info → structifyai-1.173.0.dist-info}/WHEEL +0 -0
- {structifyai-1.171.0.dist-info → structifyai-1.173.0.dist-info}/licenses/LICENSE +0 -0
structify/_version.py
CHANGED
structify/resources/chat.py
CHANGED
|
@@ -18,6 +18,7 @@ from ..types import (
|
|
|
18
18
|
chat_update_session_params,
|
|
19
19
|
chat_add_collaborator_params,
|
|
20
20
|
chat_revert_to_commit_params,
|
|
21
|
+
chat_admin_issue_found_params,
|
|
21
22
|
chat_update_visibility_params,
|
|
22
23
|
chat_grant_admin_override_params,
|
|
23
24
|
chat_update_session_favorite_params,
|
|
@@ -41,6 +42,7 @@ from ..types.chat_session_role import ChatSessionRole
|
|
|
41
42
|
from ..types.chat_load_files_response import ChatLoadFilesResponse
|
|
42
43
|
from ..types.get_chat_session_response import GetChatSessionResponse
|
|
43
44
|
from ..types.get_dependencies_response import GetDependenciesResponse
|
|
45
|
+
from ..types.admin_issue_found_response import AdminIssueFoundResponse
|
|
44
46
|
from ..types.chat_delete_files_response import ChatDeleteFilesResponse
|
|
45
47
|
from ..types.chat_session_with_messages import ChatSessionWithMessages
|
|
46
48
|
from ..types.update_visibility_response import UpdateVisibilityResponse
|
|
@@ -191,6 +193,48 @@ class ChatResource(SyncAPIResource):
|
|
|
191
193
|
cast_to=ChatPrompt,
|
|
192
194
|
)
|
|
193
195
|
|
|
196
|
+
def admin_issue_found(
|
|
197
|
+
self,
|
|
198
|
+
chat_id: str,
|
|
199
|
+
*,
|
|
200
|
+
message: str,
|
|
201
|
+
title: str,
|
|
202
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
203
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
204
|
+
extra_headers: Headers | None = None,
|
|
205
|
+
extra_query: Query | None = None,
|
|
206
|
+
extra_body: Body | None = None,
|
|
207
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
208
|
+
) -> AdminIssueFoundResponse:
|
|
209
|
+
"""
|
|
210
|
+
Add an IssueFound tool call as an admin-only auto-review message
|
|
211
|
+
|
|
212
|
+
Args:
|
|
213
|
+
extra_headers: Send extra headers
|
|
214
|
+
|
|
215
|
+
extra_query: Add additional query parameters to the request
|
|
216
|
+
|
|
217
|
+
extra_body: Add additional JSON properties to the request
|
|
218
|
+
|
|
219
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
220
|
+
"""
|
|
221
|
+
if not chat_id:
|
|
222
|
+
raise ValueError(f"Expected a non-empty value for `chat_id` but received {chat_id!r}")
|
|
223
|
+
return self._post(
|
|
224
|
+
f"/chat/sessions/{chat_id}/admin/issue_found",
|
|
225
|
+
body=maybe_transform(
|
|
226
|
+
{
|
|
227
|
+
"message": message,
|
|
228
|
+
"title": title,
|
|
229
|
+
},
|
|
230
|
+
chat_admin_issue_found_params.ChatAdminIssueFoundParams,
|
|
231
|
+
),
|
|
232
|
+
options=make_request_options(
|
|
233
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
234
|
+
),
|
|
235
|
+
cast_to=AdminIssueFoundResponse,
|
|
236
|
+
)
|
|
237
|
+
|
|
194
238
|
def copy(
|
|
195
239
|
self,
|
|
196
240
|
*,
|
|
@@ -1098,6 +1142,48 @@ class AsyncChatResource(AsyncAPIResource):
|
|
|
1098
1142
|
cast_to=ChatPrompt,
|
|
1099
1143
|
)
|
|
1100
1144
|
|
|
1145
|
+
async def admin_issue_found(
|
|
1146
|
+
self,
|
|
1147
|
+
chat_id: str,
|
|
1148
|
+
*,
|
|
1149
|
+
message: str,
|
|
1150
|
+
title: str,
|
|
1151
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1152
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1153
|
+
extra_headers: Headers | None = None,
|
|
1154
|
+
extra_query: Query | None = None,
|
|
1155
|
+
extra_body: Body | None = None,
|
|
1156
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1157
|
+
) -> AdminIssueFoundResponse:
|
|
1158
|
+
"""
|
|
1159
|
+
Add an IssueFound tool call as an admin-only auto-review message
|
|
1160
|
+
|
|
1161
|
+
Args:
|
|
1162
|
+
extra_headers: Send extra headers
|
|
1163
|
+
|
|
1164
|
+
extra_query: Add additional query parameters to the request
|
|
1165
|
+
|
|
1166
|
+
extra_body: Add additional JSON properties to the request
|
|
1167
|
+
|
|
1168
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1169
|
+
"""
|
|
1170
|
+
if not chat_id:
|
|
1171
|
+
raise ValueError(f"Expected a non-empty value for `chat_id` but received {chat_id!r}")
|
|
1172
|
+
return await self._post(
|
|
1173
|
+
f"/chat/sessions/{chat_id}/admin/issue_found",
|
|
1174
|
+
body=await async_maybe_transform(
|
|
1175
|
+
{
|
|
1176
|
+
"message": message,
|
|
1177
|
+
"title": title,
|
|
1178
|
+
},
|
|
1179
|
+
chat_admin_issue_found_params.ChatAdminIssueFoundParams,
|
|
1180
|
+
),
|
|
1181
|
+
options=make_request_options(
|
|
1182
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1183
|
+
),
|
|
1184
|
+
cast_to=AdminIssueFoundResponse,
|
|
1185
|
+
)
|
|
1186
|
+
|
|
1101
1187
|
async def copy(
|
|
1102
1188
|
self,
|
|
1103
1189
|
*,
|
|
@@ -1888,6 +1974,9 @@ class ChatResourceWithRawResponse:
|
|
|
1888
1974
|
self.admin_get_chat_prompt = to_raw_response_wrapper(
|
|
1889
1975
|
chat.admin_get_chat_prompt,
|
|
1890
1976
|
)
|
|
1977
|
+
self.admin_issue_found = to_raw_response_wrapper(
|
|
1978
|
+
chat.admin_issue_found,
|
|
1979
|
+
)
|
|
1891
1980
|
self.copy = to_raw_response_wrapper(
|
|
1892
1981
|
chat.copy,
|
|
1893
1982
|
)
|
|
@@ -1966,6 +2055,9 @@ class AsyncChatResourceWithRawResponse:
|
|
|
1966
2055
|
self.admin_get_chat_prompt = async_to_raw_response_wrapper(
|
|
1967
2056
|
chat.admin_get_chat_prompt,
|
|
1968
2057
|
)
|
|
2058
|
+
self.admin_issue_found = async_to_raw_response_wrapper(
|
|
2059
|
+
chat.admin_issue_found,
|
|
2060
|
+
)
|
|
1969
2061
|
self.copy = async_to_raw_response_wrapper(
|
|
1970
2062
|
chat.copy,
|
|
1971
2063
|
)
|
|
@@ -2044,6 +2136,9 @@ class ChatResourceWithStreamingResponse:
|
|
|
2044
2136
|
self.admin_get_chat_prompt = to_streamed_response_wrapper(
|
|
2045
2137
|
chat.admin_get_chat_prompt,
|
|
2046
2138
|
)
|
|
2139
|
+
self.admin_issue_found = to_streamed_response_wrapper(
|
|
2140
|
+
chat.admin_issue_found,
|
|
2141
|
+
)
|
|
2047
2142
|
self.copy = to_streamed_response_wrapper(
|
|
2048
2143
|
chat.copy,
|
|
2049
2144
|
)
|
|
@@ -2122,6 +2217,9 @@ class AsyncChatResourceWithStreamingResponse:
|
|
|
2122
2217
|
self.admin_get_chat_prompt = async_to_streamed_response_wrapper(
|
|
2123
2218
|
chat.admin_get_chat_prompt,
|
|
2124
2219
|
)
|
|
2220
|
+
self.admin_issue_found = async_to_streamed_response_wrapper(
|
|
2221
|
+
chat.admin_issue_found,
|
|
2222
|
+
)
|
|
2125
2223
|
self.copy = async_to_streamed_response_wrapper(
|
|
2126
2224
|
chat.copy,
|
|
2127
2225
|
)
|
structify/resources/polars.py
CHANGED
|
@@ -5,7 +5,7 @@ import io
|
|
|
5
5
|
import os
|
|
6
6
|
import time
|
|
7
7
|
import uuid
|
|
8
|
-
from typing import Any, Dict, List, Tuple, Optional, cast
|
|
8
|
+
from typing import Any, Dict, List, Tuple, Literal, Optional, cast
|
|
9
9
|
from concurrent.futures import Future, ThreadPoolExecutor, as_completed
|
|
10
10
|
|
|
11
11
|
import polars as pl
|
|
@@ -811,7 +811,10 @@ class PolarsResource(SyncAPIResource):
|
|
|
811
811
|
path_column: str,
|
|
812
812
|
table_name: str,
|
|
813
813
|
schema: Dict[str, Dict[str, Any]],
|
|
814
|
-
conditioning: str = "",
|
|
814
|
+
conditioning: str = "", # Kept for backward compatibility
|
|
815
|
+
instructions: str | LazyFrame | None = None,
|
|
816
|
+
model: str | None = None,
|
|
817
|
+
mode: Literal["single", "all_pages"] = "all_pages",
|
|
815
818
|
) -> LazyFrame:
|
|
816
819
|
"""
|
|
817
820
|
Extract structured data from PDF documents and return as a LazyFrame.
|
|
@@ -821,6 +824,10 @@ class PolarsResource(SyncAPIResource):
|
|
|
821
824
|
path_column: Name of the column containing PDF file paths
|
|
822
825
|
table_name: Name of the table for the structured data
|
|
823
826
|
schema: Schema definition with descriptions, format: {"column_name": {"description": "...", "type": polars_dtype}}
|
|
827
|
+
instructions: Optional instructions for the extraction. Can be a string (applied to all PDFs)
|
|
828
|
+
or a LazyFrame with the same rows as document_paths containing per-PDF instructions.
|
|
829
|
+
model: Optional model name to use for extraction
|
|
830
|
+
mode: Whether to dispatch a single high-agency agent or one low-agency agent per page.
|
|
824
831
|
|
|
825
832
|
Returns:
|
|
826
833
|
LazyFrame: Structured data extracted from the PDFs
|
|
@@ -842,25 +849,50 @@ class PolarsResource(SyncAPIResource):
|
|
|
842
849
|
|
|
843
850
|
node_id = get_node_id()
|
|
844
851
|
|
|
852
|
+
# Validate model format if provided as string
|
|
853
|
+
if isinstance(model, str):
|
|
854
|
+
parts = model.split(".", 1)
|
|
855
|
+
if len(parts) != 2:
|
|
856
|
+
raise ValueError(
|
|
857
|
+
"model must be in format 'provider.model_name' (e.g. 'bedrock.claude-sonnet-4-bedrock')"
|
|
858
|
+
)
|
|
859
|
+
|
|
860
|
+
# Build lookups for per-row instructions by index (not by path, since the same PDF may appear multiple times)
|
|
861
|
+
paths_df = document_paths.collect()
|
|
862
|
+
|
|
863
|
+
instructions_list: list[str | None] = []
|
|
864
|
+
|
|
865
|
+
if instructions is not None and not isinstance(instructions, str):
|
|
866
|
+
instr_df = instructions.collect()
|
|
867
|
+
if instr_df.shape[0] != paths_df.shape[0]:
|
|
868
|
+
raise ValueError(f"instructions shape {instr_df.shape} != document_paths shape {paths_df.shape}")
|
|
869
|
+
instructions_list = cast(List[Optional[str]], instr_df[instr_df.columns[0]].to_list())
|
|
870
|
+
|
|
845
871
|
def structure_batch(batch_df: pl.DataFrame) -> pl.DataFrame:
|
|
846
|
-
#
|
|
847
|
-
|
|
872
|
+
# Track by row index since the same PDF may appear multiple times with different instructions
|
|
873
|
+
batch_rows = batch_df.with_row_index("__row_idx__").to_dicts()
|
|
874
|
+
valid_rows = [row for row in batch_rows if row.get(path_column) is not None]
|
|
875
|
+
|
|
876
|
+
if not valid_rows:
|
|
877
|
+
return pl.DataFrame(schema=polars_schema)
|
|
848
878
|
|
|
849
879
|
# Request cost confirmation before dispatching costly PDF extraction jobs
|
|
850
|
-
if not request_cost_confirmation_if_needed(self._client, len(
|
|
880
|
+
if not request_cost_confirmation_if_needed(self._client, len(valid_rows)):
|
|
851
881
|
raise Exception(f"User cancelled PDF extraction for {table_name}")
|
|
852
882
|
|
|
853
883
|
# Process each PDF document
|
|
854
|
-
path_to_dataset: dict[str, str] = {}
|
|
855
884
|
job_ids: list[str] = []
|
|
885
|
+
idx_to_dataset: dict[int, str] = {}
|
|
856
886
|
|
|
857
|
-
def process_pdf(
|
|
887
|
+
def process_pdf(row: dict[str, Any]) -> Tuple[str, int, str]:
|
|
888
|
+
row_idx = row["__row_idx__"]
|
|
889
|
+
pdf_path = row[path_column]
|
|
858
890
|
dataset_name = f"structure_pdfs_{table_name}_{uuid.uuid4().hex}"
|
|
859
891
|
|
|
860
892
|
# Create dataset for this PDF
|
|
861
893
|
self._client.datasets.create(
|
|
862
894
|
name=dataset_name,
|
|
863
|
-
description=
|
|
895
|
+
description="",
|
|
864
896
|
tables=[table_param],
|
|
865
897
|
relationships=[],
|
|
866
898
|
ephemeral=True,
|
|
@@ -875,36 +907,52 @@ class PolarsResource(SyncAPIResource):
|
|
|
875
907
|
path=f"{dataset_name}.pdf".encode(),
|
|
876
908
|
)
|
|
877
909
|
|
|
910
|
+
# Get per-row instructions and model
|
|
911
|
+
pdf_instructions: str | None = None
|
|
912
|
+
if isinstance(instructions, str):
|
|
913
|
+
pdf_instructions = instructions
|
|
914
|
+
elif instructions_list:
|
|
915
|
+
pdf_instructions = cast(Optional[str], instructions_list[row_idx])
|
|
916
|
+
elif conditioning:
|
|
917
|
+
pdf_instructions = conditioning
|
|
918
|
+
|
|
878
919
|
job_id = self._client.structure.run_async(
|
|
879
920
|
dataset=dataset_name,
|
|
880
|
-
source=SourcePdf(pdf={"path": f"{dataset_name}.pdf"}),
|
|
921
|
+
source=SourcePdf(pdf={"path": f"{dataset_name}.pdf", "single_agent": mode == "single"}),
|
|
881
922
|
node_id=node_id,
|
|
923
|
+
instructions=pdf_instructions,
|
|
924
|
+
model=model,
|
|
882
925
|
)
|
|
883
|
-
return job_id,
|
|
926
|
+
return job_id, row_idx, dataset_name
|
|
884
927
|
|
|
885
928
|
with ThreadPoolExecutor(max_workers=MAX_PARALLEL_REQUESTS) as executor:
|
|
886
|
-
futures = [executor.submit(process_pdf,
|
|
929
|
+
futures = [executor.submit(process_pdf, row) for row in valid_rows]
|
|
887
930
|
for future in tqdm(as_completed(futures), total=len(futures), desc="Preparing PDFs"):
|
|
888
|
-
job_id,
|
|
931
|
+
job_id, row_idx, dataset_name = future.result()
|
|
889
932
|
job_ids.append(job_id)
|
|
890
|
-
|
|
933
|
+
idx_to_dataset[row_idx] = dataset_name
|
|
891
934
|
|
|
892
935
|
# Wait for all PDF processing jobs to complete
|
|
893
936
|
self._client.jobs.wait_for_jobs(job_ids=job_ids, title=f"Parsing {table_name} from PDFs", node_id=node_id)
|
|
894
937
|
|
|
895
|
-
# Collect results from all processed PDFs
|
|
938
|
+
# Collect results from all processed PDFs - each result is tagged with its source row_idx
|
|
896
939
|
structured_results: list[dict[str, Any]] = []
|
|
897
940
|
|
|
898
|
-
def collect_pdf_results(
|
|
941
|
+
def collect_pdf_results(row_idx: int, dataset_name: str) -> List[Dict[str, Any]]:
|
|
942
|
+
pdf_path = batch_rows[row_idx][path_column]
|
|
899
943
|
entities_result = self._client.datasets.view_table(dataset=dataset_name, name=table_name)
|
|
900
|
-
return [
|
|
944
|
+
return [
|
|
945
|
+
{**entity.properties, path_column: pdf_path, "__row_idx__": row_idx} for entity in entities_result
|
|
946
|
+
]
|
|
901
947
|
|
|
902
948
|
with ThreadPoolExecutor(max_workers=MAX_PARALLEL_REQUESTS) as executor:
|
|
903
|
-
|
|
904
|
-
executor.submit(collect_pdf_results,
|
|
905
|
-
for
|
|
949
|
+
collect_futures = [
|
|
950
|
+
executor.submit(collect_pdf_results, row_idx, dataset_name)
|
|
951
|
+
for row_idx, dataset_name in idx_to_dataset.items()
|
|
906
952
|
]
|
|
907
|
-
for future in tqdm(
|
|
953
|
+
for future in tqdm(
|
|
954
|
+
as_completed(collect_futures), total=len(collect_futures), desc="Collecting PDF extractions"
|
|
955
|
+
):
|
|
908
956
|
results = future.result()
|
|
909
957
|
structured_results.extend(results)
|
|
910
958
|
|
|
@@ -914,17 +962,12 @@ class PolarsResource(SyncAPIResource):
|
|
|
914
962
|
if col_name not in result_row:
|
|
915
963
|
result_row[col_name] = None
|
|
916
964
|
|
|
917
|
-
# Create DataFrame with structured results
|
|
918
965
|
if not structured_results:
|
|
919
|
-
|
|
920
|
-
{col: pl.Series([], dtype=polars_schema[col]) for col in polars_schema.names()}
|
|
921
|
-
)
|
|
922
|
-
else:
|
|
923
|
-
structured_df = pl.DataFrame(structured_results, schema=polars_schema)
|
|
966
|
+
return pl.DataFrame(schema=polars_schema)
|
|
924
967
|
|
|
925
|
-
#
|
|
926
|
-
|
|
927
|
-
return
|
|
968
|
+
# Build result dataframe directly from structured_results without joining
|
|
969
|
+
# Each entity is already tagged with path_column from its source PDF
|
|
970
|
+
return pl.DataFrame(structured_results, schema=polars_schema)
|
|
928
971
|
|
|
929
972
|
return document_paths.map_batches(structure_batch, schema=polars_schema, no_optimizations=True)
|
|
930
973
|
|
structify/types/__init__.py
CHANGED
|
@@ -194,6 +194,7 @@ from .team_credits_usage_params import TeamCreditsUsageParams as TeamCreditsUsag
|
|
|
194
194
|
from .user_survey_submit_params import UserSurveySubmitParams as UserSurveySubmitParams
|
|
195
195
|
from .wiki_page_with_references import WikiPageWithReferences as WikiPageWithReferences
|
|
196
196
|
from .accept_invitation_response import AcceptInvitationResponse as AcceptInvitationResponse
|
|
197
|
+
from .admin_issue_found_response import AdminIssueFoundResponse as AdminIssueFoundResponse
|
|
197
198
|
from .chat_add_git_commit_params import ChatAddGitCommitParams as ChatAddGitCommitParams
|
|
198
199
|
from .chat_create_session_params import ChatCreateSessionParams as ChatCreateSessionParams
|
|
199
200
|
from .chat_delete_files_response import ChatDeleteFilesResponse as ChatDeleteFilesResponse
|
|
@@ -243,6 +244,7 @@ from .sandbox_update_status_params import SandboxUpdateStatusParams as SandboxUp
|
|
|
243
244
|
from .structure_is_complete_params import StructureIsCompleteParams as StructureIsCompleteParams
|
|
244
245
|
from .structure_run_async_response import StructureRunAsyncResponse as StructureRunAsyncResponse
|
|
245
246
|
from .team_create_link_code_params import TeamCreateLinkCodeParams as TeamCreateLinkCodeParams
|
|
247
|
+
from .chat_admin_issue_found_params import ChatAdminIssueFoundParams as ChatAdminIssueFoundParams
|
|
246
248
|
from .chat_update_visibility_params import ChatUpdateVisibilityParams as ChatUpdateVisibilityParams
|
|
247
249
|
from .connector_catalog_list_params import ConnectorCatalogListParams as ConnectorCatalogListParams
|
|
248
250
|
from .connector_update_table_params import ConnectorUpdateTableParams as ConnectorUpdateTableParams
|
|
@@ -35,6 +35,8 @@ class ParametersStructuringInputAgentAgentPdfPdf(BaseModel):
|
|
|
35
35
|
|
|
36
36
|
path: str
|
|
37
37
|
|
|
38
|
+
single_agent: Optional[bool] = None
|
|
39
|
+
|
|
38
40
|
|
|
39
41
|
class ParametersStructuringInputAgentAgentPdf(BaseModel):
|
|
40
42
|
pdf: ParametersStructuringInputAgentAgentPdfPdf = FieldInfo(alias="PDF")
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ChatAdminIssueFoundParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ChatAdminIssueFoundParams(TypedDict, total=False):
|
|
11
|
+
message: Required[str]
|
|
12
|
+
|
|
13
|
+
title: Required[str]
|
|
@@ -44,6 +44,7 @@ class Config(TypedDict, total=False):
|
|
|
44
44
|
"bedrock.claude-sonnet-4-bedrock",
|
|
45
45
|
"bedrock.claude-sonnet-4-5-bedrock",
|
|
46
46
|
"bedrock.claude-opus-4-5-bedrock",
|
|
47
|
+
"bedrock.claude-haiku-4-5-bedrock",
|
|
47
48
|
"gemini.gemini-2.5-pro",
|
|
48
49
|
"gemini.gemini-2.5-flash",
|
|
49
50
|
"gemini.gemini-3-pro-preview",
|
|
@@ -48,6 +48,7 @@ class Config(TypedDict, total=False):
|
|
|
48
48
|
"bedrock.claude-sonnet-4-bedrock",
|
|
49
49
|
"bedrock.claude-sonnet-4-5-bedrock",
|
|
50
50
|
"bedrock.claude-opus-4-5-bedrock",
|
|
51
|
+
"bedrock.claude-haiku-4-5-bedrock",
|
|
51
52
|
"gemini.gemini-2.5-pro",
|
|
52
53
|
"gemini.gemini-2.5-flash",
|
|
53
54
|
"gemini.gemini-3-pro-preview",
|
|
@@ -24,6 +24,7 @@ __all__ = [
|
|
|
24
24
|
"DatahubSchemasCreated",
|
|
25
25
|
"DatahubTablesProcessed",
|
|
26
26
|
"DatahubEmbeddingBatch",
|
|
27
|
+
"ViewedPdfPage",
|
|
27
28
|
]
|
|
28
29
|
|
|
29
30
|
|
|
@@ -164,6 +165,12 @@ class DatahubEmbeddingBatch(BaseModel):
|
|
|
164
165
|
total_batches: int
|
|
165
166
|
|
|
166
167
|
|
|
168
|
+
class ViewedPdfPage(BaseModel):
|
|
169
|
+
event_type: Literal["viewed_pdf_page"]
|
|
170
|
+
|
|
171
|
+
page_index: int
|
|
172
|
+
|
|
173
|
+
|
|
167
174
|
JobEventBody: TypeAlias = Annotated[
|
|
168
175
|
Union[
|
|
169
176
|
AgentNavigated,
|
|
@@ -181,6 +188,7 @@ JobEventBody: TypeAlias = Annotated[
|
|
|
181
188
|
DatahubSchemasCreated,
|
|
182
189
|
DatahubTablesProcessed,
|
|
183
190
|
DatahubEmbeddingBatch,
|
|
191
|
+
ViewedPdfPage,
|
|
184
192
|
],
|
|
185
193
|
PropertyInfo(discriminator="event_type"),
|
|
186
194
|
]
|
|
@@ -36,6 +36,8 @@ class ParametersStructuringInputAgentAgentPdfPdf(BaseModel):
|
|
|
36
36
|
|
|
37
37
|
path: str
|
|
38
38
|
|
|
39
|
+
single_agent: Optional[bool] = None
|
|
40
|
+
|
|
39
41
|
|
|
40
42
|
class ParametersStructuringInputAgentAgentPdf(BaseModel):
|
|
41
43
|
pdf: ParametersStructuringInputAgentAgentPdfPdf = FieldInfo(alias="PDF")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: structifyai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.173.0
|
|
4
4
|
Summary: The official Python library for the structify API
|
|
5
5
|
Project-URL: Homepage, https://github.com/StructifyAI/structify-python
|
|
6
6
|
Project-URL: Repository, https://github.com/StructifyAI/structify-python
|
|
@@ -11,7 +11,7 @@ structify/_resource.py,sha256=tJi4pDQooQZ_zJwEwrLj-U-ye2hC-cbmr1GzIwCT10Y,1118
|
|
|
11
11
|
structify/_response.py,sha256=RuNhMDiZUdPqEbmFJHDVI4FMPDszk8QjK9LVWm1Fagk,28806
|
|
12
12
|
structify/_streaming.py,sha256=n4C9M7ITmANYn9LaWHNoqJdIIyF7svLco2qst7u3M7U,10233
|
|
13
13
|
structify/_types.py,sha256=jj4p-m3vpUma0AdhPWIaljHZXeb4RKnrAusjVdpDy5Y,7597
|
|
14
|
-
structify/_version.py,sha256=
|
|
14
|
+
structify/_version.py,sha256=WcTGZuYh0GCneqsaePXe_535r8UvSvOWAg183seZe-g,163
|
|
15
15
|
structify/pagination.py,sha256=ycybhWcpKk4ztsMcCA6C0WZiJejGrSx6bSr8LLskJUY,4346
|
|
16
16
|
structify/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
structify/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
@@ -30,7 +30,7 @@ structify/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
|
30
30
|
structify/lib/__init__.py,sha256=Ueo7RB2lM1a3wkuifgjgBpqwQxhQUHJzvGorfJAfuUc,187
|
|
31
31
|
structify/lib/cost_confirmation.py,sha256=LfUlXu1_rQDXDVSZ8AWh3GQFu1rUZT5Ax1FbTZqPckM,1912
|
|
32
32
|
structify/resources/__init__.py,sha256=uEPBix75KmHK4iO50jocLO_psMYaebe-jkemfOjlz_U,12597
|
|
33
|
-
structify/resources/chat.py,sha256=
|
|
33
|
+
structify/resources/chat.py,sha256=RIYa-2vgc1I2G52cp5Ak6sIBJf04TWbH5IoGd-r38Co,91243
|
|
34
34
|
structify/resources/code.py,sha256=6DrVsa3SHWz2b9BFJ5lOssni2u-fz4GLBz68-fj9ALE,11196
|
|
35
35
|
structify/resources/documents.py,sha256=QBuL5NQyW1XrncP4tjyb9yLFgqPgWCXa8Zj1uESy5j8,18180
|
|
36
36
|
structify/resources/entities.py,sha256=Fz4yCEdsxs-62bjmkYZY9Ku_tzDe73Q4xfqv_XHGe_M,81990
|
|
@@ -39,7 +39,7 @@ structify/resources/external_dataframe_proxy.py,sha256=DSn0YwWIembR__ZtDxVCJtyY3
|
|
|
39
39
|
structify/resources/jobs.py,sha256=gO1aSByi1dMvW90UDsMmNhLHFCOY4ENLkZcAx4gbLHY,30108
|
|
40
40
|
structify/resources/match.py,sha256=gDWEWnKwEoLbheQAMFltJCk2ysa_L9AuJMOaauM7c4Y,12248
|
|
41
41
|
structify/resources/nango.py,sha256=Zl0M1XhlVe61jHVd-SdYI9uEbEhIRmskvlk7Xp0Lh8g,9166
|
|
42
|
-
structify/resources/polars.py,sha256
|
|
42
|
+
structify/resources/polars.py,sha256=--kVVUoJ7AvGirnc462r0TRsK7lcXXDQD0XWhqtG3K8,61552
|
|
43
43
|
structify/resources/projects.py,sha256=YDikBDB9D1EXyZ2GyRx4GlpQ83snw51YlNuU1sLHqho,14117
|
|
44
44
|
structify/resources/public_sessions.py,sha256=_JmssE0MMjeGdxT0FWtrkcceSV4skeEkVGYeO2FkJes,9976
|
|
45
45
|
structify/resources/sandbox.py,sha256=Gc7uxZAOmbXA477UHvS244BokI1Tte_34xxIj0dC5PA,16984
|
|
@@ -77,18 +77,20 @@ structify/resources/user/__init__.py,sha256=vkGsM7uGlBXVVwuEZlICVLlIY3F75n_MIMpm
|
|
|
77
77
|
structify/resources/user/api_keys.py,sha256=LgKvDGkHPGIumWmEsPCA1XYAKNuRN48nqG6anv8AVHE,14331
|
|
78
78
|
structify/resources/user/stripe.py,sha256=MazkGQ5VuNY7TxMPXxJULBVerMGmOXaEcXpfQsUYoNs,13574
|
|
79
79
|
structify/resources/user/user.py,sha256=Hk8D5KB8in-A9eJSYFIosILz4HgSWDwDDAVIQeQ8Sew,25411
|
|
80
|
-
structify/types/__init__.py,sha256
|
|
80
|
+
structify/types/__init__.py,sha256=-lfSCQdu7PvLm8aF4T-si-zkz6wxQsDFAmAu_GFxanQ,28089
|
|
81
81
|
structify/types/accept_invitation_response.py,sha256=hWIn0Sscg7U0uOqoZA5SG8ENZQuM0tsbgOlrJbcW37s,260
|
|
82
82
|
structify/types/add_member_response.py,sha256=_YjqwGpsfdR9Dw6SAQ99TveFSD8Hov1IjVPMH2KC3CM,882
|
|
83
83
|
structify/types/admin_grant_access_response.py,sha256=xCPdmejgZs1oXOsfgbW-cYKZa8getHRotRnsCav5QPU,390
|
|
84
|
+
structify/types/admin_issue_found_response.py,sha256=b8O7QVfXlRflcx3Rb6Cwf35LBxv_5bTXhCRkPfnHXbk,222
|
|
84
85
|
structify/types/autofix_context.py,sha256=E4Dc7VjDiblbW8UBXBOz-iNjznAQiZ7tMs3J7sHGSI8,245
|
|
85
86
|
structify/types/chat_add_collaborator_params.py,sha256=FyKIC2eOgSx0e-jeomFovoJs_eJStulK3zCZQtxl2M8,383
|
|
86
87
|
structify/types/chat_add_git_commit_params.py,sha256=y4HmhC4jLX7GFatchxl__4ztkuQwhxc6NU0-j_YGZQo,352
|
|
87
88
|
structify/types/chat_add_git_commit_response.py,sha256=T2hCiHvxd3LvIIYqsDyIZommTtyygveda-3AIEZy2mQ,431
|
|
89
|
+
structify/types/chat_admin_issue_found_params.py,sha256=N5YMgm6O-Yr3sXZb2sWDHdyNXHk358jjjgG8Dk0wacE,326
|
|
88
90
|
structify/types/chat_copy_node_output_by_code_hash_params.py,sha256=gP4V2Y0_Rb4-kwoEceClJLgjVdWv7bgcI4qqQIvdNv8,356
|
|
89
91
|
structify/types/chat_copy_node_output_by_code_hash_response.py,sha256=Cst1RK9jDrMAKEyzLIk5_-D6YUbO-AIVllYui2sy2aQ,272
|
|
90
92
|
structify/types/chat_copy_params.py,sha256=tfA3jdduKDJeHiYjWWKdHifRMp1sCGyGQcYHFuMFdnE,425
|
|
91
|
-
structify/types/chat_create_session_params.py,sha256=
|
|
93
|
+
structify/types/chat_create_session_params.py,sha256=QSkL1Z0Vj0sT8AJ8mcDZQIqAwUkbhiQHuF6811veMmc,1810
|
|
92
94
|
structify/types/chat_delete_files_params.py,sha256=Rv24bWe1CK524xobl9-_APx5GG8KTqIwEtUgYIUlMXc,343
|
|
93
95
|
structify/types/chat_delete_files_response.py,sha256=ZoFJjfZqn_rVuwiFhsuFigN_AQHh_DRkb5KRj7J_49g,225
|
|
94
96
|
structify/types/chat_dependency.py,sha256=J8JLY6kBjFt4dgf-_Vk_HEjxS5R6_6VnTQue2JzZRug,415
|
|
@@ -112,7 +114,7 @@ structify/types/chat_update_session_favorite_params.py,sha256=UNi0YujSs1gCSry2jK
|
|
|
112
114
|
structify/types/chat_update_session_params.py,sha256=5NQZx-j-W2xQGlX0GU-9vwyQt0QunlifWY2MpRtrEv8,382
|
|
113
115
|
structify/types/chat_update_visibility_params.py,sha256=uWtgq4zb_TSO4hIsY0FmdWaljB_20wpjl6IQhRMibTg,361
|
|
114
116
|
structify/types/chat_visibility.py,sha256=GpTgjpcupE1z9Iul8fxOrlMoP_2wjQ_7Z0rJ2y9qO5Q,244
|
|
115
|
-
structify/types/code_generate_code_params.py,sha256=
|
|
117
|
+
structify/types/code_generate_code_params.py,sha256=cX5HYhmrv-9gBZcYMy9jJ8h4vMewt-Zy5jVfAYJsirA,2114
|
|
116
118
|
structify/types/code_interrupt_generation_params.py,sha256=1Y9VOgObIJFyYgAEkUuWZRKKV5-4HcoRA6p5iSEnF3s,410
|
|
117
119
|
structify/types/connector.py,sha256=hqfk8x1ZM39idvAd4wXLm1QNrnT3kRgxEuhk8O28-B0,1069
|
|
118
120
|
structify/types/connector_auth_method.py,sha256=iHBmcNbi74mDjFd_m4-HrGrZoV9_WRSFtrOY0fz9NhQ,562
|
|
@@ -257,11 +259,11 @@ structify/types/granularity.py,sha256=At6biWApGE7uE8jr5KnHP9Jr1yPFkuqLwXjExaswtB
|
|
|
257
259
|
structify/types/image.py,sha256=FpYU3gDZnet0wO17e2uHzcyRUD6E1ssSgv63Ew0DzjU,269
|
|
258
260
|
structify/types/invitation_details_response.py,sha256=TmyeM4mW4Kb6L0d7Ook9cH3g8vzfQYPnvZDIBdgVAO4,272
|
|
259
261
|
structify/types/job_cancel_response.py,sha256=y8M8qPkcXT-pTi4IwQ0JBJQzXeAQIs3u2OsaVeGBTtc,1224
|
|
260
|
-
structify/types/job_event_body.py,sha256=
|
|
262
|
+
structify/types/job_event_body.py,sha256=C3RfyefsBgWrFR_KAK7-Tzmlj6B3f4JVR6iR0HYt1Ks,3706
|
|
261
263
|
structify/types/job_get_scrapers_response.py,sha256=-E9DaG9YCkrJeuffZ3RiI6MW7ZsbPjmlVU3jUQdggSY,694
|
|
262
264
|
structify/types/job_get_source_entities_response.py,sha256=vlGKFkMKjII48EexIEBbls6-PAVYDDkmR1__aKjuiUo,3379
|
|
263
265
|
structify/types/job_list_params.py,sha256=i_MYi4vIFC6Dq5I4E4htYwZejqRE5qAf2lgg_SRBuKg,1012
|
|
264
|
-
structify/types/job_list_response.py,sha256=
|
|
266
|
+
structify/types/job_list_response.py,sha256=OMDUmcntraqTS8B-h7WqREgqbRVClK2a8ah4tFZnEgQ,5143
|
|
265
267
|
structify/types/job_status_params.py,sha256=wx7NFv1gJaIsy_fmCdPeEsVblIFRN5P1cUP1q8210HA,412
|
|
266
268
|
structify/types/job_status_response.py,sha256=xcfeCXfxVOFQStG5W0Xm6Cszv2k6u-VKjb2UDfz_McE,277
|
|
267
269
|
structify/types/knowledge_graph.py,sha256=HskWSN4Kw6nhwmIN6vZTNihKuYgztuDuAs2sZMhih90,607
|
|
@@ -345,7 +347,7 @@ structify/types/structure_is_complete_params.py,sha256=foIrU7dW5seHipqVl2f-Leb7n
|
|
|
345
347
|
structify/types/structure_is_complete_response.py,sha256=YWZrs4YK7EyjdZk1GAfb9cFwJS9HCJ0mW52uxesGqu8,216
|
|
346
348
|
structify/types/structure_job_status_params.py,sha256=uQmvkdZQ8c3XSAZSmshm0X7iDfyAKztzofziXSveWIE,479
|
|
347
349
|
structify/types/structure_job_status_response.py,sha256=jZVwojhMJB7w7BwaMQH5W_lqlzb-fKd2SKo6v1xrW-A,806
|
|
348
|
-
structify/types/structure_run_async_params.py,sha256=
|
|
350
|
+
structify/types/structure_run_async_params.py,sha256=s3NONQF-Bwl9Iu8YKoiHJfNcoM_Z5C_byKHCAMfYiI8,1818
|
|
349
351
|
structify/types/structure_run_async_response.py,sha256=RTK4Vh2A-51560FjLrRJiqKNgBjnuq3hd671_hi5lHU,212
|
|
350
352
|
structify/types/survey_submission_response.py,sha256=OTjhVLOGQWATs7VEsn1_OVNxu5oKOS_WwSu82UhmtbE,240
|
|
351
353
|
structify/types/table.py,sha256=Zx9V6jSUeCYAOn3ghA5xejTXVaplVm6Mew_qOVHxkIY,915
|
|
@@ -365,7 +367,7 @@ structify/types/team_wiki_page.py,sha256=PDcFqG8mc10Ejnh6YeoSdalNorn40axi7K3ppmh
|
|
|
365
367
|
structify/types/team_with_role.py,sha256=t-UgnD90UmxlMpLHdxN8L7kK7VxMVLj-PM26NvkV_2U,327
|
|
366
368
|
structify/types/teams_link_code_response.py,sha256=p81nvCP4KeGVUgQiiaFwAlLMRaGnG4Iv7rp03WFG0uA,269
|
|
367
369
|
structify/types/token_response.py,sha256=N75RMh9ZF05z5Ubc_Pu2pePe3MN7Yqn2GB1FJ8FQJZ0,408
|
|
368
|
-
structify/types/tool_invocation.py,sha256=
|
|
370
|
+
structify/types/tool_invocation.py,sha256=5D_zxMZmI3omAvGHTJSmCeuZMgMQXhbtomWh0f2Ll-k,5987
|
|
369
371
|
structify/types/tool_metadata.py,sha256=drtuS9ZQm4cB2KScB1pycX1ifjhGwSUMJm9TFv1SHuI,382
|
|
370
372
|
structify/types/tool_result.py,sha256=C7CSxU0PfW4WMiWlwDckEmsjTbZmWzEoSt2LbcYdAtc,2013
|
|
371
373
|
structify/types/update_member_role_response.py,sha256=q1jTM0lFmzvH8ki7GcSQAh-5cN7VnLF6Jg_IRdA4AqE,222
|
|
@@ -403,7 +405,7 @@ structify/types/workflow_stop_params.py,sha256=DLTGDSENmcdNQoV_LnsL0lvf3i3Ntupkp
|
|
|
403
405
|
structify/types/admin/__init__.py,sha256=sI2YUoXg3jsKmOp7cu3j_z2PoGhwQ5x7aTf822d192k,3540
|
|
404
406
|
structify/types/admin/admin_dataset_return.py,sha256=hRSCIBTiaCb1O1lcxsKyxnzGiYuIUEvnMxXkNbyj4_U,495
|
|
405
407
|
structify/types/admin/admin_delete_jobs_response.py,sha256=c3IO7bCqAoEN9PHYM88gO0JT0e6hCaHyIBtxC84Tw38,225
|
|
406
|
-
structify/types/admin/admin_list_jobs_response.py,sha256=
|
|
408
|
+
structify/types/admin/admin_list_jobs_response.py,sha256=2V64gFWFH3scKfj0P_Lo3d_YxoORoLdrm9sUPSwI6S0,4876
|
|
407
409
|
structify/types/admin/admin_sandbox.py,sha256=ADrK4ugEA85vNCzKe7OYr8tzkf5nQWnnACfzmyBATvI,679
|
|
408
410
|
structify/types/admin/admin_teams_list_response.py,sha256=FDrXxx3dQKuHuLfByYzaS5EzZYkZAtyJH7E7t6UoUX4,1167
|
|
409
411
|
structify/types/admin/cancel_subscription_response.py,sha256=ph43hCKHtpjp2eSV9X9eitJA-mpnrRdjwe8KxPLJdKY,246
|
|
@@ -487,7 +489,7 @@ structify/types/user/stripe_create_portal_session_params.py,sha256=5AYRC8z_SlKmd
|
|
|
487
489
|
structify/types/user/stripe_create_session_params.py,sha256=DFcNLNzEWeupkGQ9J5PafsuL_bIU9cLEIhAmFPsRlfo,387
|
|
488
490
|
structify/types/user/stripe_create_subscription_params.py,sha256=d8HfiC94gJbG-cC_WvBz6xYCvxKJO_EP2yyVmVvufrU,424
|
|
489
491
|
structify/types/user/subscription_plan.py,sha256=qKJMM-zPpYolYC1DlypOwPpxlyJBLkQqFK_0VpwktJs,222
|
|
490
|
-
structifyai-1.
|
|
491
|
-
structifyai-1.
|
|
492
|
-
structifyai-1.
|
|
493
|
-
structifyai-1.
|
|
492
|
+
structifyai-1.173.0.dist-info/METADATA,sha256=YYeHg00958d2UCUx9tOQB5WRAOIqsU3WZ-Ps3vxzKcU,16399
|
|
493
|
+
structifyai-1.173.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
494
|
+
structifyai-1.173.0.dist-info/licenses/LICENSE,sha256=9CwgrmGz3rZSTT-KqGc1gua-7g8B4ThTgMtUgPALh5c,11339
|
|
495
|
+
structifyai-1.173.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|