Skip to main content

EmbeddingAgentBuilder

Defined in the embedding module.
Rust AI Agent SDK Builder for EmbeddingAgent.

Fields

NameTypeDescription
nameString-
modelString-
configEmbeddingConfig-
verbosebool-

Methods

new

fn new() -> Self
Create a new builder

name

fn name(mut self, name: impl Into<String>) -> Self
Set agent name Parameters:
NameType
nameimpl Into&lt;String&gt;

model

fn model(mut self, model: impl Into<String>) -> Self
Set model name Parameters:
NameType
modelimpl Into&lt;String&gt;

config

fn config(mut self, config: EmbeddingConfig) -> Self
Set embedding config Parameters:
NameType
configEmbeddingConfig

verbose

fn verbose(mut self, verbose: bool) -> Self
Set verbose mode Parameters:
NameType
verbosebool

api_key

fn api_key(mut self, key: impl Into<String>) -> Self
Set API key Parameters:
NameType
keyimpl Into&lt;String&gt;

api_base

fn api_base(mut self, url: impl Into<String>) -> Self
Set API base URL Parameters:
NameType
urlimpl Into&lt;String&gt;

build

fn build(self) -> Result<EmbeddingAgent>
Build the EmbeddingAgent

Source

View on GitHub

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