This module provides traits for defining and creating provider clients.
Clients are used to create models for completion, embeddings, etc.
Dyn-compatible traits have been provided to allow for more provider-agnostic code.
This module provides functionality for working with embeddings.
Embeddings are numerical representations of documents or other objects, typically used in
natural language processing (NLP) tasks such as text classification, information retrieval,
and document similarity.
This module defines a flexible pipeline API for defining a sequence of operations that
may or may not use AI components (e.g.: semantic search, LLMs prompting, etc).
This module provides functionality for working with streaming completion models.
It provides traits and types for generating streaming completion requests and
handling streaming completion responses.
This module provides functionality for working with audio transcription models.
It provides traits, structs, and enums for generating audio transcription requests,
handling transcription responses, and defining transcription models.
Struct containing either a single item or a list of items of type T.
If a single item is present, first will contain it and rest will be empty.
If multiple items are present, first will contain the first item and rest will contain the rest.
IMPORTANT: this struct cannot be created with an empty vector.
OneOrMany objects can only be created using OneOrMany::from() or OneOrMany::try_from().
Derive this trait for objects that need to be converted to vector embeddings.
The Embed::embed method accumulates string values that need to be embedded by adding them to the TextEmbedder.
If an error occurs, the method should return EmbedError.