Home / Function/ _get_run_ids_list() — langchain Function Reference

_get_run_ids_list() — langchain Function Reference

Architecture documentation for the _get_run_ids_list() function in llms.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  028461e5_de04_9807_5074_7a6e87bec6f3["_get_run_ids_list()"]
  ce4aa464_3868_179e_5d99_df48bc307c5f["BaseLLM"]
  028461e5_de04_9807_5074_7a6e87bec6f3 -->|defined in| ce4aa464_3868_179e_5d99_df48bc307c5f
  3ab24a73_7222_b6b9_1708_d227f0b8a684["generate()"]
  3ab24a73_7222_b6b9_1708_d227f0b8a684 -->|calls| 028461e5_de04_9807_5074_7a6e87bec6f3
  99297396_752a_7590_6d2b_c4757fc5a9d8["agenerate()"]
  99297396_752a_7590_6d2b_c4757fc5a9d8 -->|calls| 028461e5_de04_9807_5074_7a6e87bec6f3
  style 028461e5_de04_9807_5074_7a6e87bec6f3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/language_models/llms.py lines 1057–1070

    def _get_run_ids_list(
        run_id: uuid.UUID | list[uuid.UUID | None] | None, prompts: list
    ) -> list:
        if run_id is None:
            return [None] * len(prompts)
        if isinstance(run_id, list):
            if len(run_id) != len(prompts):
                msg = (
                    "Number of manually provided run_id's does not match batch length."
                    f" {len(run_id)} != {len(prompts)}"
                )
                raise ValueError(msg)
            return run_id
        return [run_id] + [None] * (len(prompts) - 1)

Domain

Subdomains

Frequently Asked Questions

What does _get_run_ids_list() do?
_get_run_ids_list() is a function in the langchain codebase, defined in libs/core/langchain_core/language_models/llms.py.
Where is _get_run_ids_list() defined?
_get_run_ids_list() is defined in libs/core/langchain_core/language_models/llms.py at line 1057.
What calls _get_run_ids_list()?
_get_run_ids_list() is called by 2 function(s): agenerate, generate.

Analyze Your Own Codebase

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

Try Supermodel Free