pub struct AgentCapabilitiesBuilder { /* private fields */ }Expand description
Agent 能力构建器
Implementations§
Source§impl AgentCapabilitiesBuilder
impl AgentCapabilitiesBuilder
Sourcepub fn new() -> AgentCapabilitiesBuilder
pub fn new() -> AgentCapabilitiesBuilder
创建新的构建器
Sourcepub fn tag(self, tag: impl Into<String>) -> AgentCapabilitiesBuilder
pub fn tag(self, tag: impl Into<String>) -> AgentCapabilitiesBuilder
添加标签
Sourcepub fn with_tag(self, tag: impl Into<String>) -> AgentCapabilitiesBuilder
pub fn with_tag(self, tag: impl Into<String>) -> AgentCapabilitiesBuilder
添加标签 (别名)
添加多个标签
Sourcepub fn input_type(self, input_type: InputType) -> AgentCapabilitiesBuilder
pub fn input_type(self, input_type: InputType) -> AgentCapabilitiesBuilder
添加输入类型
Sourcepub fn with_input_type(self, input_type: InputType) -> AgentCapabilitiesBuilder
pub fn with_input_type(self, input_type: InputType) -> AgentCapabilitiesBuilder
添加输入类型 (别名)
Sourcepub fn output_type(self, output_type: OutputType) -> AgentCapabilitiesBuilder
pub fn output_type(self, output_type: OutputType) -> AgentCapabilitiesBuilder
添加输出类型
Sourcepub fn with_output_type(
self,
output_type: OutputType,
) -> AgentCapabilitiesBuilder
pub fn with_output_type( self, output_type: OutputType, ) -> AgentCapabilitiesBuilder
添加输出类型 (别名)
Sourcepub fn max_context_length(self, length: usize) -> AgentCapabilitiesBuilder
pub fn max_context_length(self, length: usize) -> AgentCapabilitiesBuilder
设置最大上下文长度
Sourcepub fn reasoning_strategy(
self,
strategy: ReasoningStrategy,
) -> AgentCapabilitiesBuilder
pub fn reasoning_strategy( self, strategy: ReasoningStrategy, ) -> AgentCapabilitiesBuilder
添加推理策略
Sourcepub fn with_reasoning_strategy(
self,
strategy: ReasoningStrategy,
) -> AgentCapabilitiesBuilder
pub fn with_reasoning_strategy( self, strategy: ReasoningStrategy, ) -> AgentCapabilitiesBuilder
添加推理策略 (别名)
Sourcepub fn supports_streaming(self, supports: bool) -> AgentCapabilitiesBuilder
pub fn supports_streaming(self, supports: bool) -> AgentCapabilitiesBuilder
设置流式输出支持
Sourcepub fn supports_conversation(self, supports: bool) -> AgentCapabilitiesBuilder
pub fn supports_conversation(self, supports: bool) -> AgentCapabilitiesBuilder
设置多轮对话支持
Sourcepub fn supports_tools(self, supports: bool) -> AgentCapabilitiesBuilder
pub fn supports_tools(self, supports: bool) -> AgentCapabilitiesBuilder
设置工具调用支持
Sourcepub fn supports_coordination(self, supports: bool) -> AgentCapabilitiesBuilder
pub fn supports_coordination(self, supports: bool) -> AgentCapabilitiesBuilder
设置多 Agent 协调支持
Sourcepub fn custom(
self,
key: impl Into<String>,
value: Value,
) -> AgentCapabilitiesBuilder
pub fn custom( self, key: impl Into<String>, value: Value, ) -> AgentCapabilitiesBuilder
添加自定义能力
Sourcepub fn build(self) -> AgentCapabilities
pub fn build(self) -> AgentCapabilities
构建能力描述
Trait Implementations§
Source§impl Debug for AgentCapabilitiesBuilder
impl Debug for AgentCapabilitiesBuilder
Source§impl Default for AgentCapabilitiesBuilder
impl Default for AgentCapabilitiesBuilder
Source§fn default() -> AgentCapabilitiesBuilder
fn default() -> AgentCapabilitiesBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AgentCapabilitiesBuilder
impl RefUnwindSafe for AgentCapabilitiesBuilder
impl Send for AgentCapabilitiesBuilder
impl Sync for AgentCapabilitiesBuilder
impl Unpin for AgentCapabilitiesBuilder
impl UnsafeUnpin for AgentCapabilitiesBuilder
impl UnwindSafe for AgentCapabilitiesBuilder
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> 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