GuideLLMs
Custom Providers
Implementing your own LLM provider
Configuration Options
All providers in GoFlow support a standard set of configuration options, ensuring a consistent API regardless of the backend.
| Option | Description | Example |
|---|---|---|
core.WithTemperature(f) | Controls randomness/creativity (0.0-2.0) | core.WithTemperature(0.7) |
core.WithMaxTokens(n) | Limits the output length | core.WithMaxTokens(1000) |
core.WithTopP(f) | Nucleus sampling probability | core.WithTopP(0.9) |
core.WithStopSequences(s...) | Sequences that stop generation | core.WithStopSequences("\n\n") |
Usage Example
Implementing a Custom Provider
You can add support for any LLM provider (e.g., local Llama via raw API, Mistral, Cohere) by implementing the core.LLM interface.
