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.
EmbeddingConfig
Defined in the embedding module.
Rust AI Agent SDK
Configuration for embedding generation.
Fields
| Name | Type | Description |
|---|
dimensions | Option<usize> | Number of dimensions for the embedding (model-dependent) |
format | "float" or "base64" | - |
encoding_format | String | Encoding format: “float” or “base64” |
timeout | u64 | Timeout in seconds |
api_base | Option<String> | Custom API base URL |
api_key | Option<String> | API key for authentication |
Methods
new
Create a new EmbeddingConfig with defaults
dimensions
fn dimensions(mut self, dimensions: usize) -> Self
Set dimensions
Parameters:
fn encoding_format(mut self, format: impl Into<String>) -> Self
Set encoding format
Parameters:
| Name | Type |
|---|
format | impl Into<String> |
timeout
fn timeout(mut self, timeout: u64) -> Self
Set timeout
Parameters:
api_base
fn api_base(mut self, url: impl Into<String>) -> Self
Set API base URL
Parameters:
| Name | Type |
|---|
url | impl Into<String> |
api_key
fn api_key(mut self, key: impl Into<String>) -> Self
Set API key
Parameters:
| Name | Type |
|---|
key | impl Into<String> |
Source
View on GitHub
praisonai/src/embedding/mod.rs at line 27