Context Chunk • Rust AI Agent SDK
ContextChunk: A single context chunk.
ContextChunk
Defined in the RAG module.
Rust AI Agent SDK
A single context chunk.
Fields
| Name | Type | Description |
|---|---|---|
content | String | Chunk content |
source | String | Source document |
score | f32 | Relevance score |
index | usize | Chunk index in source |
metadata | HashMap<String | Metadata |
Methods
new
fn new(content: impl Into<String>, source: impl Into<String>, score: f32) -> SelfCreate a new context chunk
Parameters:
| Name | Type |
|---|---|
content | impl Into<String> |
source | impl Into<String> |
score | f32 |
Source
View on GitHubpraisonai/src/rag/mod.rs at line 106