Skip to content

Commit 7c4f408

Browse files
committed
use named params
1 parent 6a2ed27 commit 7c4f408

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/code_samples/default_v2.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ $inferenceParams = new InferenceParameters(
2020
// Options: set to `true` or `false` to override defaults
2121

2222
// Enhance extraction accuracy with Retrieval-Augmented Generation.
23-
false,
23+
rag: null,
2424
// Extract the full text content from the document as strings.
25-
false,
25+
rawText: null,
2626
// Calculate bounding box polygons for all fields.
27-
false,
27+
polygon: null,
2828
// Boost the precision and accuracy of all extractions.
2929
// Calculate confidence scores for all fields.
30-
false
30+
confidence: null
3131
);
3232

3333
// Load a file from disk

tests/ClientV2TestFunctional.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function setUp(): void
2424
public function testParseFileEmptyMultiPageMustSucceed(): void
2525
{
2626
$source = new PathInput(__DIR__ . '/resources/file_types/pdf/multipage_cut-2.pdf');
27-
$inferenceParams = new InferenceParameters($this->modelId, false, true);
27+
$inferenceParams = new InferenceParameters($this->modelId, rag: false, rawText: true);
2828

2929
$response = $this->mindeeClient->enqueueAndGetInference($source, $inferenceParams);
3030
$this->assertNotNull($response);
@@ -60,7 +60,7 @@ public function testParseFileFilledSinglePageMustSucceed(): void
6060
{
6161
$source = new PathInput(__DIR__ . '/resources/products/financial_document/default_sample.jpg');
6262

63-
$inferenceParams = new InferenceParameters($this->modelId, false);
63+
$inferenceParams = new InferenceParameters($this->modelId, rag: false);
6464

6565
$response = $this->mindeeClient->enqueueAndGetInference($source, $inferenceParams);
6666
$this->assertNotNull($response);

0 commit comments

Comments
 (0)