From 6ddc3c7efd2464cd666b5c26069c7923604a59dd Mon Sep 17 00:00:00 2001 From: Christophe Date: Thu, 17 Oct 2024 17:52:23 -0400 Subject: [PATCH 1/4] devops: Add cargo check for all features + doc check --- .github/workflows/ci.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e00d68cd..5f8514c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,6 +55,8 @@ jobs: - name: Run clippy action uses: clechasseur/rs-clippy-check@v3 + with: + args: --all-features test: name: stable / test @@ -79,4 +81,19 @@ jobs: uses: actions-rs/cargo@v1 with: command: nextest - args: run --all-features \ No newline at end of file + args: run --all-features + + doc: + name: stable / doc + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Rust stable + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rust-docs + + - name: Run cargo doc + run: cargo doc --no-deps --all-features \ No newline at end of file From f799f94c5ff6da76bbdb6f68af6ee0824e0a9712 Mon Sep 17 00:00:00 2001 From: Christophe Date: Thu, 17 Oct 2024 17:55:18 -0400 Subject: [PATCH 2/4] devops: Fix missing dep --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5f8514c2..d8aec427 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -95,5 +95,9 @@ jobs: with: components: rust-docs + # Required to compile rig-lancedb + - name: Install Protoc + uses: arduino/setup-protoc@v3 + - name: Run cargo doc run: cargo doc --no-deps --all-features \ No newline at end of file From 3558085108b15759e53b9afc083c12f584a1b36f Mon Sep 17 00:00:00 2001 From: Christophe Date: Thu, 17 Oct 2024 17:59:39 -0400 Subject: [PATCH 3/4] devops: Make cargo doc strict --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d8aec427..8ab1324e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -100,4 +100,6 @@ jobs: uses: arduino/setup-protoc@v3 - name: Run cargo doc - run: cargo doc --no-deps --all-features \ No newline at end of file + run: cargo doc --no-deps --all-features + env: + RUSTDOCFLAGS: -D warnings \ No newline at end of file From dc248edd58f58046f40ea8d366d907bad48d45cd Mon Sep 17 00:00:00 2001 From: Christophe Date: Thu, 17 Oct 2024 18:02:06 -0400 Subject: [PATCH 4/4] docs: Fix docstring links --- rig-core/src/completion.rs | 4 ++-- rig-core/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rig-core/src/completion.rs b/rig-core/src/completion.rs index 4383e561..4f868786 100644 --- a/rig-core/src/completion.rs +++ b/rig-core/src/completion.rs @@ -439,14 +439,14 @@ impl CompletionRequestBuilder { } /// Sets the max tokens for the completion request. - /// Only required for: [ Anthropic ] + /// Note: This is required if using Anthropic pub fn max_tokens(mut self, max_tokens: u64) -> Self { self.max_tokens = Some(max_tokens); self } /// Sets the max tokens for the completion request. - /// Only required for: [ Anthropic ] + /// Note: This is required if using Anthropic pub fn max_tokens_opt(mut self, max_tokens: Option) -> Self { self.max_tokens = max_tokens; self diff --git a/rig-core/src/lib.rs b/rig-core/src/lib.rs index 86c25209..79d47079 100644 --- a/rig-core/src/lib.rs +++ b/rig-core/src/lib.rs @@ -54,7 +54,7 @@ //! Rig provides 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 [RagAgent](crate::rag::RagAgent), or +//! Those can then be used as the knowledgebase 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