Module ollama

Source
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 SimplePrompt trait for the Ollama struct. It defines an asynchronous function to interact with the Ollama API, allowing prompt processing and generating responses as part of the Swiftide system.

Structs§

Ollama
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.
OllamaBuilder
Builder for Ollama.
Options
The Options struct holds configuration options for the Ollama client. It includes optional fields for specifying the embedding and prompt models.
OptionsBuilder
Builder for Options.

Enums§

OllamaBuilderError
Error type for OllamaBuilder
OptionsBuilderError
Error type for OptionsBuilder