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
  bb08dc5a_5e11_3e62_175f_2061ddb39b03["on_text()"]
  cb81f035_6209_92da_5f1a_e74d00943d49["RunManagerMixin"]
  bb08dc5a_5e11_3e62_175f_2061ddb39b03 -->|defined in| cb81f035_6209_92da_5f1a_e74d00943d49
  2372d334_1a17_a06a_9802_a02389cee15f["on_text()"]
  2372d334_1a17_a06a_9802_a02389cee15f -->|calls| bb08dc5a_5e11_3e62_175f_2061ddb39b03
  2372d334_1a17_a06a_9802_a02389cee15f["on_text()"]
  bb08dc5a_5e11_3e62_175f_2061ddb39b03 -->|calls| 2372d334_1a17_a06a_9802_a02389cee15f
  style bb08dc5a_5e11_3e62_175f_2061ddb39b03 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 377–392

    def on_text(
        self,
        text: str,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        **kwargs: Any,
    ) -> Any:
        """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.
            **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 377.
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