pub struct AiExecutor { /* private fields */ }Expand description
AI 执行器
调用 AI Provider 执行任务节点。
Implementations§
Source§impl AiExecutor
impl AiExecutor
Sourcepub fn with_config(
provider: Arc<dyn Provider>,
config: AiExecutorConfig,
) -> Self
pub fn with_config( provider: Arc<dyn Provider>, config: AiExecutorConfig, ) -> Self
使用配置创建 AI 执行器
Sourcepub fn extract_text_content(response: &ChatResponse) -> Result<String>
pub fn extract_text_content(response: &ChatResponse) -> Result<String>
从响应中提取文本内容
Sourcepub fn extract_structured_output(response: &ChatResponse) -> Result<Value>
pub fn extract_structured_output(response: &ChatResponse) -> Result<Value>
从响应中提取结构化输出
Trait Implementations§
Source§impl NodeExecutor for AiExecutor
impl NodeExecutor for AiExecutor
Auto Trait Implementations§
impl Freeze for AiExecutor
impl !RefUnwindSafe for AiExecutor
impl Send for AiExecutor
impl Sync for AiExecutor
impl Unpin for AiExecutor
impl UnsafeUnpin for AiExecutor
impl !UnwindSafe for AiExecutor
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