diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 4064cb6f..99c8806b 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -11697,6 +11697,30 @@ components: required: - 'data' type: 'object' + ExtractionAsset: + additionalProperties: false + description: 'An image or PDF sent once and referenced by its key in the `assets` map. `data_base64` is the file in standard base64 with no `data:` prefix. PDF is read by document models only.' + properties: + data_base64: + minLength: 1 + pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$' + type: 'string' + format: + enum: + - 'png' + - 'jpg' + - 'jpeg' + - 'pdf' + type: 'string' + type: + enum: + - 'image' + - 'document' + type: 'string' + required: + - 'format' + - 'data_base64' + type: 'object' ExtractionDateAnswer: properties: confidence: @@ -11710,10 +11734,11 @@ components: format: 'double' type: 'number' source: - description: 'Set to `image` when the answer was read from an image rather than the state text.' + description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.' enum: - 'state' - 'image' + - 'document' type: 'string' span: description: 'Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.' @@ -11739,6 +11764,7 @@ components: - 'value' type: 'object' ExtractionDateField: + additionalProperties: false properties: instructions: description: 'What the field should contain.' @@ -11769,10 +11795,11 @@ components: format: 'double' type: 'number' source: - description: 'Set to `image` when the answer was read from an image rather than the state text.' + description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.' enum: - 'state' - 'image' + - 'document' type: 'string' span: description: 'Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.' @@ -11798,6 +11825,7 @@ components: - 'value' type: 'object' ExtractionDatetimeField: + additionalProperties: false properties: instructions: description: 'What the field should contain.' @@ -11829,10 +11857,11 @@ components: format: 'double' type: 'number' source: - description: 'Set to `image` when the answer was read from an image rather than the state text.' + description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.' enum: - 'state' - 'image' + - 'document' type: 'string' span: description: 'Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.' @@ -11862,6 +11891,7 @@ components: - 'value' type: 'object' ExtractionDurationField: + additionalProperties: false properties: decimals: description: 'Decimal places kept in `value`.' @@ -11941,10 +11971,11 @@ components: - type: 'string' type: 'array' source: - description: 'Set to `image` when the answer was read from an image rather than the state text.' + description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.' enum: - 'state' - 'image' + - 'document' type: 'string' spell_confidence: description: 'Confidence in the spelling of text read from an image.' @@ -11965,6 +11996,7 @@ components: - 'value' type: 'object' ExtractionEstimateField: + additionalProperties: false properties: instructions: description: 'What the field should contain.' @@ -12058,10 +12090,11 @@ components: - type: 'string' type: 'array' source: - description: 'Set to `image` when the answer was read from an image rather than the state text.' + description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.' enum: - 'state' - 'image' + - 'document' type: 'string' spell_confidence: description: 'Confidence in the spelling of text read from an image.' @@ -12089,6 +12122,7 @@ components: - 'value' type: 'object' ExtractionForecastField: + additionalProperties: false properties: horizon: description: 'Number of forecast steps.' @@ -12206,6 +12240,12 @@ components: confidence: format: 'double' type: 'number' + confidences: + description: 'One confidence per item of `value`, in the same order.' + items: + format: 'double' + type: 'number' + type: 'array' guess: description: 'The most likely value even when `value` is null because `p_null` crossed the threshold.' items: @@ -12219,10 +12259,11 @@ components: format: 'double' type: 'number' source: - description: 'Set to `image` when the answer was read from an image rather than the state text.' + description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.' enum: - 'state' - 'image' + - 'document' type: 'string' spans: items: @@ -12255,6 +12296,7 @@ components: - 'value' type: 'object' ExtractionListField: + additionalProperties: false properties: decimals: description: 'Decimal places kept in `value`.' @@ -12298,10 +12340,11 @@ components: format: 'double' type: 'number' source: - description: 'Set to `image` when the answer was read from an image rather than the state text.' + description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.' enum: - 'state' - 'image' + - 'document' type: 'string' span: description: 'Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.' @@ -12328,6 +12371,7 @@ components: - 'value' type: 'object' ExtractionNumberField: + additionalProperties: false properties: decimals: description: 'Decimal places kept in `value`.' @@ -12355,11 +12399,12 @@ components: - 'type' type: 'object' ExtractionsRequest: + additionalProperties: false properties: assets: additionalProperties: - $ref: '#/components/schemas/DecisionsImageAsset' - description: 'Images keyed by reference string, as in TypeSafe''s API. Write a reference wherever the image belongs in `state`, `instructions`, or `criteria`; every asset must be referenced at least once. Jev reads a reference as a whole string value or inside longer text. Other Decisions models read a whole-string reference wherever they read an `image_url` part and reject a reference inside longer text.' + $ref: '#/components/schemas/ExtractionAsset' + description: 'Assets keyed by reference string. Write a reference wherever the asset belongs in `state` or a field `instructions`; every asset must be referenced at least once. A `state` that is exactly the sole asset''s key carries no text of its own and is read as file-only. A model that reads either text or a document per request, not both (ScaleDown Extract with a PDF), needs that form: any other text around the key is state text and is rejected with 400.' type: 'object' fields: additionalProperties: @@ -12500,10 +12545,11 @@ components: format: 'double' type: 'number' source: - description: 'Set to `image` when the answer was read from an image rather than the state text.' + description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.' enum: - 'state' - 'image' + - 'document' type: 'string' span: description: 'Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.' @@ -12529,6 +12575,7 @@ components: - 'value' type: 'object' ExtractionTextField: + additionalProperties: false properties: instructions: description: 'What the field should contain.' @@ -12559,10 +12606,11 @@ components: format: 'double' type: 'number' source: - description: 'Set to `image` when the answer was read from an image rather than the state text.' + description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.' enum: - 'state' - 'image' + - 'document' type: 'string' span: description: 'Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.' @@ -12588,6 +12636,7 @@ components: - 'value' type: 'object' ExtractionTimeField: + additionalProperties: false properties: instructions: description: 'What the field should contain.'