Home / Function/ get_spans() — langchain Function Reference

get_spans() — langchain Function Reference

Architecture documentation for the get_spans() function in citation_fuzzy_match.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  8be70a7e_02e6_604b_b482_cd466d411d5b["get_spans()"]
  c34f4615_223b_2b12_36ce_287f11058e32["FactWithEvidence"]
  8be70a7e_02e6_604b_b482_cd466d411d5b -->|defined in| c34f4615_223b_2b12_36ce_287f11058e32
  5e2b5a25_eccf_bb19_1eb5_5064cae0ce0a["_get_span()"]
  8be70a7e_02e6_604b_b482_cd466d411d5b -->|calls| 5e2b5a25_eccf_bb19_1eb5_5064cae0ce0a
  style 8be70a7e_02e6_604b_b482_cd466d411d5b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/openai_functions/citation_fuzzy_match.py lines 47–57

    def get_spans(self, context: str) -> Iterator[str]:
        """Get spans of the substring quote in the context.

        Args:
            context: The context in which to find the spans of the substring quote.

        Returns:
            An iterator over the spans of the substring quote in the context.
        """
        for quote in self.substring_quote:
            yield from self._get_span(quote, context)

Subdomains

Calls

Frequently Asked Questions

What does get_spans() do?
get_spans() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/openai_functions/citation_fuzzy_match.py.
Where is get_spans() defined?
get_spans() is defined in libs/langchain/langchain_classic/chains/openai_functions/citation_fuzzy_match.py at line 47.
What does get_spans() call?
get_spans() calls 1 function(s): _get_span.

Analyze Your Own Codebase

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

Try Supermodel Free