diff --git a/docs/extras/code_samples/workflow_ots_rag.txt b/docs/extras/code_samples/workflow_ots_rag.txt new file mode 100644 index 00000000..d6cd5de5 --- /dev/null +++ b/docs/extras/code_samples/workflow_ots_rag.txt @@ -0,0 +1,25 @@ +# +# Install the Python client library by running: +# pip install mindee +# + +from mindee import Client, product, AsyncPredictResponse + +# Init a new client +mindee_client = Client(api_key="my-api-key") + +# Load a file from disk +input_doc = mindee_client.source_from_path("/path/to/the/file.ext") + +# Load a file from disk and enqueue it. +result: AsyncPredictResponse = mindee_client.enqueue_and_parse( + product.FinancialDocumentV1, + input_doc, + # Set the workflow ID + workflow_id="workflow-id", + # Enable RAG on the workflow + rag=True, +) + +# Print a brief summary of the parsed data +print(result.document) diff --git a/tests/test_code_samples.sh b/tests/test_code_samples.sh index 32878785..7074088d 100755 --- a/tests/test_code_samples.sh +++ b/tests/test_code_samples.sh @@ -6,7 +6,7 @@ ACCOUNT=$1 ENDPOINT=$2 API_KEY=$3 -for f in $(find ./docs/extras/code_samples -maxdepth 1 -name "*.txt" -not -name "workflow_execution.txt" | sort -h) +for f in $(find ./docs/extras/code_samples -maxdepth 1 -name "*.txt" -not -name "workflow_*.txt" | sort -h) do echo echo "###############################################"