Skip to content

How-to guides

Each page here solves one problem for someone who already knows what they want. If you have not used the crate before, start with Your first chat call.

Page Solves
Choose a provider Picking a Provider, and getting the request to the endpoint you meant.
Stream a reply Printing tokens as they arrive instead of waiting for the whole answer.
Get structured output Getting a typed value back instead of prose you have to parse.
Cache a prompt and enable thinking Cutting the cost of a long, stable prompt, and giving the model room to reason.
Test without a provider Running the whole path in CI with no API key and no network.

For exact field behaviour, go to the Reference. For why the crate is shaped this way, and what it will not do, go to Explanation.