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.
KnowledgeConfig
Defined in the knowledge module.
Rust AI Agent SDK
Knowledge configuration.
Fields
| Name | Type | Description |
|---|
chunking | ChunkingConfig | Chunking configuration |
retrieval_strategy | RetrievalStrategy | Retrieval strategy |
default_limit | usize | Default search limit |
enable_reranking | bool | Enable reranking |
user_id | Option<String> | User ID for scoping |
agent_id | Option<String> | Agent ID for scoping |
Methods
new
Create a new config
chunking
fn chunking(mut self, config: ChunkingConfig) -> Self
Set chunking config
Parameters:
| Name | Type |
|---|
config | ChunkingConfig |
retrieval_strategy
fn retrieval_strategy(mut self, strategy: RetrievalStrategy) -> Self
Set retrieval strategy
Parameters:
| Name | Type |
|---|
strategy | RetrievalStrategy |
default_limit
fn default_limit(mut self, limit: usize) -> Self
Set default limit
Parameters:
enable_reranking
fn enable_reranking(mut self, enable: bool) -> Self
Enable reranking
Parameters:
user_id
fn user_id(mut self, id: impl Into<String>) -> Self
Set user ID
Parameters:
| Name | Type |
|---|
id | impl Into<String> |
agent_id
fn agent_id(mut self, id: impl Into<String>) -> Self
Set agent ID
Parameters:
| Name | Type |
|---|
id | impl Into<String> |
Source
View on GitHub
praisonai/src/knowledge/mod.rs at line 633