viruPVS/langchain-docs huggingface dataset:
Run when tool ends running.
on_tool_error(error: BaseException, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any¶
Run when tool errors.
on_tool_start(serialized: Dict[str, Any], input_str: str, *, run_id: UUID, parent_run_id: Optional[UUID] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶
Run when tool starts running.
Examples using BaseCallbackHandler¶
Ollama
Custom callback handlers
Multiple callback handlers
Async callbacks
Streaming final agent output
langchain.callbacks.tracers.logging.LoggingCallbackHandler¶
class langchain.callbacks.tracers.logging.LoggingCallbackHandler(logger: Logger, log_level: int = 20, extra: Optional[dict] = None, **kwargs: Any)[source]¶
Tracer that logs via the input Logger.
Attributes
ignore_agent
Whether to ignore agent callbacks.
ignore_chain
Whether to ignore chain callbacks.
ignore_chat_model
Whether to ignore chat model callbacks.
ignore_llm
Whether to ignore LLM callbacks.
ignore_retriever
Whether to ignore retriever callbacks.
ignore_retry
Whether to ignore retry callbacks.
name
raise_error
run_inline
Methods
__init__(logger[, log_level, extra])
get_breadcrumbs(run)
get_parents(run)
on_agent_action(action, *, run_id[, ...])
Run on agent action.
on_agent_finish(finish, *, run_id[, ...])
Run on agent end.
on_chain_end(outputs, *, run_id[, inputs])
End a trace for a chain run.
on_chain_error(error, *[, inputs])
Handle an error for a chain run.
on_chain_start(serialized, inputs, *, run_id)
Start a trace for a chain run.
on_chat_model_start(serialized, messages, *, ...)
Run when a chat model starts running.
on_llm_end(response, *, run_id, **kwargs)
End a trace for an LLM run.
on_llm_error(error, *, run_id, **kwargs)
Handle an error for an LLM run.
on_llm_new_token(token, *[, chunk, ...])
Run on new LLM token.
on_llm_start(serialized, prompts, *, run_id)
on_llm_start(serialized, prompts, *, run_id)
Start a trace for an LLM run.
on_retriever_end(documents, *, run_id, **kwargs)
Run when Retriever ends running.
on_retriever_error(error, *, run_id, **kwargs)
Run when Retriever errors.
on_retriever_start(serialized, query, *, run_id)
Run when Retriever starts running.
on_retry(retry_state, *, run_id, **kwargs)
Run on a retry event.
on_text(text, *, run_id[, parent_run_id])
Run on arbitrary text.
on_tool_end(output, *, run_id, **kwargs)
End a trace for a tool run.
on_tool_error(error, *, run_id, **kwargs)
Handle an error for a tool run.
on_tool_start(serialized, input_str, *, run_id)
Start a trace for a tool run.
__init__(logger: Logger, log_level: int = 20, extra: Optional[dict] = None, **kwargs: Any) → None[source]¶
get_breadcrumbs(run: Run) → str¶
get_parents(run: Run) → List[Run]¶
on_agent_action(action: AgentAction, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any¶
Run on agent action.
on_agent_finish(finish: AgentFinish, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any¶
Run on agent end.
Run on agent end.
on_chain_end(outputs: Dict[str, Any], *, run_id: UUID, inputs: Optional[Dict[str, Any]] = None, **kwargs: Any) → Run¶
End a trace for a chain run.
on_chain_error(error: BaseException, *, inputs: Optional[Dict[str, Any]] = None, run_id: UUID, **kwargs: Any) → Run¶
Handle an error for a chain run.
on_chain_start(serialized: Dict[str, Any], inputs: Dict[str, Any], *, run_id: UUID, tags: Optional[List[str]] = None, parent_run_id: Optional[UUID] = None, metadata: Optional[Dict[str, Any]] = None, run_type: Optional[str] = None, name: Optional[str] = None, **kwargs: Any) → Run¶
Start a trace for a chain run.
on_chat_model_start(serialized: Dict[str, Any], messages: List[List[BaseMessage]], *, run_id: UUID, parent_run_id: Optional[UUID] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶
Run when a chat model starts running.
on_llm_end(response: LLMResult, *, run_id: UUID, **kwargs: Any) → Run¶
End a trace for an LLM run.
on_llm_error(error: BaseException, *, run_id: UUID, **kwargs: Any) → Run¶
Handle an error for an LLM run.
on_llm_new_token(token: str, *, chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]] = None, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Run¶
Run on new LLM token. Only available when streaming is enabled.
Run on new LLM token. Only available when streaming is enabled.
on_llm_start(serialized: Dict[str, Any], prompts: List[str], *, run_id: UUID, tags: Optional[List[str]] = None, parent_run_id: Optional[UUID] = None, metadata: Optional[Dict[str, Any]] = None, name: Optional[str] = None, **kwargs: Any) → Run¶
Start a trace for an LLM run.
on_retriever_end(documents: Sequence[Document], *, run_id: UUID, **kwargs: Any) → Run¶
Run when Retriever ends running.
on_retriever_error(error: BaseException, *, run_id: UUID, **kwargs: Any) → Run¶
Run when Retriever errors.
on_retriever_start(serialized: Dict[str, Any], query: str, *, run_id: UUID, parent_run_id: Optional[UUID] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, name: Optional[str] = None, **kwargs: Any) → Run¶
Run when Retriever starts running.
on_retry(retry_state: RetryCallState, *, run_id: UUID, **kwargs: Any) → Run¶
Run on a retry event.
on_text(text: str, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → None[source]¶
Run on arbitrary text.
on_tool_end(output: str, *, run_id: UUID, **kwargs: Any) → Run¶
End a trace for a tool run.
on_tool_error(error: BaseException, *, run_id: UUID, **kwargs: Any) → Run¶
Handle an error for a tool run.
Handle an error for a tool run.
on_tool_start(serialized: Dict[str, Any], input_str: str, *, run_id: UUID, tags: Optional[List[str]] = None, parent_run_id: Optional[UUID] = None, metadata: Optional[Dict[str, Any]] = None, name: Optional[str] = None, **kwargs: Any) → Run¶
Start a trace for a tool run.
langchain_community.callbacks.flyte_callback.analyze_text¶
langchain_community.callbacks.flyte_callback.analyze_text(text: str, nlp: Any = None, textstat: Any = None) → dict[source]¶
Analyze text using textstat and spacy.
Parameters
text (str) – The text to analyze.
nlp (spacy.lang) – The spacy language model to use for visualization.
Returns
A dictionary containing the complexity metrics and visualizationfiles serialized to HTML string.
Return type
(dict)
langchain_community.callbacks.streamlit.mutable_expander.ChildType¶
class langchain_community.callbacks.streamlit.mutable_expander.ChildType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
The enumerator of the child type.
MARKDOWN = 'MARKDOWN'¶
EXCEPTION = 'EXCEPTION'¶
langchain_community.callbacks.confident_callback.DeepEvalCallbackHandler¶
class langchain_community.callbacks.confident_callback.DeepEvalCallbackHandler(metrics: List[Any], implementation_name: Optional[str] = None)[source]¶
Callback Handler that logs into deepeval.
Parameters
implementation_name – name of the implementation in deepeval
metrics – A list of metrics
Raises
ImportError – if the deepeval package is not installed.
Examples
>>> from langchain_community.llms import OpenAI
>>> from langchain_community.callbacks import DeepEvalCallbackHandler
>>> from deepeval.metrics import AnswerRelevancy
>>> metric = AnswerRelevancy(minimum_score=0.3)
>>> deepeval_callback = DeepEvalCallbackHandler(
...     implementation_name="exampleImplementation",
...     metrics=[metric],
... )
>>> llm = OpenAI(
...     temperature=0,
...     callbacks=[deepeval_callback],
...     verbose=True,
...     openai_api_key="API_KEY_HERE",
... )
>>> llm.generate([
...     "What is the best evaluation tool out there? (no bias at all)",
... ])
"Deepeval, no doubt about it."
Initializes the deepevalCallbackHandler.
Parameters
implementation_name – Name of the implementation you want.
metrics – What metrics do you want to track?
Raises
ImportError – if the deepeval package is not installed.
ConnectionError – if the connection to deepeval fails.
Attributes
BLOG_URL
ISSUES_URL
REPO_URL
ignore_agent
Whether to ignore agent callbacks.
ignore_chain
Whether to ignore chain callbacks.
ignore_chat_model
Whether to ignore chat model callbacks.
ignore_llm
Whether to ignore LLM callbacks.
ignore_retriever
Whether to ignore retriever callbacks.
ignore_retry
ignore_retriever
Whether to ignore retriever callbacks.
ignore_retry
Whether to ignore retry callbacks.
raise_error
run_inline
Methods
__init__(metrics[, implementation_name])
Initializes the deepevalCallbackHandler.
on_agent_action(action, **kwargs)
Do nothing when agent takes a specific action.
on_agent_finish(finish, **kwargs)
Do nothing
on_chain_end(outputs, **kwargs)
Do nothing when chain ends.
on_chain_error(error, **kwargs)
Do nothing when LLM chain outputs an error.
on_chain_start(serialized, inputs, **kwargs)
Do nothing when chain starts
on_chat_model_start(serialized, messages, *, ...)
Run when a chat model starts running.
on_llm_end(response, **kwargs)
Log records to deepeval when an LLM ends.
on_llm_error(error, **kwargs)
Do nothing when LLM outputs an error.
on_llm_new_token(token, **kwargs)
Do nothing when a new token is generated.
on_llm_start(serialized, prompts, **kwargs)
Store the prompts
on_retriever_end(documents, *, run_id[, ...])
Run when Retriever ends running.
on_retriever_error(error, *, run_id[, ...])
Run when Retriever errors.
on_retriever_start(serialized, query, *, run_id)
Run when Retriever starts running.
on_retry(retry_state, *, run_id[, parent_run_id])
Run on a retry event.
on_text(text, **kwargs)
Do nothing
on_tool_end(output[, observation_prefix, ...])
Do nothing when tool ends.
on_tool_error(error, **kwargs)
Do nothing when tool ends.
on_tool_error(error, **kwargs)
Do nothing when tool outputs an error.
on_tool_start(serialized, input_str, **kwargs)
Do nothing when tool starts.
__init__(metrics: List[Any], implementation_name: Optional[str] = None) → None[source]¶
Initializes the deepevalCallbackHandler.
Parameters
implementation_name – Name of the implementation you want.
metrics – What metrics do you want to track?
Raises
ImportError – if the deepeval package is not installed.
ConnectionError – if the connection to deepeval fails.
on_agent_action(action: AgentAction, **kwargs: Any) → Any[source]¶
Do nothing when agent takes a specific action.
on_agent_finish(finish: AgentFinish, **kwargs: Any) → None[source]¶
Do nothing
on_chain_end(outputs: Dict[str, Any], **kwargs: Any) → None[source]¶
Do nothing when chain ends.
on_chain_error(error: BaseException, **kwargs: Any) → None[source]¶
Do nothing when LLM chain outputs an error.
on_chain_start(serialized: Dict[str, Any], inputs: Dict[str, Any], **kwargs: Any) → None[source]¶
Do nothing when chain starts
on_chat_model_start(serialized: Dict[str, Any], messages: List[List[BaseMessage]], *, run_id: UUID, parent_run_id: Optional[UUID] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶
Run when a chat model starts running.
on_llm_end(response: LLMResult, **kwargs: Any) → None[source]¶
Log records to deepeval when an LLM ends.
Log records to deepeval when an LLM ends.
on_llm_error(error: BaseException, **kwargs: Any) → None[source]¶
Do nothing when LLM outputs an error.
on_llm_new_token(token: str, **kwargs: Any) → None[source]¶
Do nothing when a new token is generated.
on_llm_start(serialized: Dict[str, Any], prompts: List[str], **kwargs: Any) → None[source]¶
Store the prompts
on_retriever_end(documents: Sequence[Document], *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any¶
Run when Retriever ends running.
on_retriever_error(error: BaseException, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any¶
Run when Retriever errors.
on_retriever_start(serialized: Dict[str, Any], query: str, *, run_id: UUID, parent_run_id: Optional[UUID] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶
Run when Retriever starts running.
on_retry(retry_state: RetryCallState, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any¶
Run on a retry event.
on_text(text: str, **kwargs: Any) → None[source]¶
Do nothing
on_tool_end(output: str, observation_prefix: Optional[str] = None, llm_prefix: Optional[str] = None, **kwargs: Any) → None[source]¶
Do nothing when tool ends.
on_tool_error(error: BaseException, **kwargs: Any) → None[source]¶
langchain_community.callbacks.tracers.wandb.WandbTracer¶
class langchain_community.callbacks.tracers.wandb.WandbTracer(run_args: Optional[WandbRunArgs] = None, **kwargs: Any)[source]¶
Callback Handler that logs to Weights and Biases.
This handler will log the model architecture and run traces to Weights and Biases.
This will ensure that all LangChain activity is logged to W&B.
Initializes the WandbTracer.
Parameters
run_args – (dict, optional) Arguments to pass to wandb.init(). If not
provided, wandb.init() will be called with no arguments. Please
refer to the wandb.init for more details.
To use W&B to monitor all LangChain activity, add this tracer like any other
LangChain callback:
```
from wandb.integration.langchain import WandbTracer
tracer = WandbTracer()
chain = LLMChain(llm, callbacks=[tracer])
# …end of notebook / script:
tracer.finish()
```
Attributes
ignore_agent
Whether to ignore agent callbacks.
ignore_chain
Whether to ignore chain callbacks.
ignore_chat_model
Whether to ignore chat model callbacks.
ignore_llm
Whether to ignore LLM callbacks.
ignore_retriever
Whether to ignore retriever callbacks.
ignore_retry
Whether to ignore retry callbacks.
raise_error
run_inline
Methods
__init__([run_args])
Initializes the WandbTracer.
finish()
Waits for all asynchronous processes to finish and data to upload.
on_agent_action(action, *, run_id[, ...])
Run on agent action.
on_agent_finish(finish, *, run_id[, ...])
Run on agent end.
on_chain_end(outputs, *, run_id[, inputs])
on_chain_end(outputs, *, run_id[, inputs])
End a trace for a chain run.
on_chain_error(error, *[, inputs])
Handle an error for a chain run.
on_chain_start(serialized, inputs, *, run_id)
Start a trace for a chain run.
on_chat_model_start(serialized, messages, *, ...)
Run when a chat model starts running.
on_llm_end(response, *, run_id, **kwargs)
End a trace for an LLM run.
on_llm_error(error, *, run_id, **kwargs)
Handle an error for an LLM run.
on_llm_new_token(token, *[, chunk, ...])
Run on new LLM token.
on_llm_start(serialized, prompts, *, run_id)
Start a trace for an LLM run.
on_retriever_end(documents, *, run_id, **kwargs)
Run when Retriever ends running.
on_retriever_error(error, *, run_id, **kwargs)
Run when Retriever errors.
on_retriever_start(serialized, query, *, run_id)
Run when Retriever starts running.
on_retry(retry_state, *, run_id, **kwargs)
Run on a retry event.
on_text(text, *, run_id[, parent_run_id])
Run on arbitrary text.
on_tool_end(output, *, run_id, **kwargs)
End a trace for a tool run.
on_tool_error(error, *, run_id, **kwargs)
Handle an error for a tool run.
on_tool_start(serialized, input_str, *, run_id)
on_tool_start(serialized, input_str, *, run_id)
Start a trace for a tool run.
__init__(run_args: Optional[WandbRunArgs] = None, **kwargs: Any) → None[source]¶
Initializes the WandbTracer.
Parameters
run_args – (dict, optional) Arguments to pass to wandb.init(). If not
provided, wandb.init() will be called with no arguments. Please
refer to the wandb.init for more details.
To use W&B to monitor all LangChain activity, add this tracer like any other
LangChain callback:
```
from wandb.integration.langchain import WandbTracer
tracer = WandbTracer()
chain = LLMChain(llm, callbacks=[tracer])
# …end of notebook / script:
tracer.finish()
```
finish() → None[source]¶
Waits for all asynchronous processes to finish and data to upload.
Proxy for wandb.finish().
on_agent_action(action: AgentAction, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any¶
Run on agent action.
on_agent_finish(finish: AgentFinish, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any¶
Run on agent end.
on_chain_end(outputs: Dict[str, Any], *, run_id: UUID, inputs: Optional[Dict[str, Any]] = None, **kwargs: Any) → Run¶
End a trace for a chain run.
on_chain_error(error: BaseException, *, inputs: Optional[Dict[str, Any]] = None, run_id: UUID, **kwargs: Any) → Run¶
Handle an error for a chain run.
langchain_community.callbacks.aim_callback.BaseMetadataCallbackHandler¶
class langchain_community.callbacks.aim_callback.BaseMetadataCallbackHandler[source]¶
This class handles the metadata and associated function states for callbacks.
step¶
The current step.
Type
int
starts¶
The number of times the start method has been called.
Type
int
ends¶
The number of times the end method has been called.
Type
int
errors¶
The number of times the error method has been called.
Type
int
text_ctr¶
The number of times the text method has been called.
Type
int
ignore_llm_¶
Whether to ignore llm callbacks.
Type
bool
ignore_chain_¶
Whether to ignore chain callbacks.
Type
bool
ignore_agent_¶
Whether to ignore agent callbacks.
Type
bool
ignore_retriever_¶
Whether to ignore retriever callbacks.
Type
bool
always_verbose_¶
Whether to always be verbose.
Type
bool
chain_starts¶
The number of times the chain start method has been called.
Type
int
chain_ends¶
The number of times the chain end method has been called.
Type
int
llm_starts¶
The number of times the llm start method has been called.
Type
int
llm_ends¶
The number of times the llm end method has been called.
Type
int
llm_streams¶
The number of times the text method has been called.
Type
int
tool_starts¶
The number of times the tool start method has been called.
Type
int
tool_ends¶
The number of times the tool end method has been called.
Type
int
agent_ends¶
The number of times the agent end method has been called.
Type
int
Attributes
always_verbose
Type
int
Attributes
always_verbose
Whether to call verbose callbacks even if verbose is False.
ignore_agent
Whether to ignore agent callbacks.
ignore_chain
Whether to ignore chain callbacks.
ignore_llm
Whether to ignore LLM callbacks.
ignore_retriever
Whether to ignore retriever callbacks.
Methods
__init__()
get_custom_callback_meta()
reset_callback_meta()
Reset the callback metadata.
__init__() → None[source]¶
get_custom_callback_meta() → Dict[str, Any][source]¶
reset_callback_meta() → None[source]¶
Reset the callback metadata.
langchain_community.callbacks.streamlit.mutable_expander.MutableExpander¶
class langchain_community.callbacks.streamlit.mutable_expander.MutableExpander(parent_container: DeltaGenerator, label: str, expanded: bool)[source]¶
A Streamlit expander that can be renamed and dynamically expanded/collapsed.
Create a new MutableExpander.
Parameters
parent_container – The st.container that the expander will be created inside.
The expander transparently deletes and recreates its underlying
st.expander instance when its label changes, and it uses
parent_container to ensure it recreates this underlying expander in the
same location onscreen.
label – The expander’s initial label.
expanded – The expander’s initial expanded value.
Attributes
expanded
True if the expander was created with expanded=True.
label
The expander's label string.
Methods
__init__(parent_container, label, expanded)
Create a new MutableExpander.
append_copy(other)
Append a copy of another MutableExpander's children to this MutableExpander.
clear()
Remove the container and its contents entirely.
exception(exception, *[, index])
Add an Exception element to the container and return its index.
markdown(body[, unsafe_allow_html, help, index])
Add a Markdown element to the container and return its index.
update(*[, new_label, new_expanded])
Change the expander's label and expanded state
__init__(parent_container: DeltaGenerator, label: str, expanded: bool)[source]¶
Create a new MutableExpander.
Parameters
parent_container – The st.container that the expander will be created inside.
The expander transparently deletes and recreates its underlying
st.expander instance when its label changes, and it uses
parent_container to ensure it recreates this underlying expander in the
parent_container to ensure it recreates this underlying expander in the
same location onscreen.
label – The expander’s initial label.
expanded – The expander’s initial expanded value.
append_copy(other: MutableExpander) → None[source]¶
Append a copy of another MutableExpander’s children to this
MutableExpander.
clear() → None[source]¶
Remove the container and its contents entirely. A cleared container can’t
be reused.
exception(exception: BaseException, *, index: Optional[int] = None) → int[source]¶
Add an Exception element to the container and return its index.
markdown(body: SupportsStr, unsafe_allow_html: bool = False, *, help: Optional[str] = None, index: Optional[int] = None) → int[source]¶
Add a Markdown element to the container and return its index.
update(*, new_label: Optional[str] = None, new_expanded: Optional[bool] = None) → None[source]¶
Change the expander’s label and expanded state
langchain_core.callbacks.manager.AsyncParentRunManager¶
class langchain_core.callbacks.manager.AsyncParentRunManager(*, run_id: UUID, handlers: List[BaseCallbackHandler], inheritable_handlers: List[BaseCallbackHandler], parent_run_id: Optional[UUID] = None, tags: Optional[List[str]] = None, inheritable_tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, inheritable_metadata: Optional[Dict[str, Any]] = None)[source]¶
Async Parent Run Manager.
Initialize the run manager.
Parameters
run_id (UUID) – The ID of the run.
handlers (List[BaseCallbackHandler]) – The list of handlers.
inheritable_handlers (List[BaseCallbackHandler]) – The list of inheritable handlers.
parent_run_id (UUID, optional) – The ID of the parent run.
Defaults to None.
tags (Optional[List[str]]) – The list of tags.
inheritable_tags (Optional[List[str]]) – The list of inheritable tags.
metadata (Optional[Dict[str, Any]]) – The metadata.
inheritable_metadata (Optional[Dict[str, Any]]) – The inheritable metadata.
Methods
__init__(*, run_id, handlers, ...[, ...])
Initialize the run manager.
get_child([tag])
Get a child callback manager.
get_noop_manager()
Return a manager that doesn't perform any operations.
on_retry(retry_state, **kwargs)
Run on a retry event.
on_text(text, **kwargs)
Run when text is received.
on_text(text, **kwargs)
Run when text is received.
__init__(*, run_id: UUID, handlers: List[BaseCallbackHandler], inheritable_handlers: List[BaseCallbackHandler], parent_run_id: Optional[UUID] = None, tags: Optional[List[str]] = None, inheritable_tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, inheritable_metadata: Optional[Dict[str, Any]] = None) → None¶
Initialize the run manager.
Parameters
run_id (UUID) – The ID of the run.
handlers (List[BaseCallbackHandler]) – The list of handlers.
inheritable_handlers (List[BaseCallbackHandler]) – The list of inheritable handlers.
parent_run_id (UUID, optional) – The ID of the parent run.
Defaults to None.
tags (Optional[List[str]]) – The list of tags.
inheritable_tags (Optional[List[str]]) – The list of inheritable tags.
metadata (Optional[Dict[str, Any]]) – The metadata.
inheritable_metadata (Optional[Dict[str, Any]]) – The inheritable metadata.
get_child(tag: Optional[str] = None) → AsyncCallbackManager[source]¶
Get a child callback manager.
Parameters
tag (str, optional) – The tag for the child callback manager.
Defaults to None.
Returns
The child callback manager.
Return type
AsyncCallbackManager
classmethod get_noop_manager() → BRM¶
Return a manager that doesn’t perform any operations.
Returns
The noop manager.
Return type
BaseRunManager
async on_retry(retry_state: RetryCallState, **kwargs: Any) → None¶
Run on a retry event.
async on_text(text: str, **kwargs: Any) → Any¶
Run when text is received.
Parameters