Available on crate feature
ollama only.Expand description
This module provides integration with Ollama’s API, enabling the use of language models and
embeddings within the Swiftide project. It includes the Ollama struct for managing API clients
and default options for embedding and prompt models. The module is conditionally compiled based
on the “ollama” feature flag.
Modules§
- chat_
completion - config
- embed
- simple_
prompt - This module provides an implementation of the
SimplePrompttrait for theOllamastruct. It defines an asynchronous function to interact with theOllamaAPI, allowing prompt processing and generating responses as part of the Swiftide system.
Structs§
- Ollama
- The
Ollamastruct encapsulates anOllamaclient and default options for embedding and prompt models. It uses theBuilderpattern for flexible and customizable instantiation. - Ollama
Builder - Builder for
Ollama. - Options
- The
Optionsstruct holds configuration options for theOllamaclient. It includes optional fields for specifying the embedding and prompt models. - Options
Builder - Builder for
Options.
Enums§
- Ollama
Builder Error - Error type for OllamaBuilder
- Options
Builder Error - Error type for OptionsBuilder