Expand description
Public facade for Rig.
Modules§
- agent
- This module contains the implementation of the Agent struct and its builder.
- audio_
generation - Everything related to audio generation (ie, Text To Speech). Rig abstracts over a number of different providers using the AudioGenerationModel trait.
- bedrock
- client
- This module provides traits for defining and creating provider clients. Clients are used to create models for completion, embeddings, etc.
- completion
- embeddings
- 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.
- evals
- Evals. From OpenAI’s evals repo:
- extractor
- This module provides high-level abstractions for extracting structured data from text using LLMs.
- fastembed
- gemini_
grpc - helixdb
- http_
client - image_
generation - Everything related to core image generation abstractions in Rig. Rig allows calling a number of different providers (that support image generation) using the ImageGenerationModel trait.
- integrations
- lancedb
- loaders
- This module provides utility structs for loading and preprocessing files.
- markers
- Common marker traits and structs for type-safe builders.
- milvus
- model
- mongodb
- neo4j
- one_
or_ many - pipeline
- 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).
- postgres
- prelude
- providers
- This module contains clients for the different LLM providers that Rig supports.
- qdrant
- s3vectors
- scylladb
- sqlite
- streaming
- 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.
- surrealdb
- telemetry
- This module primarily concerns being able to orchestrate telemetry across a given pipeline or workflow. This includes tracing, being able to send traces to an OpenTelemetry collector, setting up your agents with the correct tracing style so you can emit the right traces for platforms like Langfuse, and more.
- tool
- Module defining tool related structs and traits.
- tools
- transcription
- 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.
- vector_
store - Vector store abstractions for semantic search and retrieval.
- vectorize
- vertexai
- wasm_
compat
Macros§
- conditional
- Creates an
Opthat conditionally dispatches to one of multiple sub-ops based on the variant of the input enum. - if_
not_ wasm - if_wasm
- parallel
- parallel_
internal - parallel_
op - try_
conditional - Creates a
TryOpthat conditionally dispatches to one of multiple sub-ops based on the variant of the input enum, returning aResult. - try_
parallel - try_
parallel_ internal - tuple_
pattern
Structs§
- Empty
List Error - Error type for when trying to create a OneOrMany object with an empty vector.
- Extraction
Response - Response from an extraction operation containing the extracted data and usage information.
- OneOr
Many - Struct containing either a single item or a list of items of type T.
If a single item is present,
firstwill contain it andrestwill be empty. If multiple items are present,firstwill contain the first item andrestwill 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().
Traits§
- Embed
- 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.
Attribute Macros§
- tool_
macro - A procedural macro that transforms a function into a
rig::tool::Toolthat can be used with arig::agent::Agent.
Derive Macros§
- Embed
- A macro that allows you to implement the
rig::embedding::Embedtrait by deriving it. Usage can be found below: