pub type Ollama = GenericOpenAI<OllamaConfig>;
ollama
only.Expand description
The Ollama
struct encapsulates an Ollama
client and default options for embedding and prompt
models. It uses the Builder
pattern for flexible and customizable instantiation.
By default it will look for a OLLAMA_API_KEY
environment variable. Note that either a prompt
model or embedding model always need to be set, either with
Ollama::with_default_prompt_model
or Ollama::with_default_embed_model
or via the
builder. You can find available models in the Ollama documentation.
Under the hood it uses async_openai
, with the Ollama openai mapping. This means
some features might not work as expected. See the Ollama documentation for details.
Aliased Type§
pub struct Ollama {
pub stream_full: bool,
/* private fields */
}
Fields§
§stream_full: bool
Convenience option to stream the full response. Defaults to true, because nobody has time to reconstruct the delta. Disabling this will make the streamed content only return the delta, for when performance matters. This only has effect when streaming is enabled.