Skip to content

Predict

Make predictions based on a fine tuned model or default model.

Parameters:

Name Type Description Default
model_name str

The name of the model - which is referenced in the model_ids table alongside the model_id.

required
model_id str

The model id that is the output of the train API call - enables fine tuned models to be called.

required
question_text str

A string that contains the question.

required
context_text str

A string that contains additional text that can be concatenated to the question, if needed.

None
document_files list[str]

A list of file paths to documents for document-based tasks for predictions. Example: ['path/to/file1.pdf', 'path/to/file2.pdf'].

None

Returns:

Name Type Description
response dict

A JSON response from the API, including the results of the predictions.