Home / Function/ on_chat_model_start() — langchain Function Reference

on_chat_model_start() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f2c6af84_d763_d802_de3b_380a1a16de1a["on_chat_model_start()"]
  27ea2dc5_60e8_ce57_5bce_e47cfff242a4["FakeCallbackHandlerWithChatStart"]
  f2c6af84_d763_d802_de3b_380a1a16de1a -->|defined in| 27ea2dc5_60e8_ce57_5bce_e47cfff242a4
  33f8be6a_59ea_5b08_3f8a_c92d8c1e964d["on_chat_model_start_common()"]
  f2c6af84_d763_d802_de3b_380a1a16de1a -->|calls| 33f8be6a_59ea_5b08_3f8a_c92d8c1e964d
  style f2c6af84_d763_d802_de3b_380a1a16de1a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/fake/callbacks.py lines 198–208

    def on_chat_model_start(
        self,
        serialized: dict[str, Any],
        messages: list[list[BaseMessage]],
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        **kwargs: Any,
    ) -> Any:
        assert all(isinstance(m, BaseMessage) for m in chain(*messages))
        self.on_chat_model_start_common()

Domain

Subdomains

Frequently Asked Questions

What does on_chat_model_start() do?
on_chat_model_start() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/fake/callbacks.py.
Where is on_chat_model_start() defined?
on_chat_model_start() is defined in libs/partners/openai/tests/unit_tests/fake/callbacks.py at line 198.
What does on_chat_model_start() call?
on_chat_model_start() calls 1 function(s): on_chat_model_start_common.

Analyze Your Own Codebase

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

Try Supermodel Free