Skip to main content

Documentation Index

Fetch the complete documentation index at: https://baseten-philip-copy-0226.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Once your model server has finished deploying, you can call it from your terminal.

Call the model server

Model server input must be JSON-serializable: a string, number, list, or dictionary.
Note the double quotes to make the data parameter a string.truss predict uses the same data formatting on the as cURL.
Invocation
truss predict -d '"Truss is awesome!"'
Response
"Truss is awesome!"
Our model server is up and responding to requests. In the next step, we’ll set up the last piece of the developer loop on Truss.
class Model:
    def __init__(self, **kwargs):
        self._model = None

    def load(self):
        pass

    def predict(self, model_input):
        return model_input