// This file is autogenerated, DO NOT EDIT
// ml/trained-models/apis/infer-trained-model.asciidoc:1115

[source, python]
----
resp = client.ml.infer_trained_model(
    model_id="model2",
    docs=[
        {
            "text_field": "<long text to extract answer>"
        }
    ],
    inference_config={
        "question_answering": {
            "question": "<question to be answered>"
        }
    },
)
print(resp)
----
