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

Method create_qa_chain

gpt/docGPT.py:70–85  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68
69 @property
70 def create_qa_chain(self):
71 # TODO: cannot use conversation qa chain
72 from langchain.chains import ConversationalRetrievalChain
73 from langchain.memory import ConversationBufferMemory
74
75 memory = ConversationBufferMemory(
76 memory_key='chat_history',
77 return_messages=True
78 )
79 qa_chain = ConversationalRetrievalChain.from_llm(
80 llm=self.llm,
81 chain_type=self.chain_type,
82 retriever=self.retriever,
83 memory=memory
84 )
85 return qa_chain
86
87
88class DocGPT:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected