@retab/node 1.0.98 → 1.0.99
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.
- package/README.md +39 -42
- package/dist/api/client.d.ts +4 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +4 -0
- package/dist/api/documents/client.d.ts +17 -11
- package/dist/api/documents/client.d.ts.map +1 -1
- package/dist/api/documents/client.js +81 -34
- package/dist/api/edit/client.d.ts +1 -1
- package/dist/api/edit/client.js +1 -1
- package/dist/api/edit/templates/client.d.ts +1 -75
- package/dist/api/edit/templates/client.d.ts.map +1 -1
- package/dist/api/edit/templates/client.js +1 -128
- package/dist/api/evals/classify/client.d.ts +20 -0
- package/dist/api/evals/classify/client.d.ts.map +1 -0
- package/dist/api/evals/classify/client.js +25 -0
- package/dist/api/evals/client.d.ts +11 -0
- package/dist/api/evals/client.d.ts.map +1 -0
- package/dist/api/evals/client.js +12 -0
- package/dist/api/evals/extract/client.d.ts +287 -0
- package/dist/api/evals/extract/client.d.ts.map +1 -0
- package/dist/api/evals/extract/client.js +56 -0
- package/dist/api/evals/helpers.d.ts +30 -0
- package/dist/api/evals/helpers.d.ts.map +1 -0
- package/dist/api/evals/helpers.js +46 -0
- package/dist/api/evals/schemas.d.ts +6522 -0
- package/dist/api/evals/schemas.d.ts.map +1 -0
- package/dist/api/evals/schemas.js +219 -0
- package/dist/api/evals/split/client.d.ts +105 -0
- package/dist/api/evals/split/client.d.ts.map +1 -0
- package/dist/api/evals/split/client.js +28 -0
- package/dist/api/extractions/client.d.ts +3 -43
- package/dist/api/extractions/client.d.ts.map +1 -1
- package/dist/api/extractions/client.js +3 -64
- package/dist/api/files/client.d.ts +9 -1
- package/dist/api/files/client.d.ts.map +1 -1
- package/dist/api/files/client.js +7 -1
- package/dist/api/jobs/client.d.ts +11 -9
- package/dist/api/jobs/client.d.ts.map +1 -1
- package/dist/api/jobs/client.js +7 -11
- package/dist/api/models/client.d.ts +3 -10
- package/dist/api/models/client.d.ts.map +1 -1
- package/dist/api/models/client.js +9 -8
- package/dist/api/projects/client.d.ts +1640 -4
- package/dist/api/projects/client.d.ts.map +1 -1
- package/dist/api/projects/client.js +451 -22
- package/dist/api/schemas/client.d.ts +3 -0
- package/dist/api/schemas/client.d.ts.map +1 -1
- package/dist/api/workflows/blocks/client.d.ts +67 -0
- package/dist/api/workflows/blocks/client.d.ts.map +1 -0
- package/dist/api/workflows/blocks/client.js +132 -0
- package/dist/api/workflows/client.d.ts +73 -1
- package/dist/api/workflows/client.d.ts.map +1 -1
- package/dist/api/workflows/client.js +121 -1
- package/dist/api/workflows/edges/client.d.ts +66 -0
- package/dist/api/workflows/edges/client.d.ts.map +1 -0
- package/dist/api/workflows/edges/client.js +120 -0
- package/dist/api/workflows/runs/client.d.ts +57 -113
- package/dist/api/workflows/runs/client.d.ts.map +1 -1
- package/dist/api/workflows/runs/client.js +111 -112
- package/dist/api/workflows/runs/steps/client.d.ts +35 -13
- package/dist/api/workflows/runs/steps/client.d.ts.map +1 -1
- package/dist/api/workflows/runs/steps/client.js +61 -13
- package/dist/client.d.ts +4 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +78 -4
- package/dist/generated_types.d.ts +7751 -2718
- package/dist/generated_types.d.ts.map +1 -1
- package/dist/generated_types.js +709 -68
- package/dist/mime.d.ts.map +1 -1
- package/dist/mime.js +11 -1
- package/dist/schema_types.d.ts +2 -2
- package/dist/schema_types.d.ts.map +1 -1
- package/dist/schema_types.js +2 -2
- package/dist/types.d.ts +614 -109
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +70 -14
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/api/evals/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAUzB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAI3B,CAAC;AACjB,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAE3F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAWvB,CAAC;AACjB,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { ZBaseMIMEData, ZCategory, ZInferenceSettings, ZPredictionData, ZSubdocument, } from "../../generated_types.js";
|
|
3
|
+
export const ZSplitProjectDraftConfig = z.object({
|
|
4
|
+
inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
5
|
+
split_config: z.array(ZSubdocument).default([]),
|
|
6
|
+
json_schema: z.record(z.any()).default({}),
|
|
7
|
+
subdocuments: z.array(ZSubdocument).default([]),
|
|
8
|
+
}).passthrough();
|
|
9
|
+
export const ZSplitProjectPublishedConfig = ZSplitProjectDraftConfig.extend({
|
|
10
|
+
origin: z.string().default("manual"),
|
|
11
|
+
}).passthrough();
|
|
12
|
+
export const ZSplitProject = z.object({
|
|
13
|
+
id: z.string(),
|
|
14
|
+
name: z.string().default(""),
|
|
15
|
+
updated_at: z.string(),
|
|
16
|
+
published_config: ZSplitProjectPublishedConfig,
|
|
17
|
+
draft_config: ZSplitProjectDraftConfig,
|
|
18
|
+
is_published: z.boolean().default(false),
|
|
19
|
+
}).passthrough();
|
|
20
|
+
export const ZCreateSplitProjectRequest = z.object({
|
|
21
|
+
name: z.string(),
|
|
22
|
+
split_config: z.array(ZSubdocument).default([]),
|
|
23
|
+
}).passthrough();
|
|
24
|
+
export const ZPatchSplitProjectRequest = z.object({
|
|
25
|
+
name: z.string().nullable().optional(),
|
|
26
|
+
published_config: ZSplitProjectPublishedConfig.nullable().optional(),
|
|
27
|
+
draft_config: ZSplitProjectDraftConfig.nullable().optional(),
|
|
28
|
+
is_published: z.boolean().nullable().optional(),
|
|
29
|
+
}).passthrough();
|
|
30
|
+
export const ZSplitBuilderDocument = z.object({
|
|
31
|
+
id: z.string(),
|
|
32
|
+
updated_at: z.string(),
|
|
33
|
+
project_id: z.string(),
|
|
34
|
+
mime_data: ZBaseMIMEData,
|
|
35
|
+
prediction_data: ZPredictionData.default({}),
|
|
36
|
+
split_id: z.string().nullable().optional(),
|
|
37
|
+
extraction_id: z.string().nullable().optional(),
|
|
38
|
+
}).passthrough();
|
|
39
|
+
export const ZSplitDataset = z.object({
|
|
40
|
+
id: z.string(),
|
|
41
|
+
name: z.string().default(""),
|
|
42
|
+
updated_at: z.string(),
|
|
43
|
+
base_split_config: z.array(ZSubdocument).default([]),
|
|
44
|
+
base_json_schema: z.record(z.any()).default({}),
|
|
45
|
+
base_subdocuments: z.array(ZSubdocument).default([]),
|
|
46
|
+
base_inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
47
|
+
project_id: z.string(),
|
|
48
|
+
}).passthrough();
|
|
49
|
+
export const ZCreateSplitDatasetRequest = z.object({
|
|
50
|
+
name: z.string(),
|
|
51
|
+
base_split_config: z.array(ZSubdocument).default([]),
|
|
52
|
+
base_inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
53
|
+
}).passthrough();
|
|
54
|
+
export const ZPatchSplitDatasetRequest = z.object({
|
|
55
|
+
name: z.string().nullable().optional(),
|
|
56
|
+
}).passthrough();
|
|
57
|
+
export const ZSplitDatasetDocument = z.object({
|
|
58
|
+
id: z.string(),
|
|
59
|
+
updated_at: z.string(),
|
|
60
|
+
project_id: z.string(),
|
|
61
|
+
dataset_id: z.string(),
|
|
62
|
+
mime_data: ZBaseMIMEData,
|
|
63
|
+
prediction_data: ZPredictionData.default({}),
|
|
64
|
+
extraction_id: z.string().nullable().optional(),
|
|
65
|
+
split_id: z.string().nullable().optional(),
|
|
66
|
+
validation_flags: z.record(z.any()).default({}),
|
|
67
|
+
}).passthrough();
|
|
68
|
+
export const ZSplitConfigOverrides = z.object({
|
|
69
|
+
descriptions_override: z.record(z.string()).nullable().optional(),
|
|
70
|
+
partition_keys_override: z.record(z.string().nullable()).nullable().optional(),
|
|
71
|
+
}).passthrough();
|
|
72
|
+
export const ZSplitDraftIteration = z.object({
|
|
73
|
+
split_config_overrides: ZSplitConfigOverrides.default({}),
|
|
74
|
+
updated_at: z.string().optional(),
|
|
75
|
+
inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
76
|
+
}).passthrough();
|
|
77
|
+
export const ZSplitIteration = z.object({
|
|
78
|
+
id: z.string(),
|
|
79
|
+
updated_at: z.string(),
|
|
80
|
+
inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
81
|
+
split_config_overrides: ZSplitConfigOverrides.default({}),
|
|
82
|
+
parent_id: z.string().nullable().optional(),
|
|
83
|
+
project_id: z.string(),
|
|
84
|
+
dataset_id: z.string(),
|
|
85
|
+
draft: ZSplitDraftIteration.default({}),
|
|
86
|
+
status: z.string().default("draft"),
|
|
87
|
+
finalized_at: z.string().nullable().optional(),
|
|
88
|
+
last_finalize_error: z.string().nullable().optional(),
|
|
89
|
+
}).passthrough();
|
|
90
|
+
export const ZCreateSplitIterationRequest = z.object({
|
|
91
|
+
inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
92
|
+
split_config_overrides: ZSplitConfigOverrides.default({}),
|
|
93
|
+
project_id: z.string(),
|
|
94
|
+
dataset_id: z.string(),
|
|
95
|
+
parent_id: z.string().nullable().optional(),
|
|
96
|
+
}).passthrough();
|
|
97
|
+
export const ZPatchSplitIterationRequest = z.object({
|
|
98
|
+
inference_settings: ZInferenceSettings.nullable().optional(),
|
|
99
|
+
split_config_overrides: ZSplitConfigOverrides.nullable().optional(),
|
|
100
|
+
draft: ZSplitDraftIteration.nullable().optional(),
|
|
101
|
+
}).passthrough();
|
|
102
|
+
export const ZSplitIterationDocument = z.object({
|
|
103
|
+
id: z.string(),
|
|
104
|
+
updated_at: z.string(),
|
|
105
|
+
project_id: z.string(),
|
|
106
|
+
iteration_id: z.string(),
|
|
107
|
+
dataset_id: z.string(),
|
|
108
|
+
dataset_document_id: z.string(),
|
|
109
|
+
mime_data: ZBaseMIMEData,
|
|
110
|
+
prediction_data: ZPredictionData.default({}),
|
|
111
|
+
extraction_id: z.string().nullable().optional(),
|
|
112
|
+
split_id: z.string().nullable().optional(),
|
|
113
|
+
}).passthrough();
|
|
114
|
+
export const ZClassifyProjectDraftConfig = z.object({
|
|
115
|
+
inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
116
|
+
categories: z.array(ZCategory).default([]),
|
|
117
|
+
}).passthrough();
|
|
118
|
+
export const ZClassifyProjectPublishedConfig = ZClassifyProjectDraftConfig.extend({
|
|
119
|
+
origin: z.string().default("manual"),
|
|
120
|
+
}).passthrough();
|
|
121
|
+
export const ZClassifyProject = z.object({
|
|
122
|
+
id: z.string(),
|
|
123
|
+
name: z.string().default(""),
|
|
124
|
+
updated_at: z.string(),
|
|
125
|
+
published_config: ZClassifyProjectPublishedConfig,
|
|
126
|
+
draft_config: ZClassifyProjectDraftConfig,
|
|
127
|
+
is_published: z.boolean().default(false),
|
|
128
|
+
}).passthrough();
|
|
129
|
+
export const ZCreateClassifyProjectRequest = z.object({
|
|
130
|
+
name: z.string(),
|
|
131
|
+
categories: z.array(ZCategory).default([]),
|
|
132
|
+
}).passthrough();
|
|
133
|
+
export const ZPatchClassifyProjectRequest = z.object({
|
|
134
|
+
name: z.string().nullable().optional(),
|
|
135
|
+
published_config: ZClassifyProjectPublishedConfig.nullable().optional(),
|
|
136
|
+
draft_config: ZClassifyProjectDraftConfig.nullable().optional(),
|
|
137
|
+
is_published: z.boolean().nullable().optional(),
|
|
138
|
+
}).passthrough();
|
|
139
|
+
export const ZClassifyBuilderDocument = z.object({
|
|
140
|
+
id: z.string(),
|
|
141
|
+
updated_at: z.string(),
|
|
142
|
+
project_id: z.string(),
|
|
143
|
+
mime_data: ZBaseMIMEData,
|
|
144
|
+
prediction_data: ZPredictionData.default({}),
|
|
145
|
+
classification_id: z.string().nullable().optional(),
|
|
146
|
+
extraction_id: z.string().nullable().optional(),
|
|
147
|
+
}).passthrough();
|
|
148
|
+
export const ZClassifyDataset = z.object({
|
|
149
|
+
id: z.string(),
|
|
150
|
+
name: z.string().default(""),
|
|
151
|
+
updated_at: z.string(),
|
|
152
|
+
base_categories: z.array(ZCategory).default([]),
|
|
153
|
+
base_inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
154
|
+
project_id: z.string(),
|
|
155
|
+
}).passthrough();
|
|
156
|
+
export const ZCreateClassifyDatasetRequest = z.object({
|
|
157
|
+
name: z.string(),
|
|
158
|
+
base_categories: z.array(ZCategory).default([]),
|
|
159
|
+
base_inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
160
|
+
}).passthrough();
|
|
161
|
+
export const ZPatchClassifyDatasetRequest = z.object({
|
|
162
|
+
name: z.string().nullable().optional(),
|
|
163
|
+
}).passthrough();
|
|
164
|
+
export const ZClassifyDatasetDocument = z.object({
|
|
165
|
+
id: z.string(),
|
|
166
|
+
updated_at: z.string(),
|
|
167
|
+
project_id: z.string(),
|
|
168
|
+
dataset_id: z.string(),
|
|
169
|
+
mime_data: ZBaseMIMEData,
|
|
170
|
+
prediction_data: ZPredictionData.default({}),
|
|
171
|
+
classification_id: z.string().nullable().optional(),
|
|
172
|
+
extraction_id: z.string().nullable().optional(),
|
|
173
|
+
validation_flag: z.boolean().nullable().optional(),
|
|
174
|
+
}).passthrough();
|
|
175
|
+
export const ZCategoryOverrides = z.object({
|
|
176
|
+
description_overrides: z.record(z.string()).default({}),
|
|
177
|
+
}).passthrough();
|
|
178
|
+
export const ZClassifyDraftIteration = z.object({
|
|
179
|
+
category_overrides: ZCategoryOverrides.default({}),
|
|
180
|
+
updated_at: z.string().optional(),
|
|
181
|
+
inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
182
|
+
}).passthrough();
|
|
183
|
+
export const ZClassifyIteration = z.object({
|
|
184
|
+
id: z.string(),
|
|
185
|
+
updated_at: z.string(),
|
|
186
|
+
inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
187
|
+
category_overrides: ZCategoryOverrides.default({}),
|
|
188
|
+
parent_id: z.string().nullable().optional(),
|
|
189
|
+
project_id: z.string(),
|
|
190
|
+
dataset_id: z.string(),
|
|
191
|
+
draft: ZClassifyDraftIteration.default({}),
|
|
192
|
+
status: z.string().default("draft"),
|
|
193
|
+
finalized_at: z.string().nullable().optional(),
|
|
194
|
+
last_finalize_error: z.string().nullable().optional(),
|
|
195
|
+
}).passthrough();
|
|
196
|
+
export const ZCreateClassifyIterationRequest = z.object({
|
|
197
|
+
inference_settings: ZInferenceSettings.default({ model: "retab-small", image_resolution_dpi: 192, n_consensus: 1 }),
|
|
198
|
+
category_overrides: ZCategoryOverrides.default({}),
|
|
199
|
+
project_id: z.string(),
|
|
200
|
+
dataset_id: z.string(),
|
|
201
|
+
parent_id: z.string().nullable().optional(),
|
|
202
|
+
}).passthrough();
|
|
203
|
+
export const ZPatchClassifyIterationRequest = z.object({
|
|
204
|
+
inference_settings: ZInferenceSettings.nullable().optional(),
|
|
205
|
+
category_overrides: ZCategoryOverrides.nullable().optional(),
|
|
206
|
+
draft: ZClassifyDraftIteration.nullable().optional(),
|
|
207
|
+
}).passthrough();
|
|
208
|
+
export const ZClassifyIterationDocument = z.object({
|
|
209
|
+
id: z.string(),
|
|
210
|
+
updated_at: z.string(),
|
|
211
|
+
project_id: z.string(),
|
|
212
|
+
iteration_id: z.string(),
|
|
213
|
+
dataset_id: z.string(),
|
|
214
|
+
dataset_document_id: z.string(),
|
|
215
|
+
mime_data: ZBaseMIMEData,
|
|
216
|
+
prediction_data: ZPredictionData.default({}),
|
|
217
|
+
classification_id: z.string().nullable().optional(),
|
|
218
|
+
extraction_id: z.string().nullable().optional(),
|
|
219
|
+
}).passthrough();
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { CompositionClient, RequestOptions } from "../../../client.js";
|
|
2
|
+
import { MIMEDataInput } from "../../../types.js";
|
|
3
|
+
export default class APIEvalsSplit extends CompositionClient {
|
|
4
|
+
process({ eval_id, iteration_id, document, model, image_resolution_dpi, n_consensus, metadata, extraction_id, ...rest }: {
|
|
5
|
+
eval_id: string;
|
|
6
|
+
iteration_id?: string;
|
|
7
|
+
document?: MIMEDataInput;
|
|
8
|
+
model?: string;
|
|
9
|
+
image_resolution_dpi?: number;
|
|
10
|
+
n_consensus?: number;
|
|
11
|
+
metadata?: Record<string, string>;
|
|
12
|
+
extraction_id?: string;
|
|
13
|
+
}, options?: RequestOptions): Promise<{
|
|
14
|
+
object: "chat.completion";
|
|
15
|
+
id: string;
|
|
16
|
+
model: string;
|
|
17
|
+
choices: {
|
|
18
|
+
message: {
|
|
19
|
+
role: "assistant";
|
|
20
|
+
content?: string | null | undefined;
|
|
21
|
+
tool_calls?: {
|
|
22
|
+
function: {
|
|
23
|
+
arguments: string;
|
|
24
|
+
name: string;
|
|
25
|
+
parsed_arguments?: import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough"> | null | undefined;
|
|
26
|
+
};
|
|
27
|
+
type: "function";
|
|
28
|
+
id: string;
|
|
29
|
+
}[] | null | undefined;
|
|
30
|
+
function_call?: {
|
|
31
|
+
arguments: string;
|
|
32
|
+
name: string;
|
|
33
|
+
} | null | undefined;
|
|
34
|
+
refusal?: string | null | undefined;
|
|
35
|
+
annotations?: {
|
|
36
|
+
type: "url_citation";
|
|
37
|
+
url_citation: {
|
|
38
|
+
url: string;
|
|
39
|
+
title: string;
|
|
40
|
+
end_index: number;
|
|
41
|
+
start_index: number;
|
|
42
|
+
};
|
|
43
|
+
}[] | null | undefined;
|
|
44
|
+
audio?: {
|
|
45
|
+
id: string;
|
|
46
|
+
data: string;
|
|
47
|
+
expires_at: number;
|
|
48
|
+
transcript: string;
|
|
49
|
+
} | null | undefined;
|
|
50
|
+
parsed?: any;
|
|
51
|
+
};
|
|
52
|
+
index: number;
|
|
53
|
+
logprobs?: {
|
|
54
|
+
content?: {
|
|
55
|
+
token: string;
|
|
56
|
+
logprob: number;
|
|
57
|
+
top_logprobs: {
|
|
58
|
+
token: string;
|
|
59
|
+
logprob: number;
|
|
60
|
+
bytes?: number[] | null | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
bytes?: number[] | null | undefined;
|
|
63
|
+
}[] | null | undefined;
|
|
64
|
+
refusal?: {
|
|
65
|
+
token: string;
|
|
66
|
+
logprob: number;
|
|
67
|
+
top_logprobs: {
|
|
68
|
+
token: string;
|
|
69
|
+
logprob: number;
|
|
70
|
+
bytes?: number[] | null | undefined;
|
|
71
|
+
}[];
|
|
72
|
+
bytes?: number[] | null | undefined;
|
|
73
|
+
}[] | null | undefined;
|
|
74
|
+
} | null | undefined;
|
|
75
|
+
finish_reason?: "length" | "tool_calls" | "function_call" | "content_filter" | "stop" | null | undefined;
|
|
76
|
+
key_mapping?: Record<string, string | null | undefined> | null | undefined;
|
|
77
|
+
}[];
|
|
78
|
+
created: number;
|
|
79
|
+
likelihoods?: Record<string, any> | null | undefined;
|
|
80
|
+
extraction_id?: string | null | undefined;
|
|
81
|
+
usage?: {
|
|
82
|
+
credits: number;
|
|
83
|
+
} | {
|
|
84
|
+
completion_tokens: number;
|
|
85
|
+
prompt_tokens: number;
|
|
86
|
+
total_tokens: number;
|
|
87
|
+
completion_tokens_details?: {
|
|
88
|
+
accepted_prediction_tokens?: number | null | undefined;
|
|
89
|
+
audio_tokens?: number | null | undefined;
|
|
90
|
+
reasoning_tokens?: number | null | undefined;
|
|
91
|
+
rejected_prediction_tokens?: number | null | undefined;
|
|
92
|
+
} | null | undefined;
|
|
93
|
+
prompt_tokens_details?: {
|
|
94
|
+
audio_tokens?: number | null | undefined;
|
|
95
|
+
cached_tokens?: number | null | undefined;
|
|
96
|
+
} | null | undefined;
|
|
97
|
+
} | null | undefined;
|
|
98
|
+
service_tier?: "default" | "auto" | "flex" | "scale" | "priority" | null | undefined;
|
|
99
|
+
system_fingerprint?: string | null | undefined;
|
|
100
|
+
request_at?: string | null | undefined;
|
|
101
|
+
first_token_at?: string | null | undefined;
|
|
102
|
+
last_token_at?: string | null | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/api/evals/split/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,aAAa,EAA8B,MAAM,mBAAmB,CAAC;AAG9E,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,iBAAiB;IAClD,OAAO,CAAC,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,aAAa,EACb,GAAG,IAAI,EACV,EAAE;QACC,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,aAAa,CAAC,EAAE,MAAM,CAAC;KAC1B,EAAE,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuB9B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CompositionClient } from "../../../client.js";
|
|
2
|
+
import { ZRetabParsedChatCompletion } from "../../../types.js";
|
|
3
|
+
import { buildProcessMultipartBody } from "../helpers.js";
|
|
4
|
+
export default class APIEvalsSplit extends CompositionClient {
|
|
5
|
+
async process({ eval_id, iteration_id, document, model, image_resolution_dpi, n_consensus, metadata, extraction_id, ...rest }, options) {
|
|
6
|
+
if ("documents" in rest) {
|
|
7
|
+
throw new Error("client.evals.split.process(...) accepts only 'document'.");
|
|
8
|
+
}
|
|
9
|
+
const body = await buildProcessMultipartBody({
|
|
10
|
+
document,
|
|
11
|
+
model,
|
|
12
|
+
image_resolution_dpi,
|
|
13
|
+
n_consensus,
|
|
14
|
+
metadata,
|
|
15
|
+
extraction_id,
|
|
16
|
+
extra: options?.body,
|
|
17
|
+
});
|
|
18
|
+
const url = iteration_id ? `/evals/split/extract/${eval_id}/${iteration_id}` : `/evals/split/extract/${eval_id}`;
|
|
19
|
+
return this._fetchJson(ZRetabParsedChatCompletion, {
|
|
20
|
+
url,
|
|
21
|
+
method: "POST",
|
|
22
|
+
body,
|
|
23
|
+
bodyMime: "multipart/form-data",
|
|
24
|
+
params: options?.params,
|
|
25
|
+
headers: options?.headers,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import { CompositionClient, RequestOptions } from "../../client.js";
|
|
2
2
|
import { PaginatedList } from "../../types.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
|
-
declare const ZDownloadResponse: z.ZodObject<{
|
|
5
|
-
download_url: z.ZodString;
|
|
6
|
-
filename: z.ZodString;
|
|
7
|
-
expires_at: z.ZodString;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
filename: string;
|
|
10
|
-
download_url: string;
|
|
11
|
-
expires_at: string;
|
|
12
|
-
}, {
|
|
13
|
-
filename: string;
|
|
14
|
-
download_url: string;
|
|
15
|
-
expires_at: string;
|
|
16
|
-
}>;
|
|
17
|
-
type DownloadResponse = z.infer<typeof ZDownloadResponse>;
|
|
18
4
|
declare const ZExtraction: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
19
5
|
type Extraction = z.infer<typeof ZExtraction>;
|
|
20
6
|
export default class APIExtractions extends CompositionClient {
|
|
@@ -22,40 +8,18 @@ export default class APIExtractions extends CompositionClient {
|
|
|
22
8
|
/**
|
|
23
9
|
* List extractions with pagination and filtering.
|
|
24
10
|
*/
|
|
25
|
-
list({ before, after, limit, order,
|
|
11
|
+
list({ before, after, limit, order, origin_type, origin_id, from_date, to_date, metadata, filename, }?: {
|
|
26
12
|
before?: string;
|
|
27
13
|
after?: string;
|
|
28
14
|
limit?: number;
|
|
29
15
|
order?: "asc" | "desc";
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
origin_type?: string;
|
|
17
|
+
origin_id?: string;
|
|
32
18
|
from_date?: Date;
|
|
33
19
|
to_date?: Date;
|
|
34
20
|
metadata?: Record<string, string>;
|
|
35
21
|
filename?: string;
|
|
36
22
|
}, options?: RequestOptions): Promise<PaginatedList>;
|
|
37
|
-
/**
|
|
38
|
-
* Download extractions in various formats.
|
|
39
|
-
*/
|
|
40
|
-
download({ order, origin_dot_id, from_date, to_date, metadata, filename, format, }?: {
|
|
41
|
-
order?: "asc" | "desc";
|
|
42
|
-
origin_dot_id?: string;
|
|
43
|
-
from_date?: Date;
|
|
44
|
-
to_date?: Date;
|
|
45
|
-
metadata?: Record<string, string>;
|
|
46
|
-
filename?: string;
|
|
47
|
-
format?: "jsonl" | "csv" | "xlsx";
|
|
48
|
-
}, options?: RequestOptions): Promise<DownloadResponse>;
|
|
49
|
-
/**
|
|
50
|
-
* Update an extraction.
|
|
51
|
-
*/
|
|
52
|
-
update(extraction_id: string, { predictions, predictions_draft, json_schema, inference_settings, metadata, }: {
|
|
53
|
-
predictions?: Record<string, any>;
|
|
54
|
-
predictions_draft?: Record<string, any>;
|
|
55
|
-
json_schema?: Record<string, any>;
|
|
56
|
-
inference_settings?: Record<string, any>;
|
|
57
|
-
metadata?: Record<string, string>;
|
|
58
|
-
}, options?: RequestOptions): Promise<Extraction>;
|
|
59
23
|
/**
|
|
60
24
|
* Get an extraction by ID.
|
|
61
25
|
*/
|
|
@@ -69,10 +33,6 @@ export default class APIExtractions extends CompositionClient {
|
|
|
69
33
|
* @param extraction_id - ID of the extraction to source
|
|
70
34
|
*/
|
|
71
35
|
sources(extraction_id: string, options?: RequestOptions): Promise<Record<string, any>>;
|
|
72
|
-
/**
|
|
73
|
-
* Delete an extraction by ID.
|
|
74
|
-
*/
|
|
75
|
-
delete(extraction_id: string, options?: RequestOptions): Promise<void>;
|
|
76
36
|
}
|
|
77
37
|
export {};
|
|
78
38
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/extractions/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAkB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"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,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CASlC"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { CompositionClient } from "../../client.js";
|
|
2
2
|
import { ZPaginatedList } from "../../types.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
|
-
const ZDownloadResponse = z.object({
|
|
5
|
-
download_url: z.string(),
|
|
6
|
-
filename: z.string(),
|
|
7
|
-
expires_at: z.string(),
|
|
8
|
-
});
|
|
9
4
|
// Generic extraction object (flexible since schema varies)
|
|
10
5
|
const ZExtraction = z.record(z.any());
|
|
11
6
|
export default class APIExtractions extends CompositionClient {
|
|
@@ -15,14 +10,14 @@ export default class APIExtractions extends CompositionClient {
|
|
|
15
10
|
/**
|
|
16
11
|
* List extractions with pagination and filtering.
|
|
17
12
|
*/
|
|
18
|
-
async list({ before, after, limit = 10, order = "desc",
|
|
13
|
+
async list({ before, after, limit = 10, order = "desc", origin_type, origin_id, from_date, to_date, metadata, filename, } = {}, options) {
|
|
19
14
|
const params = {
|
|
20
15
|
before,
|
|
21
16
|
after,
|
|
22
17
|
limit,
|
|
23
18
|
order,
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
origin_type,
|
|
20
|
+
origin_id,
|
|
26
21
|
from_date: from_date?.toISOString(),
|
|
27
22
|
to_date: to_date?.toISOString(),
|
|
28
23
|
filename,
|
|
@@ -37,51 +32,6 @@ export default class APIExtractions extends CompositionClient {
|
|
|
37
32
|
headers: options?.headers,
|
|
38
33
|
});
|
|
39
34
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Download extractions in various formats.
|
|
42
|
-
*/
|
|
43
|
-
async download({ order = "desc", origin_dot_id, from_date, to_date, metadata, filename, format = "jsonl", } = {}, options) {
|
|
44
|
-
const params = {
|
|
45
|
-
order,
|
|
46
|
-
origin_dot_id,
|
|
47
|
-
from_date: from_date?.toISOString(),
|
|
48
|
-
to_date: to_date?.toISOString(),
|
|
49
|
-
filename,
|
|
50
|
-
format,
|
|
51
|
-
// Note: metadata must be JSON-serialized as the backend expects a JSON string
|
|
52
|
-
metadata: metadata ? JSON.stringify(metadata) : undefined,
|
|
53
|
-
};
|
|
54
|
-
const cleanParams = Object.fromEntries(Object.entries(params).filter(([_, v]) => v !== undefined));
|
|
55
|
-
return this._fetchJson(ZDownloadResponse, {
|
|
56
|
-
url: "/extractions/download",
|
|
57
|
-
method: "GET",
|
|
58
|
-
params: { ...cleanParams, ...(options?.params || {}) },
|
|
59
|
-
headers: options?.headers,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Update an extraction.
|
|
64
|
-
*/
|
|
65
|
-
async update(extraction_id, { predictions, predictions_draft, json_schema, inference_settings, metadata, }, options) {
|
|
66
|
-
const body = {};
|
|
67
|
-
if (predictions !== undefined)
|
|
68
|
-
body.predictions = predictions;
|
|
69
|
-
if (predictions_draft !== undefined)
|
|
70
|
-
body.predictions_draft = predictions_draft;
|
|
71
|
-
if (json_schema !== undefined)
|
|
72
|
-
body.json_schema = json_schema;
|
|
73
|
-
if (inference_settings !== undefined)
|
|
74
|
-
body.inference_settings = inference_settings;
|
|
75
|
-
if (metadata !== undefined)
|
|
76
|
-
body.metadata = metadata;
|
|
77
|
-
return this._fetchJson(ZExtraction, {
|
|
78
|
-
url: `/extractions/${extraction_id}`,
|
|
79
|
-
method: "PATCH",
|
|
80
|
-
body: { ...body, ...(options?.body || {}) },
|
|
81
|
-
params: options?.params,
|
|
82
|
-
headers: options?.headers,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
35
|
/**
|
|
86
36
|
* Get an extraction by ID.
|
|
87
37
|
*/
|
|
@@ -109,15 +59,4 @@ export default class APIExtractions extends CompositionClient {
|
|
|
109
59
|
headers: options?.headers,
|
|
110
60
|
});
|
|
111
61
|
}
|
|
112
|
-
/**
|
|
113
|
-
* Delete an extraction by ID.
|
|
114
|
-
*/
|
|
115
|
-
async delete(extraction_id, options) {
|
|
116
|
-
return this._fetchJson({
|
|
117
|
-
url: `/extractions/${extraction_id}`,
|
|
118
|
-
method: "DELETE",
|
|
119
|
-
params: options?.params,
|
|
120
|
-
headers: options?.headers,
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
62
|
}
|
|
@@ -41,7 +41,7 @@ declare const ZFileLink: z.ZodObject<{
|
|
|
41
41
|
expires_in: string;
|
|
42
42
|
}>;
|
|
43
43
|
type FileLink = z.infer<typeof ZFileLink>;
|
|
44
|
-
declare const ZUploadFileResponse: z.ZodObject<{
|
|
44
|
+
declare const ZUploadFileResponse: z.ZodEffects<z.ZodObject<{
|
|
45
45
|
fileId: z.ZodString;
|
|
46
46
|
filename: z.ZodString;
|
|
47
47
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -50,6 +50,13 @@ declare const ZUploadFileResponse: z.ZodObject<{
|
|
|
50
50
|
}, {
|
|
51
51
|
filename: string;
|
|
52
52
|
fileId: string;
|
|
53
|
+
}>, {
|
|
54
|
+
file_id: string;
|
|
55
|
+
filename: string;
|
|
56
|
+
fileId: string;
|
|
57
|
+
}, {
|
|
58
|
+
filename: string;
|
|
59
|
+
fileId: string;
|
|
53
60
|
}>;
|
|
54
61
|
type UploadFileResponse = z.infer<typeof ZUploadFileResponse>;
|
|
55
62
|
export default class APIFiles extends CompositionClient {
|
|
@@ -66,6 +73,7 @@ export default class APIFiles extends CompositionClient {
|
|
|
66
73
|
}, options?: RequestOptions): Promise<PaginatedList>;
|
|
67
74
|
get(fileId: string, options?: RequestOptions): Promise<File>;
|
|
68
75
|
getDownloadLink(fileId: string, options?: RequestOptions): Promise<FileLink>;
|
|
76
|
+
get_download_link(fileId: string, options?: RequestOptions): Promise<FileLink>;
|
|
69
77
|
}
|
|
70
78
|
export {};
|
|
71
79
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/files/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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AAG,OAAO,CAAC,kBAAkB,CAAC;IAWtF,IAAI,CACN,EACI,MAAM,EACN,KAAK,EACL,KAAU,EACV,KAAc,EACd,QAAQ,EACR,SAAS,EACT,OAAsB,GACzB,GAAE;QACC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KACf,EACN,OAAO,CAAC,EAAE,cAAc,GACzB,OAAO,CAAC,aAAa,CAAC;IAqBnB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5D,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAS5E,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;CAGvF"}
|
package/dist/api/files/client.js
CHANGED
|
@@ -18,7 +18,10 @@ const ZFileLink = z.object({
|
|
|
18
18
|
const ZUploadFileResponse = z.object({
|
|
19
19
|
fileId: z.string(),
|
|
20
20
|
filename: z.string(),
|
|
21
|
-
})
|
|
21
|
+
}).transform((value) => ({
|
|
22
|
+
...value,
|
|
23
|
+
file_id: value.fileId,
|
|
24
|
+
}));
|
|
22
25
|
export default class APIFiles extends CompositionClient {
|
|
23
26
|
constructor(client) {
|
|
24
27
|
super(client);
|
|
@@ -67,4 +70,7 @@ export default class APIFiles extends CompositionClient {
|
|
|
67
70
|
headers: options?.headers,
|
|
68
71
|
});
|
|
69
72
|
}
|
|
73
|
+
async get_download_link(fileId, options) {
|
|
74
|
+
return this.getDownloadLink(fileId, options);
|
|
75
|
+
}
|
|
70
76
|
}
|