truss predict [OPTIONS] [TARGET_DIRECTORY]
Calls the packaged model with the provided input data. Use this to test your model locally or remotely.
Options
JSON string representing the request payload.
Path to a JSON file containing the request payload.
Name of the remote in .trussrc to invoke.
ID of the model to invoke.
ID of the model version to invoke.
Invoke the published (production) deployment.
Arguments
A Truss directory. Defaults to current directory.
Example:
To call a model with inline JSON data, use the following:
truss predict -d '{"prompt": "What is the meaning of life?"}'
To call a model using a JSON file, use the following:
truss predict -f request.json
To call the production deployment, use the following:
truss predict --published -d '{"prompt": "Hello, world!"}'