Skip to content

Commit 8dbebd0

Browse files
committed
fix(docs): cite the real Mistral options behind tables, header and footer
The previous wording was self-contradictory on tables: it described placeholder-referenced table objects and then asserted the list is empty. Mistral's OCR API does expose table_format, extract_header and extract_footer. table_format defaults to inline markdown, so the separate tables list stays empty; extract_header and extract_footer default to false, so neither field is returned. Sim sets none of the three. Name the option and its default in each description instead of asserting an outcome the request body alone does not establish.
1 parent ea967cf commit 8dbebd0

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

apps/docs/content/docs/en/integrations/mistral_parse.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ Parse PDF documents using Mistral OCR API
6464
|`dpi` | number | Dots per inch |
6565
|`height` | number | Page height in pixels |
6666
|`width` | number | Page width in pixels |
67-
|`tables` | array | Extracted tables as HTML/markdown, referenced via placeholders like \[tbl-0.html\]. Sim sends no table-extraction option, so this is empty |
67+
|`tables` | array | Separate table objects, referenced from the markdown via placeholders like \[tbl-0.html\]. Mistral populates these only when table_format is "markdown" or "html"; Sim never sets it, so tables stay inline in the markdown and this list is empty |
6868
|`hyperlinks` | array | Array of URL strings detected in the page \(e.g., \["https://...", "mailto:..."\]\) |
69-
|`header` | string | Page header content. Sim sends no header-extraction option, so this is not returned |
70-
|`footer` | string | Page footer content. Sim sends no footer-extraction option, so this is not returned |
69+
|`header` | string | Page header content. Mistral returns it only when extract_header is true \(it defaults to false\); Sim never sets it, so this is not returned |
70+
|`footer` | string | Page footer content. Mistral returns it only when extract_footer is true \(it defaults to false\); Sim never sets it, so this is not returned |
7171
| `model` | string | Mistral OCR model identifier \(e.g., mistral-ocr-latest\) |
7272
| `usage_info` | object | Usage and processing statistics |
7373
|`pages_processed` | number | Total number of pages processed |

apps/sim/tools/generated/tool-outputs.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/mistral/parser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ export const mistralParserV2Tool: InternalToolConfig<MistralParserInput, Mistral
485485
tables: {
486486
type: 'array',
487487
description:
488-
'Extracted tables as HTML/markdown, referenced via placeholders like [tbl-0.html]. Sim sends no table-extraction option, so this is empty',
488+
'Separate table objects, referenced from the markdown via placeholders like [tbl-0.html]. Mistral populates these only when table_format is "markdown" or "html"; Sim never sets it, so tables stay inline in the markdown and this list is empty',
489489
},
490490
hyperlinks: {
491491
type: 'array',
@@ -499,13 +499,13 @@ export const mistralParserV2Tool: InternalToolConfig<MistralParserInput, Mistral
499499
header: {
500500
type: 'string',
501501
description:
502-
'Page header content. Sim sends no header-extraction option, so this is not returned',
502+
'Page header content. Mistral returns it only when extract_header is true (it defaults to false); Sim never sets it, so this is not returned',
503503
optional: true,
504504
},
505505
footer: {
506506
type: 'string',
507507
description:
508-
'Page footer content. Sim sends no footer-extraction option, so this is not returned',
508+
'Page footer content. Mistral returns it only when extract_footer is true (it defaults to false); Sim never sets it, so this is not returned',
509509
optional: true,
510510
},
511511
},

apps/sim/tools/mistral/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const MISTRAL_OCR_PAGE_OUTPUT_PROPERTIES = {
6060
tables: {
6161
type: 'array',
6262
description:
63-
'Extracted tables as HTML/markdown, referenced via placeholders like [tbl-0.html]. Sim sends no table-extraction option, so this is empty',
63+
'Separate table objects, referenced from the markdown via placeholders like [tbl-0.html]. Mistral populates these only when table_format is "markdown" or "html"; Sim never sets it, so tables stay inline in the markdown and this list is empty',
6464
},
6565
hyperlinks: {
6666
type: 'array',
@@ -70,13 +70,13 @@ export const MISTRAL_OCR_PAGE_OUTPUT_PROPERTIES = {
7070
header: {
7171
type: 'string',
7272
description:
73-
'Page header content. Sim sends no header-extraction option, so this is not returned',
73+
'Page header content. Mistral returns it only when extract_header is true (it defaults to false); Sim never sets it, so this is not returned',
7474
optional: true,
7575
},
7676
footer: {
7777
type: 'string',
7878
description:
79-
'Page footer content. Sim sends no footer-extraction option, so this is not returned',
79+
'Page footer content. Mistral returns it only when extract_footer is true (it defaults to false); Sim never sets it, so this is not returned',
8080
optional: true,
8181
},
8282
} as const satisfies Record<string, OutputProperty>

0 commit comments

Comments
 (0)