pub struct ReActConfig {
pub max_iterations: usize,
pub stream_output: bool,
pub temperature: f32,
pub system_prompt: Option<String>,
pub verbose: bool,
pub max_tokens_per_step: Option<u32>,
}Expand description
ReAct 配置
Fields§
§max_iterations: usize最大迭代次数
stream_output: bool是否启用流式输出
temperature: f32思考温度
system_prompt: Option<String>自定义系统提示词
verbose: bool是否在思考过程中显示详细信息
max_tokens_per_step: Option<u32>每步最大 token 数
Implementations§
Source§impl ReActConfig
impl ReActConfig
pub fn new() -> ReActConfig
pub fn with_max_iterations(self, max: usize) -> ReActConfig
pub fn with_stream_output(self, enabled: bool) -> ReActConfig
pub fn with_temperature(self, temp: f32) -> ReActConfig
pub fn with_system_prompt(self, prompt: impl Into<String>) -> ReActConfig
pub fn with_verbose(self, verbose: bool) -> ReActConfig
Trait Implementations§
Source§impl Clone for ReActConfig
impl Clone for ReActConfig
Source§fn clone(&self) -> ReActConfig
fn clone(&self) -> ReActConfig
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 ReActConfig
impl Debug for ReActConfig
Source§impl Default for ReActConfig
impl Default for ReActConfig
Source§fn default() -> ReActConfig
fn default() -> ReActConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReActConfig
impl RefUnwindSafe for ReActConfig
impl Send for ReActConfig
impl Sync for ReActConfig
impl Unpin for ReActConfig
impl UnsafeUnpin for ReActConfig
impl UnwindSafe for ReActConfig
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> 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 moreSource§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage