Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Document
Defined in the knowledge module.
Rust AI Agent SDK
A document in the knowledge base.
Fields
| Name | Type | Description |
|---|
id | String | Document ID |
content | String | Document content |
metadata | HashMap<String | Document metadata |
source | Option<String> | Source path or URL |
filename | Option<String> | Filename if from file |
created_at | Option<u64> | Creation timestamp |
updated_at | Option<u64> | Update timestamp |
Methods
new
fn new(content: impl Into<String>) -> Self
Create a new document
Parameters:
| Name | Type |
|---|
content | impl Into<String> |
fn metadata(mut self, key: impl Into<String>, value: impl Into<String>) -> Self
Set metadata
Parameters:
| Name | Type |
|---|
key | impl Into<String> |
value | impl Into<String> |
source
fn source(mut self, source: impl Into<String>) -> Self
Set source
Parameters:
| Name | Type |
|---|
source | impl Into<String> |
filename
fn filename(mut self, filename: impl Into<String>) -> Self
Set filename
Parameters:
| Name | Type |
|---|
filename | impl Into<String> |
Source
View on GitHub
praisonai/src/knowledge/mod.rs at line 36