pub struct AsyncCallbackManagerForChainGroup {
pub ended: bool,
/* private fields */
}Expand description
Async callback manager for chain group.
Fields§
§ended: boolWhether the chain group has ended.
Implementations§
Source§impl AsyncCallbackManagerForChainGroup
impl AsyncCallbackManagerForChainGroup
Sourcepub fn new(
handlers: Vec<Arc<dyn BaseCallbackHandler>>,
inheritable_handlers: Option<Vec<Arc<dyn BaseCallbackHandler>>>,
parent_run_id: Option<Uuid>,
parent_run_manager: AsyncCallbackManagerForChainRun,
tags: Option<Vec<String>>,
inheritable_tags: Option<Vec<String>>,
metadata: Option<HashMap<String, Value>>,
inheritable_metadata: Option<HashMap<String, Value>>,
) -> Self
pub fn new( handlers: Vec<Arc<dyn BaseCallbackHandler>>, inheritable_handlers: Option<Vec<Arc<dyn BaseCallbackHandler>>>, parent_run_id: Option<Uuid>, parent_run_manager: AsyncCallbackManagerForChainRun, tags: Option<Vec<String>>, inheritable_tags: Option<Vec<String>>, metadata: Option<HashMap<String, Value>>, inheritable_metadata: Option<HashMap<String, Value>>, ) -> Self
Create a new async callback manager for chain group.
Sourcepub fn handlers(&self) -> &[Arc<dyn BaseCallbackHandler>]
pub fn handlers(&self) -> &[Arc<dyn BaseCallbackHandler>]
Get the handlers.
Sourcepub fn parent_run_id(&self) -> Option<Uuid>
pub fn parent_run_id(&self) -> Option<Uuid>
Get the parent run ID.
Sourcepub fn merge(&self, other: &CallbackManager) -> Self
pub fn merge(&self, other: &CallbackManager) -> Self
Merge with another callback manager.
Sourcepub fn set_handlers(
&mut self,
handlers: Vec<Arc<dyn BaseCallbackHandler>>,
inherit: bool,
)
pub fn set_handlers( &mut self, handlers: Vec<Arc<dyn BaseCallbackHandler>>, inherit: bool, )
Set handlers.
Sourcepub fn add_handler(
&mut self,
handler: Arc<dyn BaseCallbackHandler>,
inherit: bool,
)
pub fn add_handler( &mut self, handler: Arc<dyn BaseCallbackHandler>, inherit: bool, )
Add handler.
Add tags.
Sourcepub async fn on_chain_end(&mut self, outputs: &HashMap<String, Value>)
pub async fn on_chain_end(&mut self, outputs: &HashMap<String, Value>)
Run when chain ends running (async).
Sourcepub async fn on_chain_error(&mut self, error: &dyn Error)
pub async fn on_chain_error(&mut self, error: &dyn Error)
Run when chain errors (async).
Sourcepub async fn on_llm_start(
&self,
serialized: &HashMap<String, Value>,
prompts: &[String],
run_id: Option<Uuid>,
) -> Vec<AsyncCallbackManagerForLLMRun>
pub async fn on_llm_start( &self, serialized: &HashMap<String, Value>, prompts: &[String], run_id: Option<Uuid>, ) -> Vec<AsyncCallbackManagerForLLMRun>
Run when LLM starts running (async).
Sourcepub async fn on_chat_model_start(
&self,
serialized: &HashMap<String, Value>,
messages: &[Vec<BaseMessage>],
run_id: Option<Uuid>,
) -> Vec<AsyncCallbackManagerForLLMRun>
pub async fn on_chat_model_start( &self, serialized: &HashMap<String, Value>, messages: &[Vec<BaseMessage>], run_id: Option<Uuid>, ) -> Vec<AsyncCallbackManagerForLLMRun>
Run when chat model starts running (async).
Sourcepub async fn on_chain_start(
&self,
serialized: &HashMap<String, Value>,
inputs: &HashMap<String, Value>,
run_id: Option<Uuid>,
) -> AsyncCallbackManagerForChainRun
pub async fn on_chain_start( &self, serialized: &HashMap<String, Value>, inputs: &HashMap<String, Value>, run_id: Option<Uuid>, ) -> AsyncCallbackManagerForChainRun
Run when chain starts running (async).
Sourcepub async fn on_tool_start(
&self,
serialized: &HashMap<String, Value>,
input_str: &str,
run_id: Option<Uuid>,
inputs: Option<&HashMap<String, Value>>,
) -> AsyncCallbackManagerForToolRun
pub async fn on_tool_start( &self, serialized: &HashMap<String, Value>, input_str: &str, run_id: Option<Uuid>, inputs: Option<&HashMap<String, Value>>, ) -> AsyncCallbackManagerForToolRun
Run when tool starts running (async).
Sourcepub async fn on_retriever_start(
&self,
serialized: &HashMap<String, Value>,
query: &str,
run_id: Option<Uuid>,
) -> AsyncCallbackManagerForRetrieverRun
pub async fn on_retriever_start( &self, serialized: &HashMap<String, Value>, query: &str, run_id: Option<Uuid>, ) -> AsyncCallbackManagerForRetrieverRun
Run when retriever starts running (async).
Trait Implementations§
Source§impl Clone for AsyncCallbackManagerForChainGroup
impl Clone for AsyncCallbackManagerForChainGroup
Source§fn clone(&self) -> AsyncCallbackManagerForChainGroup
fn clone(&self) -> AsyncCallbackManagerForChainGroup
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 moreAuto Trait Implementations§
impl Freeze for AsyncCallbackManagerForChainGroup
impl !RefUnwindSafe for AsyncCallbackManagerForChainGroup
impl Send for AsyncCallbackManagerForChainGroup
impl Sync for AsyncCallbackManagerForChainGroup
impl Unpin for AsyncCallbackManagerForChainGroup
impl !UnwindSafe for AsyncCallbackManagerForChainGroup
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