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.
QueryRewriterAgent
Defined in the Specialized Agents module.
Rust AI Agent SDK
Agent for rewriting queries
Fields
| Name | Type | Description |
|---|
config | QueryRewriterConfig | - |
Methods
new
fn new() -> QueryRewriterAgentBuilder
Create a new builder
name
Get agent name
model
Get model
expand_abbreviations
fn expand_abbreviations(&self, query: &str) -> String
Expand abbreviations in query
Parameters:
detect_strategy
fn detect_strategy(&self, query: &str, has_chat_history: bool) -> RewriteStrategy
Detect the best rewriting strategy for a query
Parameters:
| Name | Type |
|---|
query | &str |
has_chat_history | bool |
rewrite_sync
fn rewrite_sync(
&self,
query: &str,
strategy: RewriteStrategy,
chat_history: Option<&[HashMap<String, String>]>,
context: Option<&str>,
num_queries: Option<usize>,
) -> RewriteResult
Rewrite a query (sync placeholder - actual implementation would use LLM)
Parameters:
| Name | Type |
|---|
query | &str |
strategy | RewriteStrategy |
chat_history | Option<&[HashMap<String |
context | Option<&str> |
num_queries | Option<usize> |
Source
View on GitHub
praisonai/src/specialized_agents.rs at line 722