on_llm_new_token() — langchain Function Reference
Architecture documentation for the on_llm_new_token() function in fake_callback_handler.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD cc83360f_4559_7a61_bb7a_323669afddd0["on_llm_new_token()"] 66da139c_43ad_70b6_544d_0cf450da0b2f["FakeCallbackHandler"] cc83360f_4559_7a61_bb7a_323669afddd0 -->|defined in| 66da139c_43ad_70b6_544d_0cf450da0b2f 66f8fe92_7bd2_c28f_7664_8ca5fdb3f7c8["on_llm_new_token()"] 66f8fe92_7bd2_c28f_7664_8ca5fdb3f7c8 -->|calls| cc83360f_4559_7a61_bb7a_323669afddd0 48d16357_01fc_cec5_a48f_4af80af05ab5["on_llm_new_token_common()"] cc83360f_4559_7a61_bb7a_323669afddd0 -->|calls| 48d16357_01fc_cec5_a48f_4af80af05ab5 66f8fe92_7bd2_c28f_7664_8ca5fdb3f7c8["on_llm_new_token()"] cc83360f_4559_7a61_bb7a_323669afddd0 -->|calls| 66f8fe92_7bd2_c28f_7664_8ca5fdb3f7c8 style cc83360f_4559_7a61_bb7a_323669afddd0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py lines 148–153
def on_llm_new_token(
self,
*args: Any,
**kwargs: Any,
) -> Any:
self.on_llm_new_token_common()
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does on_llm_new_token() do?
on_llm_new_token() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py.
Where is on_llm_new_token() defined?
on_llm_new_token() is defined in libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py at line 148.
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