chatchat-space / Langchain-Chatchat

Langchain-Chatchat(原Langchain-ChatGLM)基于 Langchain 与 ChatGLM, Qwen 与 Llama 等语言模型的 RAG 与 Agent 应用 | Langchain-Chatchat (formerly langchain-ChatGLM), local knowledge based LLM (like ChatGLM, Qwen and Llama) RAG and Agent app with langchain
Apache License 2.0
31.18k stars 5.44k forks source link

[提问] langchain-chatchat目前可以总结文档全文吗 #3249

Closed HHH16 closed 4 months ago

HHH16 commented 6 months ago

功能描述 梳理文章的大纲

dosubot[bot] commented 6 months ago

嘿,@HHH16!很高兴再次看到你的提问。希望你最近一切都好!

是的,Langchain-Chatchat的当前版本可以总结整个文档并梳理文章的大纲。提供的代码包括了设计用于处理知识库文档的总结任务的函数。具体来说,recreate_summary_vector_storesummary_file_to_vector_store,和summary_doc_ids_to_vector_store函数是根据不同的输入(整个知识库,特定的文件名,或文档ID)来总结文档的。这些函数使用了一个文本总结适配器(SummaryAdapter),它可能与语言模型接口(由get_ChatOpenAI获取语言模型实例用于总结)来生成总结。这个过程包括在向量存储中创建或更新一个总结,这表明该系统既能总结文档,也能以结构化的方式组织这些总结,这可以被看作是梳理文章的大纲。

具体的语言模型包括:

这些模型都列在SUPPORT_AGENT_MODEL部分,表明它们被支持用于代理相关的功能,这将包括像文本总结这样的任务。

关于recreate_summary_vector_storesummary_file_to_vector_store,和summary_doc_ids_to_vector_store函数的详细工作方式,你可以参考我在上文中的解释。

相关的代码和文档可以在以下链接找到:

希望这个回答能帮助你,如果你有任何其他问题,欢迎继续提问。

Sources

#### About Dosu This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
github-actions[bot] commented 5 months ago

这个问题已经被标记为 stale ,因为它已经超过 30 天没有任何活动。