Citation
Defined in the RAG module.Rust AI Agent SDK A citation referencing a source document.
Fields
| Name | Type | Description |
|---|---|---|
id | String | Citation ID (e.g., “[1]“) |
source | String | Source document or URL |
text | String | Relevant text snippet |
page | Option<u32> | Page number if applicable |
score | Option<f32> | Relevance score (0.0 to 1.0) |
metadata | HashMap<String | Additional metadata |
Methods
new
| Name | Type |
|---|---|
id | impl Into<String> |
source | impl Into<String> |
text | impl Into<String> |
page
| Name | Type |
|---|---|
page | u32 |
score
| Name | Type |
|---|---|
score | f32 |
metadata
| Name | Type |
|---|---|
key | impl Into<String> |
value | impl Into<String> |
Source
View on GitHub
praisonai/src/rag/mod.rs at line 34
