Skip to main content

AgentCapabilitiesBuilder

Struct AgentCapabilitiesBuilder 

Source
pub struct AgentCapabilitiesBuilder { /* private fields */ }
Expand description

Agent 能力构建器

Implementations§

Source§

impl AgentCapabilitiesBuilder

Source

pub fn new() -> Self

创建新的构建器

Source

pub fn tag(self, tag: impl Into<String>) -> Self

添加标签

Source

pub fn with_tag(self, tag: impl Into<String>) -> Self

添加标签 (别名)

Source

pub fn tags(self, tags: impl IntoIterator<Item = impl Into<String>>) -> Self

添加多个标签

Source

pub fn input_type(self, input_type: InputType) -> Self

添加输入类型

Source

pub fn with_input_type(self, input_type: InputType) -> Self

添加输入类型 (别名)

Source

pub fn output_type(self, output_type: OutputType) -> Self

添加输出类型

Source

pub fn with_output_type(self, output_type: OutputType) -> Self

添加输出类型 (别名)

Source

pub fn max_context_length(self, length: usize) -> Self

设置最大上下文长度

Source

pub fn reasoning_strategy(self, strategy: ReasoningStrategy) -> Self

添加推理策略

Source

pub fn with_reasoning_strategy(self, strategy: ReasoningStrategy) -> Self

添加推理策略 (别名)

Source

pub fn supports_streaming(self, supports: bool) -> Self

设置流式输出支持

Source

pub fn supports_conversation(self, supports: bool) -> Self

设置多轮对话支持

Source

pub fn supports_tools(self, supports: bool) -> Self

设置工具调用支持

Source

pub fn supports_coordination(self, supports: bool) -> Self

设置多 Agent 协调支持

Source

pub fn custom(self, key: impl Into<String>, value: Value) -> Self

添加自定义能力

Source

pub fn build(self) -> AgentCapabilities

构建能力描述

Trait Implementations§

Source§

impl Debug for AgentCapabilitiesBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AgentCapabilitiesBuilder

Source§

fn default() -> AgentCapabilitiesBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.