MCPcopy Create free account
hub / github.com/CL-lau/SQL-GPT / RChain

Class RChain

gpt/docGPT.py:38–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36
37
38class RChain(BaseQaChain):
39 def __init__(
40 self,
41 chain_type: str,
42 retriever,
43 llm,
44 chain_type_kwargs: dict
45 ) -> None:
46 super().__init__(chain_type, retriever, llm)
47 self.chain_type_kwargs = chain_type_kwargs
48
49 @property
50 def create_qa_chain(self) -> RetrievalQA:
51 qa_chain = RetrievalQA.from_chain_type(
52 llm=self.llm,
53 chain_type=self.chain_type,
54 retriever=self.retriever,
55 chain_type_kwargs=self.chain_type_kwargs
56 )
57 return qa_chain
58
59
60class CRChain(BaseQaChain):

Callers 1

create_qa_chainMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected