pub struct ProcessorConfig {
pub provider: String,
pub model: String,
pub max_turns: usize,
pub system_prompt: Option<String>,
pub project_path: PathBuf,
}Expand description
Configuration for the agent processor.
Fields§
§provider: StringLLM provider to use (openai, anthropic, bedrock).
model: StringModel name/ID.
max_turns: usizeMaximum number of tool call iterations.
system_prompt: Option<String>System prompt for agent behavior (if None, uses prompts module based on project_path).
project_path: PathBufProject/workspace path for context-aware prompts and tools.
Implementations§
Source§impl ProcessorConfig
impl ProcessorConfig
Sourcepub fn with_provider(self, provider: impl Into<String>) -> Self
pub fn with_provider(self, provider: impl Into<String>) -> Self
Sets the provider.
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Sets the model.
Sourcepub fn with_max_turns(self, max_turns: usize) -> Self
pub fn with_max_turns(self, max_turns: usize) -> Self
Sets the maximum number of turns.
Sourcepub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
Sets the system prompt (overrides auto-generated prompt).
Sourcepub fn with_project_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_project_path(self, path: impl Into<PathBuf>) -> Self
Sets the project path for context-aware prompts and tools.
Sourcepub fn effective_system_prompt(&self, query: Option<&str>) -> String
pub fn effective_system_prompt(&self, query: Option<&str>) -> String
Gets the effective system prompt. If a custom prompt is set, returns that. Otherwise, generates appropriate prompt based on project_path.
Trait Implementations§
Source§impl Clone for ProcessorConfig
impl Clone for ProcessorConfig
Source§fn clone(&self) -> ProcessorConfig
fn clone(&self) -> ProcessorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessorConfig
impl Debug for ProcessorConfig
Auto Trait Implementations§
impl Freeze for ProcessorConfig
impl RefUnwindSafe for ProcessorConfig
impl Send for ProcessorConfig
impl Sync for ProcessorConfig
impl Unpin for ProcessorConfig
impl UnsafeUnpin for ProcessorConfig
impl UnwindSafe for ProcessorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.