Home / Function/ __call__() — langchain Function Reference

__call__() — langchain Function Reference

Architecture documentation for the __call__() function in huggingface_pipeline.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  d950c92b_ea43_8b18_33f7_f6c6d4765d9e["__call__()"]
  65a467c6_81d2_7b58_16ac_fb96150d6b19["StopOnTokens"]
  d950c92b_ea43_8b18_33f7_f6c6d4765d9e -->|defined in| 65a467c6_81d2_7b58_16ac_fb96150d6b19
  style d950c92b_ea43_8b18_33f7_f6c6d4765d9e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/huggingface/langchain_huggingface/llms/huggingface_pipeline.py lines 392–398

            def __call__(
                self,
                input_ids: torch.LongTensor,
                scores: torch.FloatTensor,
                **kwargs: Any,
            ) -> bool:
                return any(input_ids[0][-1] == stop_id for stop_id in stopping_ids_list)

Domain

Subdomains

Frequently Asked Questions

What does __call__() do?
__call__() is a function in the langchain codebase, defined in libs/partners/huggingface/langchain_huggingface/llms/huggingface_pipeline.py.
Where is __call__() defined?
__call__() is defined in libs/partners/huggingface/langchain_huggingface/llms/huggingface_pipeline.py at line 392.

Analyze Your Own Codebase

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

Try Supermodel Free