Home / Function/ on_llm_new_token() — langchain Function Reference

on_llm_new_token() — langchain Function Reference

Architecture documentation for the on_llm_new_token() function in callbacks.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  86b723f4_6524_0514_6f7d_34817131510d["on_llm_new_token()"]
  b1da79c3_cb84_0799_b179_c8776facb43e["FakeAsyncCallbackHandler"]
  86b723f4_6524_0514_6f7d_34817131510d -->|defined in| b1da79c3_cb84_0799_b179_c8776facb43e
  19892f3f_0f27_c511_ded9_86c854608795["on_llm_new_token()"]
  19892f3f_0f27_c511_ded9_86c854608795 -->|calls| 86b723f4_6524_0514_6f7d_34817131510d
  357a2418_0dcc_ea85_b4bd_b108511e4276["on_llm_new_token_common()"]
  86b723f4_6524_0514_6f7d_34817131510d -->|calls| 357a2418_0dcc_ea85_b4bd_b108511e4276
  19892f3f_0f27_c511_ded9_86c854608795["on_llm_new_token()"]
  86b723f4_6524_0514_6f7d_34817131510d -->|calls| 19892f3f_0f27_c511_ded9_86c854608795
  style 86b723f4_6524_0514_6f7d_34817131510d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/fake/callbacks.py lines 235–236

    async def on_llm_new_token(self, *args: Any, **kwargs: Any) -> None:
        self.on_llm_new_token_common()

Domain

Subdomains

Called By

Frequently Asked Questions

What does on_llm_new_token() do?
on_llm_new_token() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/fake/callbacks.py.
Where is on_llm_new_token() defined?
on_llm_new_token() is defined in libs/partners/openai/tests/unit_tests/fake/callbacks.py at line 235.
What does on_llm_new_token() call?
on_llm_new_token() calls 2 function(s): on_llm_new_token, on_llm_new_token_common.
What calls on_llm_new_token()?
on_llm_new_token() is called by 1 function(s): on_llm_new_token.

Analyze Your Own Codebase

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

Try Supermodel Free