pangukitsappdev.qa_with_sources package

Submodules

pangukitsappdev.qa_with_sources.refine_prompt module

pangukitsappdev.qa_with_sources.retrieval module

class pangukitsappdev.qa_with_sources.retrieval.RetrievalQAWithAllSourcesChain(*, name: Optional[str] = None, memory: Optional[BaseMemory] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, verbose: bool = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, callback_manager: Optional[BaseCallbackManager] = None, combine_documents_chain: BaseCombineDocumentsChain, question_key: str = 'question', input_docs_key: str = 'docs', answer_key: str = 'answer', sources_answer_key: str = 'sources', return_source_documents: bool = False, retriever: BaseRetriever, reduce_k_below_max_tokens: bool = False, max_tokens_limit: int = 3375)

基类:RetrievalQAWithSourcesChain

不依赖LLM的输出获取答案的来源,而是根据查询出来的doc数据直接获取source信息

max_tokens_limit: int

Restrict the docs to return from store based on tokens, enforced only for StuffDocumentChain and if reduce_k_below_max_tokens is to true

reduce_k_below_max_tokens: bool

Reduce the number of results to return from store based on tokens limit

retriever: BaseRetriever

Index to connect to.

pangukitsappdev.qa_with_sources.stuff_prompt module

Module contents