langchain.chains.openai_functions.citation_fuzzy_match
.create_citation_fuzzy_match_runnable¶
- langchain.chains.openai_functions.citation_fuzzy_match.create_citation_fuzzy_match_runnable(llm: BaseChatModel) Runnable [source]¶
Create a citation fuzzy match Runnable.
Example usage:
from langchain.chains import create_citation_fuzzy_match_runnable from langchain_openai import ChatOpenAI llm = ChatOpenAI(model="gpt-4o-mini") context = "Alice has blue eyes. Bob has brown eyes. Charlie has green eyes." question = "What color are Bob's eyes?" chain = create_citation_fuzzy_match_runnable(llm) chain.invoke({"question": question, "context": context})
- Parameters
llm (BaseChatModel) – Language model to use for the chain. Must implement bind_tools.
- Returns
Runnable that can be used to answer questions with citations.
- Return type