Home / Class/ _FakeCallback Class — langchain Architecture

_FakeCallback Class — langchain Architecture

Architecture documentation for the _FakeCallback class in test_base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  cb03c8f1_9cc4_2af2_ecce_d19fc9675c3e["_FakeCallback"]
  9659be4f_91d1_3b62_bcfb_38c048777165["FakeCallbackHandler"]
  cb03c8f1_9cc4_2af2_ecce_d19fc9675c3e -->|extends| 9659be4f_91d1_3b62_bcfb_38c048777165
  bd382a4e_442c_13ae_530c_6e34bc43623d["test_base.py"]
  cb03c8f1_9cc4_2af2_ecce_d19fc9675c3e -->|defined in| bd382a4e_442c_13ae_530c_6e34bc43623d
  1af1a498_c875_c738_b8bd_9cae9db34f7d["on_llm_end()"]
  cb03c8f1_9cc4_2af2_ecce_d19fc9675c3e -->|method| 1af1a498_c875_c738_b8bd_9cae9db34f7d

Relationship Graph

Source Code

libs/partners/openai/tests/integration_tests/chat_models/test_base.py lines 180–185

    class _FakeCallback(FakeCallbackHandler):
        saved_things: dict = {}

        def on_llm_end(self, *args: Any, **kwargs: Any) -> Any:
            # Save the generation
            self.saved_things["generation"] = args[0]

Frequently Asked Questions

What is the _FakeCallback class?
_FakeCallback is a class in the langchain codebase, defined in libs/partners/openai/tests/integration_tests/chat_models/test_base.py.
Where is _FakeCallback defined?
_FakeCallback is defined in libs/partners/openai/tests/integration_tests/chat_models/test_base.py at line 180.
What does _FakeCallback extend?
_FakeCallback extends FakeCallbackHandler.

Analyze Your Own Codebase

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

Try Supermodel Free