Query Rewriter Agent Builder • Rust AI Agent SDK
QueryRewriterAgentBuilder: Builder for QueryRewriterAgent
QueryRewriterAgentBuilder
Defined in the Specialized Agents module.
Rust AI Agent SDK
Builder for QueryRewriterAgent
Fields
| Name | Type | Description |
|---|---|---|
config | QueryRewriterConfig | – |
Methods
new
fn new() -> SelfCreate a new builder
name
fn name(mut self, name: impl Into<String>) -> SelfSet agent name
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
model
fn model(mut self, model: impl Into<String>) -> SelfSet LLM model
Parameters:
| Name | Type |
|---|---|
model | impl Into<String> |
instructions
fn instructions(mut self, instructions: impl Into<String>) -> SelfSet custom instructions
Parameters:
| Name | Type |
|---|---|
instructions | impl Into<String> |
verbose
fn verbose(mut self) -> SelfEnable verbose output
max_queries
fn max_queries(mut self, max: usize) -> SelfSet max queries
Parameters:
| Name | Type |
|---|---|
max | usize |
abbreviation
fn abbreviation(mut self, abbrev: impl Into<String>, expansion: impl Into<String>) -> SelfAdd abbreviation expansion
Parameters:
| Name | Type |
|---|---|
abbrev | impl Into<String> |
expansion | impl Into<String> |
abbreviations
fn abbreviations(mut self, abbrevs: HashMap<String, String>) -> SelfSet abbreviations map
Parameters:
| Name | Type |
|---|---|
abbrevs | HashMap<String |
temperature
fn temperature(mut self, temp: f32) -> SelfSet temperature
Parameters:
| Name | Type |
|---|---|
temp | f32 |
max_tokens
fn max_tokens(mut self, tokens: usize) -> SelfSet max tokens
Parameters:
| Name | Type |
|---|---|
tokens | usize |
build
fn build(self) -> QueryRewriterAgentBuild the agent
Source
View on GitHubpraisonai/src/specialized_agents.rs at line 648