Skip to content

Commit ce5afe0

Browse files
update code sample
1 parent a13ca7b commit ce5afe0

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

docs/extras/code_samples/default_v2.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,21 @@ model_id = "MY_MODEL_ID"
1313
# Init a new client
1414
mindee_client = ClientV2(api_key)
1515

16+
# Set inference options
17+
options = InferencePredictOptions(
18+
# ID of the model, required.
19+
model_id=model_id,
20+
# If set to `True`, will enable Retrieval-Augmented Generation.
21+
rag=False,
22+
)
23+
1624
# Load a file from disk
1725
input_doc = mindee_client.source_from_path(input_path)
18-
options = InferencePredictOptions(model_id=model_id)
1926

20-
# Parse the file.
21-
response: InferenceResponse = mindee_client.enqueue_and_parse(input_doc, options)
27+
# Upload the file
28+
response: InferenceResponse = mindee_client.enqueue_and_parse(
29+
input_doc, options
30+
)
2231

2332
# Print a brief summary of the parsed data
24-
print(response.inference)
33+
print(response.inference)

0 commit comments

Comments
 (0)