By default, Truss wraps prediction results into an HTTP response. For advanced use cases, you can create response objects manually to:Documentation Index
Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
Use this file to discover all available pages before exploring further.
- Control HTTP status codes.
- Use server-sent events (SSEs) for streaming responses.
Returning custom response objects
Any subclass of starlette.responses.Response is supported.Example: Streaming with SSEs
For server-sent events (SSEs), useStreamingResponse:
Limitations
- Response headers aren’t fully propagated: include metadata in the response body.
Also see Using Request Objects
for handling raw requests.