Embedding Agent Builder • Rust AI Agent SDK

EmbeddingAgentBuilder: Builder for EmbeddingAgent.

EmbeddingAgentBuilder

Defined in the embedding module.

Rust AI Agent SDK

Builder for EmbeddingAgent.

Diagram

Input Data

Agent: EmbeddingAgentBuilder

Output Result

Fields

NameTypeDescription
nameString–
modelString–
configEmbeddingConfig–
verbosebool–

Methods

new

rust
fn new() -> Self

Create a new builder

name

rust
fn name(mut self, name: impl Into<String>) -> Self

Set agent name

Parameters:

NameType
nameimpl Into&lt;String&gt;

model

rust
fn model(mut self, model: impl Into<String>) -> Self

Set model name

Parameters:

NameType
modelimpl Into&lt;String&gt;

config

rust
fn config(mut self, config: EmbeddingConfig) -> Self

Set embedding config

Parameters:

NameType
configEmbeddingConfig

verbose

rust
fn verbose(mut self, verbose: bool) -> Self

Set verbose mode

Parameters:

NameType
verbosebool

api_key

rust
fn api_key(mut self, key: impl Into<String>) -> Self

Set API key

Parameters:

NameType
keyimpl Into&lt;String&gt;

api_base

rust
fn api_base(mut self, url: impl Into<String>) -> Self

Set API base URL

Parameters:

NameType
urlimpl Into&lt;String&gt;

build

rust
fn build(self) -> Result<EmbeddingAgent>

Build the EmbeddingAgent

Source

View on GitHub

praisonai/src/embedding/mod.rs at line 144


Related Documentation