Skip to content

Commit

Permalink
docs: Improve main lib docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cvauclair committed Nov 7, 2024
1 parent 2f754a5 commit 7ea5cbe
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions rig-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Rig is a Rust library for building LLM-powered applications that focuses on ergonomics and modularity.
//!
//! # Table of contents
//!
//! - [High-level features](#high-level-features)
//! - [Simple Example](#simple-example)
//! - [Core Concepts](#core-concepts)
Expand All @@ -18,7 +17,7 @@
//!
//! #[tokio::main]
//! async fn main() {
//! // Create OpenAI client and model.
//! // Create OpenAI client and agent.
//! // This requires the `OPENAI_API_KEY` environment variable to be set.
//! let openai_client = openai::Client::from_env();
//!
Expand All @@ -39,35 +38,45 @@
//! # Core concepts
//! ## Completion and embedding models
//! Rig provides a consistent API for working with LLMs and embeddings. Specifically,
//! each provider (e.g. OpenAI, Cohere) has a `Client` struct that can be used to create completion
//! each provider (e.g. OpenAI, Cohere) has a `Client` struct that can be used to initialize completion
//! and embedding models. These models implement the [CompletionModel](crate::completion::CompletionModel)
//! and [EmbeddingModel](crate::embeddings::EmbeddingModel) traits respectively, which provide a common,
//! low-level interface for creating completion and embedding requests and executing them.
//!
//! ## Agents
//! Rig provides high-level abstractions over LLMs in the form of the [Agent](crate::agent::Agent) type.
//! Rig also provides high-level abstractions over LLMs in the form of the [Agent](crate::agent::Agent) type.
//!
//! The [Agent](crate::agent::Agent) type can be used to create anything from simple agents that use vanilla models to full blown
//! RAG systems that can be used to answer questions using a knowledge base.
//!
//! ## Vector stores and indexes
//! Rig provides a common interface for working with vector stores and indexes. Specifically, the library
//! Rig defines a common interface for working with vector stores and indexes. Specifically, the library
//! provides the [VectorStore](crate::vector_store::VectorStore) and [VectorStoreIndex](crate::vector_store::VectorStoreIndex)
//! traits, which can be implemented to define vector stores and indices respectively.
//! Those can then be used as the knowledgebase for a RAG enabled [Agent](crate::agent::Agent), or
//! traits, which can be implemented on a given type to define vector stores and indices respectively.
//! Those can then be used as the knowledge base for a RAG enabled [Agent](crate::agent::Agent), or
//! as a source of context documents in a custom architecture that use multiple LLMs or agents.
//!
//! # Integrations
//! Rig natively supports the following completion and embedding model providers:
//! ## Model Providers
//! Rig natively supports the following completion and embedding model provider integrations:
//! - OpenAI
//! - Cohere
//! - Anthropic
//! - Perplexity
//! - Gemini
//!
//! You can also implement your own model provider integration by defining types that
//! implement the [CompletionModel](crate::completion::CompletionModel) and [EmbeddingModel](crate::embeddings::EmbeddingModel) traits.
//!
//! Rig currently has the following integration companion crates:
//! ## Vector Stores
//! Rig currently supports the following vector store integrations via companion crates:
//! - `rig-mongodb`: Vector store implementation for MongoDB
//! - `rig-lancedb`: Vector store implementation for LanceDB
//! - `rig-neo4j`: Vector store implementation for Neo4j
//! - `rig-qdrant`: Vector store implementation for Qdrant
//!
//! You can also implement your own vector store integration by defining types that
//! implement the [VectorStoreIndex](crate::vector_store::VectorStoreIndex) trait.
pub mod agent;
pub mod cli_chatbot;
Expand Down

0 comments on commit 7ea5cbe

Please sign in to comment.