Home / Function/ on_text() — langchain Function Reference

on_text() — langchain Function Reference

Architecture documentation for the on_text() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  2372d334_1a17_a06a_9802_a02389cee15f["on_text()"]
  64513429_d001_87b1_5f19_cc17a3f3577b["AsyncCallbackHandler"]
  2372d334_1a17_a06a_9802_a02389cee15f -->|defined in| 64513429_d001_87b1_5f19_cc17a3f3577b
  bb08dc5a_5e11_3e62_175f_2061ddb39b03["on_text()"]
  bb08dc5a_5e11_3e62_175f_2061ddb39b03 -->|calls| 2372d334_1a17_a06a_9802_a02389cee15f
  bb08dc5a_5e11_3e62_175f_2061ddb39b03["on_text()"]
  2372d334_1a17_a06a_9802_a02389cee15f -->|calls| bb08dc5a_5e11_3e62_175f_2061ddb39b03
  style 2372d334_1a17_a06a_9802_a02389cee15f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 739–756

    async def on_text(
        self,
        text: str,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        tags: list[str] | None = None,
        **kwargs: Any,
    ) -> None:
        """Run on an arbitrary text.

        Args:
            text: The text.
            run_id: The ID of the current run.
            parent_run_id: The ID of the parent run.
            tags: The tags.
            **kwargs: Additional keyword arguments.
        """

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does on_text() do?
on_text() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is on_text() defined?
on_text() is defined in libs/core/langchain_core/callbacks/base.py at line 739.
What does on_text() call?
on_text() calls 1 function(s): on_text.
What calls on_text()?
on_text() is called by 1 function(s): on_text.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free