作者:微信小助手
<p style="-webkit-tap-highlight-color: transparent;margin: 16px 8px;outline: 0px;font-family: " pingfang sc, system-ui, -apple-system, system-ui, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 16px;letter-spacing: 0.578px;background-color: rgb(255, 255, 255);visibility: visible;line-height: 1.5em;><img alt="图片" class="rich_pages wxw-img" data-backh="181" data-backw="562" data-imgfileid="100024802" data-ratio="0.3220338983050847" src="/upload/dbfa5b2bde05964abe135c00d33dee88.png" data-w="708" style="-webkit-tap-highlight-color: transparent;outline: 0px;border-style: none;width: 661px !important;visibility: visible !important;"></p> <section style="-webkit-tap-highlight-color: transparent;margin-right: 8px;margin-left: 8px;outline: 0px;font-family: " pingfang sc, system-ui, -apple-system, system-ui, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;visibility: visible;> <img alt="图片" class="rich_pages wxw-img" data-backh="172" data-backw="406" src="https://mmbiz.qpic.cn/mmbiz_png/MqgA8Ylgeh4RLqZ6MOUZsdicJl4mW32ibRWLUJXXcWCxErficeicbMwgaj0FLaQNbtRVrQqo2PGo4InlkeHOwNMc9g/0?wx_fmt=png&from=appmsg" data-cropx1="0" data-cropx2="904.7001254705144" data-cropy1="0" data-cropy2="383.129234629862" data-galleryid="" data-imgfileid="100024803" data-ratio="0.42367256637168144" data-s="300,640" src="/upload/dd9bd7c17d4f4396926435f6aedc02ab.jpg" data-type="jpeg" data-w="904" style="-webkit-tap-highlight-color: transparent;outline: 0px;width: 562px;visibility: visible !important;height: 238px;"> </section> <h1 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);background: none 0% auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgb(2, 30, 170);font-size: 18px;font-weight: bolder;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>前言</span></h1> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>最近,通义开源的QwQ-32B模型可谓是火的一塌糊涂。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>作为一个中型推理模型,QwQ-32B<strong>只有320亿参数,但却在多个基准测试中展现出优秀的推理能力</strong>,几乎直逼满血版DeepSeek R1,在数学计算、写作与代码编程方面的表现更是相当不错。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>最重要的是,QwQ-32B不仅性能强大,还极其“亲民”,它体积小、推理快,支持消费级显卡部署,像RTX 4090这样的显卡就能轻松运行,非常适合普通个人开发者或者资源不足的科研党上手学习。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>不过,由于QwQ-32B采用的是<strong>密集模型,相比DeepSeek R1,在长文本复杂推理上,经常会出现无法识别前面内容,或者幻觉问题</strong>。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>因此,在本地场景中,基于QwQ-32B部署RAG就成了解决这美中不足的最强外挂。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>接下来,在本篇文章中,我们会基于Ollama开源平台,手把手向大家展示如何利用QwQ-32B和Milvus高效、安全地构建RAG(检索增强生成)系统。</span></p> <h1 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="color: rgb(2, 30, 170);font-size: 24px;"><strong><span style="color: rgb(2, 30, 170);font-size: 24px;-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>01</span></strong></span></h1> <h1 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="font-size: 18px;color: rgb(2, 30, 170);"><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>选型思路</span></strong></span></h1> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="color: rgb(2, 30, 170);"><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>(1)QwQ-32B VS DeepSeek R1如何选择</span></strong></span><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>同为主打推理的大模型,DeepSeek-R1的架构为MoE结构,QwQ-32B则属于典型的密集模型。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>通常来说,MoE模型更加适合知识密集型场景,例如知识问答系统、信息检索等,以及大规模数据处理,例如在处理大规模文本数据、图像数据时,MoE模型可以通过不同专家处理不同的数据子集,提高处理效率。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>但MoE庞大的参数量决定了,部署满血大模型需要在云端或者自有服务器资源上运行。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>而密集模型体积小,计算成本高,更适合需要深度连贯推理的场景,例如复杂的逻辑推理任务、深度阅读理解等,以及复杂算法设计等对实时性要求不高的场景。最大的优点在于非常适合本地部署,但有时候,也会出现废话过多的情况。</span></p> <table data-ace-table-col-widths="100;318;318" width="500" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> <colgroup style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> <col width="100" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> <col width="318" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> <col width="318" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> </colgroup> <tbody style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> <tr style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> <td colspan="1" rowspan="1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>对比维度</span></p></td> <td colspan="1" rowspan="1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>密集模型(QwQ-32B)</span></p></td> <td colspan="1" rowspan="1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>MoE模型(DeepSeek-R1)</span></p></td> </tr> <tr style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> <td colspan="1" rowspan="1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>优点</span></p></td> <td colspan="1" rowspan="1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>训练难度相对低,过程简单直接</span></p><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>推理连贯性好,所有神经元都参与计算和推理,能整体把握上下文信息</span></p></td> <td colspan="1" rowspan="1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>计算效率高,推理时只需激活部分专家</span></p><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>模型容量大,可通过增加专家数量扩展</span></p></td> </tr> <tr style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> <td colspan="1" rowspan="1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>缺点</span></p></td> <td colspan="1" rowspan="1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>计算成本高,训练和推理需大量计算资源和内存</span></p><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>模型容量扩展受限,易过拟合,存储部署成本高</span></p></td> <td colspan="1" rowspan="1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>训练复杂,需训练门控网络,考虑专家负载平衡</span></p><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>存在路由开销,门控网络路由选择有额外计算和时间消耗</span></p></td> </tr> </tbody> </table> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>密集模型和 MoE 模型各有其独特的优势和局限性,不存在绝对的优劣之分。在实际应用中,我们需要根据具体的任务需求、数据特点、计算资源和预算等因素来选择合适的模型架构。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>不过,在我看来,未来的发展趋势可能是将两者的优势相结合,例如在一些复杂的任务中,可以先使用 MoE 模型进行初步的知识检索和粗粒度的处理,然后再利用密集模型进行深度的推理和细化,以达到更好的性能。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;color: rgb(2, 30, 170);>(2)向量数据库选型</span></strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>考虑到QwQ-32B容易出现幻觉的问题,我们可以在其本地部署过程中,引入Milvus 开源向量数据库。Milvus 专为存储和查询高维向量(如 XLNet 生成的向量)而生,能够处理数百万乃至数十亿级的向量数据,并支持混合检索、全文检索等一众特性需求,是 GitHub 上最受欢迎的向量数据库。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;color: rgb(2, 30, 170);>(3)部署平台选型</span></strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>本次部署,平台方面,我们可以考虑采用Ollama开源平台。作为一个为专大型语言模型(LLM)提供本地运行和管理的解决方案,Ollama可以简化部署和管理流程,允许用户通过简单的命令行工具和Docker集成快速部署模型,同时支持Modelfile管理来简化模型版本控制和复用。其次,它提供了丰富的模型库,并具备跨平台与硬件适配的特点,支持macOS、Linux、Windows及Docker容器部署,并能自动检测GPU并优先启用加速。此外,Ollama提供了开发者友好的工具,如REST API和Python SDK,方便将模型集成到应用中。</span></p> <h2 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="color: rgb(2, 30, 170);font-size: 24px;"><strong><span style="font-size: 24px;color: rgb(2, 30, 170);-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>02</span></strong></span></h2> <h2 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="color: rgb(2, 30, 170);font-size: 18px;"><strong><span style="color: rgb(2, 30, 170);-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>准备工作</span></strong></span><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></h2> <h3 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;color: rgb(2, 30, 170);>环境</span></strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></h3> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="diff"><code><span class="code-snippet_outer"><span class="code-snippet__addition">! pip install pymilvus ollama</span></span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <h3 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="color: rgb(2, 30, 170);"><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>数据集准备</span></strong></span><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></h3> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>我们可以使用Milvus文档2.4. x中的FAQ页面作为RAG中的私有知识,这是构建一个基础RAG的良好数据源。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>下载zip文件并将文档解压缩到文件夹milvus_docs</span></p> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="diff"><code><span class="code-snippet_outer"><span class="code-snippet__addition">! wget https://github.com/milvus-io/milvus-docs/releases/download/v2.4.6-preview/milvus_docs_2.4.x_en.zip</span></span></code><code><span class="code-snippet_outer"><span class="code-snippet__addition">! unzip -q milvus_docs_2.4.x_en.zip -d milvus_docs</span></span></code><code><span class="code-snippet_outer"><br></span></code></pre> </section> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>我们从文件夹milvus_docs/en/faq中加载所有markdown文件,对于每个文档,我们只需用“#”来分隔文件中的内容,就可以大致分隔markdown文件各个主要部分的内容。</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="python"><code><span class="code-snippet_outer"><span class="code-snippet__keyword">from</span> glob <span class="code-snippet__keyword">import</span> glob</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">text_lines = []</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"><span class="code-snippet__keyword">for</span> file_path <span class="code-snippet__keyword">in</span> glob(<span class="code-snippet__string">"milvus_docs/en/faq/*.md"</span>, recursive=<span class="code-snippet__keyword">True</span>):</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__keyword">with</span> open(file_path, <span class="code-snippet__string">"r"</span>) <span class="code-snippet__keyword">as</span> file:</span></code><code><span class="code-snippet_outer"> file_text = file.read()</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"> text_lines += file_text.split(<span class="code-snippet__string">"# "</span>)</span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <h3 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="color: rgb(2, 30, 170);"><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>准备 LLM 和Embedding模型</span></strong></span><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></h3> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>Ollama支持基于LLM的任务和Embedding的多种模型,从而可以轻松开发检索增强生成(RAG)应用程序。对于这种设置:</span></p> <ul start="1" class="list-paddingleft-1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;margin-left: 16px;margin-right: 16px;> <li style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>我们将使用QwQ(32B)作为文本生成任务的LLM。</span></p></li> <li style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>对于Embedding模型,我们将使用mxbay-embed-size,这是一个针对语义相似性优化的334M参数模型。</span></p></li> </ul> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>在开始之前,确保两个模型都被下载到本地:</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="diff"><code><span class="code-snippet_outer"><span class="code-snippet__addition">! ollama pull mxbai-embed-large</span></span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="diff"><code><span class="code-snippet_outer"><span class="code-snippet__addition">! ollama pull qwq</span></span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>准备好这些模型后,我们可以开始LLM生成和基于Embedding的检索工作流程。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>生成测试embedding并打印其维度和前几个元素。</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="python"><code><span class="code-snippet_outer"><span class="code-snippet__keyword">import</span> ollama</span></code><code><span class="code-snippet_outer"><span class="code-snippet__keyword">from</span> ollama <span class="code-snippet__keyword">import</span> Client</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">ollama_client = Client(host=<span class="code-snippet__string">"http://localhost:11434"</span>)</span></code><code><span class="code-snippet_outer"><span class="code-snippet__function"><span class="code-snippet__keyword">def</span> <span class="code-snippet__title">emb_text</span><span class="code-snippet__params">(text)</span>:</span></span></code><code><span class="code-snippet_outer"> response = ollama_client.embeddings(model=<span class="code-snippet__string">"mxbai-embed-large"</span>, prompt=text)</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__keyword">return</span> response[<span class="code-snippet__string">"embedding"</span>]</span></code><code><span class="code-snippet_outer"><span class="code-snippet__comment">#test</span></span></code><code><span class="code-snippet_outer">test_embedding = emb_text(<span class="code-snippet__string">"This is a test"</span>)</span></code><code><span class="code-snippet_outer">embedding_dim = len(test_embedding)</span></code><code><span class="code-snippet_outer">print(embedding_dim)</span></code><code><span class="code-snippet_outer">print(test_embedding[:<span class="code-snippet__number">10</span>])</span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="json"><code><span class="code-snippet_outer"><span class="code-snippet__number">1024</span></span></code><code><span class="code-snippet_outer">[<span class="code-snippet__number">0.23217937350273132</span>, <span class="code-snippet__number">0.42540550231933594</span>, <span class="code-snippet__number">0.19742339849472046</span>, <span class="code-snippet__number">0.4618139863014221</span>, <span class="code-snippet__number">-0.46017369627952576</span>, <span class="code-snippet__number">-0.14087969064712524</span>, <span class="code-snippet__number">-0.18214142322540283</span>, <span class="code-snippet__number">-0.07724273949861526</span>, <span class="code-snippet__number">0.40015509724617004</span>, <span class="code-snippet__number">0.8331164121627808</span>]</span></code><code><span class="code-snippet_outer"><br></span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="color: rgb(2, 30, 170);"><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>将数据加载到Milvus</span></strong></span><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <h4 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>创建集合</span></strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></h4> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="makefile"><code><span class="code-snippet_outer">from pymilvus import MilvusClient</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">milvus_client = MilvusClient(uri=<span class="code-snippet__string">"./milvus_demo.db"</span>)</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">collection_name = <span class="code-snippet__string">"my_rag_collection"</span></span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>关于MilvusClient的参数设置:</span></p> <ul start="1" class="list-paddingleft-1" style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;> <li style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>将URI设置为本地文件(例如../milvus.db)是最便捷的方法,因为它会自动使用Milvus Lite将所有数据存储在该文件中。</span></p></li> <li style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>如果你有大规模数据,可以在Docker或Kubernetes上搭建性能更强的Milvus服务器。在这种情况下,请使用服务器的URI(例如http://localhost:19530)作为你的URI。</span></p></li> <li style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>如果你想使用Zilliz Cloud(Milvus的全托管云服务),请调整URI和令牌,它们分别对应Zilliz Cloud中的公共端点(Public Endpoint)和API密钥(Api key)。</span></p></li> </ul> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>检查集合是否已经存在,如果存在则将其删除。</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="css"><code><span class="code-snippet_outer"><span class="code-snippet__selector-tag">if</span> <span class="code-snippet__selector-tag">milvus_client</span><span class="code-snippet__selector-class">.has_collection</span>(<span class="code-snippet__selector-tag">collection_name</span>):</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__selector-tag">milvus_client</span><span class="code-snippet__selector-class">.drop_collection</span>(<span class="code-snippet__selector-tag">collection_name</span>)</span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>创建一个具有指定参数的新集合。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>如果未指定任何字段信息,Milvus将自动创建一个默认的ID字段作为主键,以及一个向量字段用于存储向量数据。一个预留的JSON字段用于存储未在模式中定义的字段及其值。</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="bash"><code><span class="code-snippet_outer">milvus_client.create_collection(</span></code><code><span class="code-snippet_outer"> collection_name=collection_name,</span></code><code><span class="code-snippet_outer"> dimension=embedding_dim,</span></code><code><span class="code-snippet_outer"> metric_type=<span class="code-snippet__string">"IP"</span>, <span class="code-snippet__comment"># Inner product distance</span></span></code><code><span class="code-snippet_outer"> consistency_level=<span class="code-snippet__string">"Strong"</span>, <span class="code-snippet__comment"># Strong consistency level</span></span></code><code><span class="code-snippet_outer">)</span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <h4 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>插入数据</span></strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></h4> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>逐行遍历文本,创建嵌入向量,然后将数据插入Milvus。</span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>下面是一个新的字段text,它是集合中的一个未定义的字段。它将自动创建一个对应的text字段(实际上它底层是由保留的JSON动态字段实现的) ,你不用关心其底层实现。</span></p> <pre><code data-lark-language="Python" data-wrap="false"></code></pre> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="kotlin"><code><span class="code-snippet_outer">from tqdm <span class="code-snippet__keyword">import</span> tqdm</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"><span class="code-snippet__keyword">data</span> = []</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"><span class="code-snippet__keyword">for</span> i, line <span class="code-snippet__keyword">in</span> enumerate(tqdm(text_lines, desc=<span class="code-snippet__string">"Creating embeddings"</span>)):</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__keyword">data</span>.append({<span class="code-snippet__string">"id"</span>: i, <span class="code-snippet__string">"vector"</span>: emb_text(line), <span class="code-snippet__string">"text"</span>: line})</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">milvus_client.insert(collection_name=collection_name, <span class="code-snippet__keyword">data</span>=<span class="code-snippet__keyword">data</span>)</span></code><code><span class="code-snippet_outer"><br></span></code></pre> </section> <pre><span data-lark-record-data="{" rootid:nw8qdrucpoqigrxlxipcijfwnq0,text:{initialattributedtexts:{text:{0:from tqdm import tqdm\n\ndata="[]\n\nfor" i, line in enumerate(tqdm(text_lines, desc="\"Creating" embeddings\)):\n data.append({\id\: \vector\: emb_text(line), \text\: line})\n\nmilvus_client.insert(collection_name="collection_name," data="data)"},"attribs":{"0":"*0|7+4u*0+1s"}},"apool":{"numToAttrib":{"0":["author","7404663974060785665"]},"nextNum":1}},"type":"text","referenceRecordMap":{},"extra":{"channel":"saas","isEqualBlockSelection":true,"pasteRandomId":"d632929c-f241-4d79-a76b-227e88c75975","mention_page_title":{},"external_mention_url":{}},"isKeepQuoteContainer":false,"isFromCode":true,"selection":[{"id":92,"type":"text","selection":{"start":0,"end":238},"recordId":"doxcnKKu1NCQaqtq88Ibc8pqTJb"}],"payloadMap":{},"isCut":false}"" data-lark-record-format="docx/text"></span></pre> <pre><code data-lark-language="Plaintext" data-wrap="false"></code></pre> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="ruby"><code><span class="code-snippet_outer">Creating <span class="code-snippet__symbol">embeddings:</span> <span class="code-snippet__number">100</span><span class="code-snippet__string">%|████████████████████████████████████████████████████████████████████████████████████████████████████████|</span> <span class="code-snippet__number">72</span>/<span class="code-snippet__number">72</span> [<span class="code-snippet__number">00</span><span class="code-snippet__symbol">:</span><span class="code-snippet__number">06</span><<span class="code-snippet__number">00</span><span class="code-snippet__symbol">:</span><span class="code-snippet__number">00</span>, <span class="code-snippet__number">11.86</span>it/s]</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">{<span class="code-snippet__string">'insert_count'</span>: <span class="code-snippet__number">72</span>, <span class="code-snippet__string">'ids'</span>: [<span class="code-snippet__number">0</span>, <span class="code-snippet__number">1</span>, <span class="code-snippet__number">2</span>, <span class="code-snippet__number">3</span>, <span class="code-snippet__number">4</span>, <span class="code-snippet__number">5</span>, <span class="code-snippet__number">6</span>, <span class="code-snippet__number">7</span>, <span class="code-snippet__number">8</span>, <span class="code-snippet__number">9</span>, <span class="code-snippet__number">10</span>, <span class="code-snippet__number">11</span>, <span class="code-snippet__number">12</span>, <span class="code-snippet__number">13</span>, <span class="code-snippet__number">14</span>, <span class="code-snippet__number">15</span>, <span class="code-snippet__number">16</span>, <span class="code-snippet__number">17</span>, <span class="code-snippet__number">18</span>, <span class="code-snippet__number">19</span>, <span class="code-snippet__number">20</span>, <span class="code-snippet__number">21</span>, <span class="code-snippet__number">22</span>, <span class="code-snippet__number">23</span>, <span class="code-snippet__number">24</span>, <span class="code-snippet__number">25</span>, <span class="code-snippet__number">26</span>, <span class="code-snippet__number">27</span>, <span class="code-snippet__number">28</span>, <span class="code-snippet__number">29</span>, <span class="code-snippet__number">30</span>, <span class="code-snippet__number">31</span>, <span class="code-snippet__number">32</span>, <span class="code-snippet__number">33</span>, <span class="code-snippet__number">34</span>, <span class="code-snippet__number">35</span>, <span class="code-snippet__number">36</span>, <span class="code-snippet__number">37</span>, <span class="code-snippet__number">38</span>, <span class="code-snippet__number">39</span>, <span class="code-snippet__number">40</span>, <span class="code-snippet__number">41</span>, <span class="code-snippet__number">42</span>, <span class="code-snippet__number">43</span>, <span class="code-snippet__number">44</span>, <span class="code-snippet__number">45</span>, <span class="code-snippet__number">46</span>, <span class="code-snippet__number">47</span>, <span class="code-snippet__number">48</span>, <span class="code-snippet__number">49</span>, <span class="code-snippet__number">50</span>, <span class="code-snippet__number">51</span>, <span class="code-snippet__number">52</span>, <span class="code-snippet__number">53</span>, <span class="code-snippet__number">54</span>, <span class="code-snippet__number">55</span>, <span class="code-snippet__number">56</span>, <span class="code-snippet__number">57</span>, <span class="code-snippet__number">58</span>, <span class="code-snippet__number">59</span>, <span class="code-snippet__number">60</span>, <span class="code-snippet__number">61</span>, <span class="code-snippet__number">62</span>, <span class="code-snippet__number">63</span>, <span class="code-snippet__number">64</span>, <span class="code-snippet__number">65</span>, <span class="code-snippet__number">66</span>, <span class="code-snippet__number">67</span>, <span class="code-snippet__number">68</span>, <span class="code-snippet__number">69</span>, <span class="code-snippet__number">70</span>, <span class="code-snippet__number">71</span>], <span class="code-snippet__string">'cost'</span>: <span class="code-snippet__number">0</span>}</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"><br></span></code></pre> </section> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="font-size: 24px;"><strong style="color: rgb(2, 30, 170);font-size: 18px;letter-spacing: 0em;word-spacing: 0em;"><span style="font-size: 24px;-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>03</span></strong></span></p> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><strong style="color: rgb(2, 30, 170);font-size: 18px;letter-spacing: 0em;word-spacing: 0em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>构建 RAG</span></strong></p> <h3 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="color: rgb(2, 30, 170);"><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>检索数据</span></strong></span><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></strong></h3> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>我们来指定一个关于Milvus的常见问题。</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="ini"><code><span class="code-snippet_outer"><span class="code-snippet__attr">question</span> = <span class="code-snippet__string">"How is data stored in milvus?"</span></span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>在集合中搜索该问题,并检索语义上最匹配的前3个结果。</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="makefile"><code><span class="code-snippet_outer">search_res = milvus_client.search(</span></code><code><span class="code-snippet_outer"> collection_name=collection_name,</span></code><code><span class="code-snippet_outer"> data=[</span></code><code><span class="code-snippet_outer"> emb_text(question)</span></code><code><span class="code-snippet_outer"> ], <span class="code-snippet__comment"># Use the `emb_text` function to convert the question to an embedding vector</span></span></code><code><span class="code-snippet_outer"> limit=3, <span class="code-snippet__comment"># Return top 3 results</span></span></code><code><span class="code-snippet_outer"> search_params={<span class="code-snippet__string">"metric_type"</span>: <span class="code-snippet__string">"IP"</span>, <span class="code-snippet__string">"params"</span>: {}}, <span class="code-snippet__comment"># Inner product distance</span></span></code><code><span class="code-snippet_outer"> output_fields=[<span class="code-snippet__string">"text"</span>], <span class="code-snippet__comment"># Return the text field</span></span></code><code><span class="code-snippet_outer">)</span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>我们来看看这个查询的搜索结果。</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="swift"><code><span class="code-snippet_outer"><span class="code-snippet__keyword">import</span> json</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">retrieved_lines_with_distances = [</span></code><code><span class="code-snippet_outer"> (res[<span class="code-snippet__string">"entity"</span>][<span class="code-snippet__string">"text"</span>], res[<span class="code-snippet__string">"distance"</span>]) <span class="code-snippet__keyword">for</span> res <span class="code-snippet__keyword">in</span> search_res[<span class="code-snippet__number">0</span>]</span></code><code><span class="code-snippet_outer">]</span></code><code><span class="code-snippet_outer"><span class="code-snippet__built_in">print</span>(json.dumps(retrieved_lines_with_distances, indent=<span class="code-snippet__number">4</span>))</span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="sql"><code><span class="code-snippet_outer">[</span></code><code><span class="code-snippet_outer"> [</span></code><code><span class="code-snippet_outer"> " Where does Milvus store data?\n\nMilvus deals <span class="code-snippet__keyword">with</span> two types <span class="code-snippet__keyword">of</span> <span class="code-snippet__keyword">data</span>, inserted <span class="code-snippet__keyword">data</span> <span class="code-snippet__keyword">and</span> metadata. \n\nInserted <span class="code-snippet__keyword">data</span>, <span class="code-snippet__keyword">including</span> vector <span class="code-snippet__keyword">data</span>, scalar <span class="code-snippet__keyword">data</span>, <span class="code-snippet__keyword">and</span> collection-specific <span class="code-snippet__keyword">schema</span>, <span class="code-snippet__keyword">are</span> <span class="code-snippet__keyword">stored</span> <span class="code-snippet__keyword">in</span> persistent <span class="code-snippet__keyword">storage</span> <span class="code-snippet__keyword">as</span> incremental log. Milvus supports multiple <span class="code-snippet__keyword">object</span> <span class="code-snippet__keyword">storage</span> backends, <span class="code-snippet__keyword">including</span> [MinIO](https://min.io/), [AWS S3](https://aws.amazon.com/s3/?nc1=h_ls), [Google Cloud <span class="code-snippet__keyword">Storage</span>](https://cloud.google.com/<span class="code-snippet__keyword">storage</span>?hl=en<span class="code-snippet__comment">#object-storage-for-companies-of-all-sizes) (GCS), [Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs), [Alibaba Cloud OSS](https://www.alibabacloud.com/product/object-storage-service), and [Tencent Cloud Object Storage](https://www.tencentcloud.com/products/cos) (COS).\n\nMetadata are generated within Milvus. Each Milvus module has its own metadata that are stored in etcd.\n\n###",</span></span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">231.9922637939453</span></span></code><code><span class="code-snippet_outer"> ],</span></code><code><span class="code-snippet_outer"> [</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__string">"How does Milvus flush data?\n\nMilvus returns success when inserted data are loaded to the message queue. However, the data are not yet flushed to the disk. Then Milvus' data node writes the data in the message queue to persistent storage as incremental logs. If `flush()` is called, the data node is forced to write all data in the message queue to persistent storage immediately.\n\n###"</span>,</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">226.54090881347656</span></span></code><code><span class="code-snippet_outer"> ],</span></code><code><span class="code-snippet_outer"> [</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__string">"What is the maximum dataset size Milvus can handle?\n\n \nTheoretically, the maximum dataset size Milvus can handle is determined by the hardware it is run on, specifically system memory and storage:\n\n- Milvus loads all specified collections and partitions into memory before running queries. Therefore, memory size determines the maximum amount of data Milvus can query.\n- When new entities and and collection-related schema (currently only MinIO is supported for data persistence) are added to Milvus, system storage determines the maximum allowable size of inserted data.\n\n###"</span>,</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">210.63682556152344</span></span></code><code><span class="code-snippet_outer"> ]</span></code><code><span class="code-snippet_outer">]</span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <h3 style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="color: rgb(2, 30, 170);"><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>使用大型语言模型(LLM)构建检索增强生成(RAG)响应</span></strong></span><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></h3> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>将检索到的文档转换为字符串格式。</span></p> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="cs"><code><span class="code-snippet_outer">context = <span class="code-snippet__string">"\n"</span>.<span class="code-snippet__keyword">join</span>(</span></code><code><span class="code-snippet_outer"> [<span class="code-snippet__meta">line_with_distance[0</span>] <span class="code-snippet__keyword">for</span> line_with_distance <span class="code-snippet__keyword">in</span> retrieved_lines_with_distances]</span></code><code><span class="code-snippet_outer">)</span></code></pre> </section> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>为大语言模型提供系统提示(system prompt)和用户提示(user prompt)。这个提示是通过从Milvus检索到的文档生成的。</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="ini"><code><span class="code-snippet_outer"><span class="code-snippet__attr">SYSTEM_PROMPT</span> = <span class="code-snippet__string">"""Human: You are an AI assistant. You are able to find answers to the questions from the contextual passage snippets provided."""</span></span></code><code><span class="code-snippet_outer"><span class="code-snippet__attr">USER_PROMPT</span> = </span></code><code><span class="code-snippet_outer">f"""</span></code><code><span class="code-snippet_outer">Use the following pieces of information enclosed in <context> tags to provide an answer to the question enclosed in <question> tags. </question> </context></span></code><code><span class="code-snippet_outer"> <context></context></span></code><code><span class="code-snippet_outer">{context}</span></code><code><span class="code-snippet_outer"></span></code><code><span class="code-snippet_outer"> <question></question></span></code><code><span class="code-snippet_outer">{question}</span></code><code><span class="code-snippet_outer"></span></code><code><span class="code-snippet_outer">"""</span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>使用Ollama提供的QwQ(32B)模型,根据提示生成响应。</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="python"><code><span class="code-snippet_outer"><span class="code-snippet__keyword">from</span> ollama <span class="code-snippet__keyword">import</span> chat</span></code><code><span class="code-snippet_outer"><span class="code-snippet__keyword">from</span> ollama <span class="code-snippet__keyword">import</span> ChatResponse</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">response: ChatResponse = ollama_client.chat(</span></code><code><span class="code-snippet_outer"> model=<span class="code-snippet__string">"qwq"</span>,</span></code><code><span class="code-snippet_outer"> messages=[</span></code><code><span class="code-snippet_outer"> {<span class="code-snippet__string">"role"</span>: <span class="code-snippet__string">"system"</span>, <span class="code-snippet__string">"content"</span>: SYSTEM_PROMPT},</span></code><code><span class="code-snippet_outer"> {<span class="code-snippet__string">"role"</span>: <span class="code-snippet__string">"user"</span>, <span class="code-snippet__string">"content"</span>: USER_PROMPT},</span></code><code><span class="code-snippet_outer"> ],</span></code><code><span class="code-snippet_outer">)</span></code><code><span class="code-snippet_outer">print(response[<span class="code-snippet__string">"message"</span>][<span class="code-snippet__string">"content"</span>])</span></code></pre> </section> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <pre style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;></span></pre> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="powershell"><code><span class="code-snippet_outer"> <think></think></span></code><code><span class="code-snippet_outer">Okay, I need to answer the question <span class="code-snippet__string">"How is data stored in Milvus?"</span> using the provided context. Let me start by reading through the context carefully.</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">First, looking at the first context section titled <span class="code-snippet__string">"Where does Milvus store data?"</span>. It mentions that Milvus handles two types of <span class="code-snippet__keyword">data</span>: inserted <span class="code-snippet__keyword">data</span> and metadata. </span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">Inserted <span class="code-snippet__keyword">data</span> includes vectors, scalar <span class="code-snippet__keyword">data</span>, and collection schema, stored as incremental logs <span class="code-snippet__keyword">in</span> persistent storage. The supported backends are listed like MinIO, S3, GCS, etc. So I should note that inserted <span class="code-snippet__keyword">data</span> goes to these object storages via incremental logs.</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">Then metadata is stored <span class="code-snippet__keyword">in</span> etcd <span class="code-snippet__keyword">for</span> each Milvus module. That<span class="code-snippet__string">'s straightforward—metadata in etcd.</span></span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"><span class="code-snippet_outer">The second context about flushing data explains that data first goes to the message queue and then to persistent storage when flushed. But this might be more about the process rather than where it'</span>s stored, so maybe mention that insertion is into the message queue first before being written out.</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">Third section on maximum dataset size mentions hardware constraints: memory <span class="code-snippet__keyword">for</span> queryable <span class="code-snippet__keyword">data</span> and storage <span class="code-snippet__keyword">for</span> persistence. This could relate to how <span class="code-snippet__keyword">data</span> is managed <span class="code-snippet__keyword">in</span> terms of memory vs disk. The user asked <span class="code-snippet__string">"how is data stored,"</span> which might include both where (like object stores, etcd) and the <span class="code-snippet__keyword">process</span> (message queue then persistent logs).</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">Putting it all together, the answer should mention:</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">- Two types: inserted <span class="code-snippet__keyword">data</span> and metadata.</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"><span class="code-snippet__keyword">For</span> inserted <span class="code-snippet__keyword">data</span>:</span></code><code><span class="code-snippet_outer">- Stored as incremental logs <span class="code-snippet__keyword">in</span> persistent storage using backends like MinIO, S3 etc.</span></code><code><span class="code-snippet_outer">- Initially loaded into message queues, then written to disk. The flush() forces immediate writing <span class="code-snippet__keyword">if</span> needed.</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">Metadata:</span></code><code><span class="code-snippet_outer">- Stored <span class="code-snippet__keyword">in</span> etcd <span class="code-snippet__keyword">for</span> each module.</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">Also, the hardware part says that memory limits queryable <span class="code-snippet__keyword">data</span> size and storage (like the object stores) limit total dataset size. So maybe mention these factors as part of how <span class="code-snippet__keyword">data</span> is stored, considering capacity constraints.</span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">I should structure this clearly, perhaps bullet points or sections on inserted vs metadata, then processes like flushing, and <span class="code-snippet__keyword">finally</span> limitations based on hardware.</span></code><code><span class="code-snippet_outer"></span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"><span class="code-snippet__keyword">Data</span> <span class="code-snippet__keyword">in</span> Milvus is stored <span class="code-snippet__keyword">in</span> two main ways: </span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"><span class="code-snippet__number">1</span>. **Inserted <span class="code-snippet__keyword">Data</span>**: </span></code><code><span class="code-snippet_outer"> - Includes vector <span class="code-snippet__keyword">data</span>, scalar <span class="code-snippet__keyword">data</span>, and collection schema. </span></code><code><span class="code-snippet_outer"> - Stored as **incremental logs** <span class="code-snippet__keyword">in</span> **persistent storage**, supported by object storage backends such as MinIO, AWS S3, Google Cloud Storage (GCS), Azure Blob Storage, Alibaba Cloud OSS, and Tencent Cloud Object Storage (COS). </span></code><code><span class="code-snippet_outer"> - Initially loaded into a **message queue** when inserted. Milvus returns success upon insertion into the queue but does not immediately write to disk. A background <span class="code-snippet__keyword">process</span> later writes this <span class="code-snippet__keyword">data</span> to persistent storage. The `flush()` method can force immediate writing of all queued <span class="code-snippet__keyword">data</span> to storage. </span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer"><span class="code-snippet__number">2</span>. **Metadata**: </span></code><code><span class="code-snippet_outer"> - Generated internally by Milvus modules (e.g., collection configurations, partitions). </span></code><code><span class="code-snippet_outer"> - Stored <span class="code-snippet__keyword">in</span> **etcd**, a distributed key-value store. </span></code><code><span class="code-snippet_outer"><br></span></code><code><span class="code-snippet_outer">**Hardware Considerations**: </span></code><code><span class="code-snippet_outer">- **Memory**: The amount of <span class="code-snippet__keyword">data</span> Milvus can query is limited by system memory since it loads specified collections/partitions into memory <span class="code-snippet__keyword">for</span> queries. </span></code><code><span class="code-snippet_outer">- **Storage Capacity**: The maximum dataset size is constrained by the underlying storage backend (e.g., object storage), which stores all inserted <span class="code-snippet__keyword">data</span> and schema incrementally.</span></code><code><span class="code-snippet_outer"><br></span></code></pre> </section> <p style="-webkit-tap-highlight-color: transparent;margin-top: 16px;padding-right: 10px;padding-left: 10px;outline: 0px;word-spacing: 0em;font-size: 16px;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);width: auto;font-family: Optima, " microsoft yahei, pingfangsc-regular, serif;color: rgb(0, 0, 0);letter-spacing: 0em;word-break: break-word;text-align: left;visibility: visible;line-height: 1.5em;><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgba(0, 0, 0, 0.9);font-family: mp-quote, " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 0.034em;text-align: justify;word-spacing: 0em;visibility: visible;>以上就是一个基于Milvus和Ollama构建检索增强生成(RAG)的全流程。</span></p>
作者:微信小助手
<p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 0px;color: rgb(10, 10, 10);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 0px;line-height: 0;><span leaf=""> </span></p> <section style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));color: rgb(10, 10, 10);font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 0px 8px 1.5em;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">随着大语言模型(LLM)的广泛应用,检索增强生成(RAG)技术作为一种结合检索技术和LLM提示的创新架构,因其在结合外部知识库和生成模型方面的卓越表现而备受关注。RAG系统通过将LLM与结构化或非结构化的外部数据源相结合,显著提升了生成内容的准确性、相关性和可信度。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">RAG在聊天机器人、知识密集型任务和企业应用中表现出色。然而从理论到工程实践,开发和优化一个高效的RAG系统并非易事,RAG系统面临着诸多挑战。尽可能的系统性地分析RAG系统的开发难点与优化路径。</span></p> <h2 style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-size: 18.2px;font-weight: bold;margin: 4em auto 2em;text-align: center;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;display: table;padding: 0.3em 1em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);border-radius: 8px;box-shadow: rgba(0, 0, 0.1) 0px 4px 6px;><span leaf="">RAG系统的12个问题</span></h2> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">首先看下澳大利亚吉朗应用人工智能研究所 Scott Barnett等人撰写的论文 </span><span style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;color: rgb(87, 107, 149);><span leaf="">《Seven Failure Points When Engineering a Retrieval Augmented Generation System》</span></span><span leaf="">, 探讨了RAG系统在工程实践中的问题,论文中总结了7个常见的问题:</span></p> <section style="text-align: center;" nodeleaf=""> <img src="/upload/3058606c141b6fdf7df76a91af66a66f.jpg" class="rich_pages wxw-img" data-ratio="0.3640625" data-s="300,640" data-type="jpeg" data-w="1280" type="block" data-imgfileid="100001183"> </section> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">1. 缺失内容(Missing Content)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">当用户的问题无法从文档库中检索到时,可能会导致大模型的幻觉现象。理想情况下,RAG 系统可以简单地回复一句 “抱歉,我不知道”,然而,如果用户问题能检索到文档,但是文档内容和用户问题无关时,大模型还是可能会被误导。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">2. 错过超出排名范围的文档(Missed Top Ranked)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">由于大模型的上下文长度限制,我们从文档库中检索时,一般只返回排名靠前的K个段落,如果问题答案所在的段落超出了排名范围,就会出现问题。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">3. 不在上下文中(Not In Context)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">包含答案的文档已经成功检索出来,但却没有包含在大模型所使用的上下文中。当从数据库中检索到多个文档,并且使用合并过程提取答案时,就会出现这种情况。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">4. 未提取(Not Extracted)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">答案在提供的上下文中,但是大模型未能准确地提取出来,这通常发生在上下文中存在过多的噪音或冲突信息时。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">5. 错误的格式(Wrong Format)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">问题要求以特定格式提取信息,例如表格或列表,然而大模型忽略了这个指示。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">6. 不正确的具体性(Incorrect Specificity)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">尽管大模型正常回答了用户的提问,但不够具体或者过于具体,都不能满足用户的需求。不正确的具体性也可能发生在用户不确定如何提问,或提问过于笼统时。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">7. 不完整的回答(Incomplete Answers)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">考虑一个问题,“文件 A、B、C 包含哪些关键点?”,直接使用这个问题检索得到的可能只是每个文件的部分信息,导致大模型的回答不完整。一个更有效的方法是分别针对每个文件提出这些问题,以确保全面覆盖。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">Wenqi Glantz撰文</span><span style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;color: rgb(87, 107, 149);><span leaf="">《12 RAG Pain Points and Proposed Solutions》</span></span></strong><span leaf="">,又提了另外5个问题:</span></p> <section style="text-align: center;" nodeleaf=""> <img src="/upload/b37b8e8c3bb6c3a148faf050ef796ebe.png" class="rich_pages wxw-img" data-ratio="0.57861328125" data-s="300,640" data-type="png" data-w="2048" type="block" data-imgfileid="100001185"> </section> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">8. 数据摄取的可扩展性问题(Data Ingestion Scalability)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">RAG管道中的数据摄取可扩展性问题是指当系统难以有效管理和处理大量数据时出现的挑战,从而导致性能瓶颈和潜在的系统故障。此类数据摄取可扩展性问题可能会导致摄取时间延长、系统过载、数据质量问题和可用性受限等问题。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">9. 结构化数据的问答(Structured Data QA)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">根据用户的问题准确检索出所需的结构化数据可能很困难,尤其是当用户的问题比较复杂或比较模糊时,由于文本到 SQL 的转换不够灵活及当前大模型在有效处理这类任务方面仍然存在一定的局限性。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">10. 从复杂PDF文档提取数据(Data Extraction from Complex PDFs)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">复杂的PDF文档中可能包含有表格、图片等嵌入内容,在对这种文档进行问答时,传统的检索方法往往无法达到很好的效果。我们需要一个更高效的方法来处理这种复杂的PDF数据提取需求。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">11. 备用模型(Fallback Model(s))</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">在使用单一大模型时,我们可能会担心模型遇到问题,比如遇到 OpenAI 模型的访问频率限制错误。这时候,我们需要一个或多个模型作为备用,以防主模型出现故障。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">12. 大语言模型的安全性(LLM Security)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">如何有效地防止恶意输入、确保输出安全、保护敏感信息不被泄露等问题,都是每个AI架构师和工程师需要面对的重要挑战。</span></p> <h2 style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-size: 18.2px;font-weight: bold;margin: 4em auto 2em;text-align: center;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;display: table;padding: 0.3em 1em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);border-radius: 8px;box-shadow: rgba(0, 0, 0.1) 0px 4px 6px;><span leaf="">RAG系统的12个优化策略</span></h2> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">从RAG的工作流程来看,其中的各个环节均有着极大的优化空间。我们将从工作流程5个环节中,结合上述12个问题详细了解具体优化策略。</span></p> <section style="text-align: center;" nodeleaf=""> <img src="/upload/69766e4039bc496b14e4c199a668b351.png" class="rich_pages wxw-img" data-ratio="0.7997382198952879" data-s="300,640" data-type="png" data-w="764" type="block" data-imgfileid="100001184"> </section> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">1. 数据清洗(Clean your data)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">高性能RAG系统依赖于准确且清洁的原始知识数据。</span><span leaf=""><br></span><span leaf="">一方面为了保证数据的准确性,需要优化文档读取器和多模态模型。特别是处理如CSV表格等文件时,单纯的文本转换可能会丢失表格原有的结构。因此,我们需引入额外的机制以在文本中恢复表格结构,比如使用分号或其他符号来区分数据。</span><span leaf=""><br></span><span leaf="">另一方面也需要对知识文档做一些基本数据清洗,其中可以包括:</span></p> <ul style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));list-style: none;margin: 0px;padding: 0px 0px 0px 1.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;color: rgb(63, 63, 63); class="list-paddingleft-1"> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">1.1 文本清理</span></strong><span leaf=""><br></span><span leaf="">规范文本格式,去除特殊字符、干扰和不相关信息;删除可能使检索过程产生偏差的重复文档或冗余信息;识别并更正拼写错误和语法错误,拼写检查器和语言模型等工具可以帮助解决这个问题。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">1.2 实体解析</span></strong><span leaf=""><br></span><span leaf="">消除实体和术语的歧义以实现一致的引用。例如,将“LLM”、“大语言模型”和“大模型”标准化为通用术语。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">1.3 文档划分</span></strong><span leaf=""><br></span><span leaf="">合理地划分不同主题的文档,不同主题是集中在一处还是分散在多处?如果作为人类都不能轻松地判断出需要查阅哪个文档才能来回答常见的提问,那么检索系统也无法做到。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">1.4 数据增强</span></strong><span leaf=""><br></span><span leaf="">使用同义词、释义甚至其他语言的翻译来增加语料库的多样性。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">1.5 用户反馈循环</span></strong><span leaf=""><br></span><span leaf="">基于现实世界用户的反馈不断更新数据库,标记它们的真实性。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">1.6 时间敏感数据</span></strong><span leaf=""><br></span><span leaf="">对于经常更新的主题,实施一种机制来使过时的文档失效或更新。</span> </section></li> </ul> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">2. 分块处理</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">在RAG系统中,文档需要分割成多个文本块再进行向量嵌入。在不考虑大模型输入长度限制和成本问题情况下,其目的是在保持语义上的连贯性的同时,尽可能减少嵌入内容中的噪声,从而更有效地找到与用户查询最相关的文档部分。</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">如果分块太大,可能包含太多不相关的信息,从而降低了检索的准确性。相反,分块太小可能会丢失必要的上下文信息,导致生成的回应缺乏连贯性或深度</span></code><span leaf="">。</span><span leaf=""><br></span><span leaf="">在RAG系统中实施合适的文档分块策略,</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">旨在找到这种平衡,确保信息的完整性和相关性</span></code><span leaf="">。一般来说,理想的文本块应当在没有周围上下文的情况下对人类来说仍然有意义,这样对语言模型来说也是有意义的。</span></p> <ul style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));list-style: none;margin: 0px;padding: 0px 0px 0px 1.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;color: rgb(63, 63, 63); class="list-paddingleft-1"> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">2.1 分块方法的选择</span></strong><span leaf=""><br></span><span leaf="">固定大小的分块:这是最简单和直接的方法,我们直接设定块中的字数,并选择块之间是否重复内容。通常,会保持块之间的一些重叠,以确保语义上下文不会在块之间丢失。与其他形式的分块相比,固定大小分块简单易用且不需要很多计算资源。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">2.2 内容分块</span></strong><span leaf=""><br></span><span leaf="">顾名思义,根据文档的具体内容进行分块,例如根据标点符号(如句号)分割。或者直接使用更高级的NLTK或者spaCy库提供的句子分割功能。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">2.3 递归分块</span></strong><span leaf=""><br></span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">在大多数情况下推荐的方法</span></code><span leaf="">。其</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">通过重复地应用分块规则来递归地分解文本</span></code><span leaf="">。例如,在langchain中会先通过段落换行符(</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">\n\n</span></code><span leaf="">)进行分割。然后,检查这些块的大小。如果大小不超过一定阈值,则该块被保留。对于大小超过标准的块,使用单换行符(</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">\n</span></code><span leaf="">)再次分割。以此类推,不断根据块大小更新更小的分块规则(如空格,句号)。</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">这种方法可以灵活地调整块的大小</span></code><span leaf="">。例如,对于文本中的密集信息部分,可能需要更细的分割来捕捉细节;而对于信息较少的部分,则可以使用更大的块。而</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">它的挑战在于,需要制定精细的规则来决定何时和如何分割文本</span></code><span leaf="">。</span><span leaf=""><br></span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span style="color: rgb(10, 10, 10);font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: -14px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;><span leaf="">• </span></span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: left;text-indent: -14px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;><span leaf="">2.4 从小到大分块</span></strong><span leaf=""><br></span><span style="color: rgb(10, 10, 10);font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: -14px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;><span leaf="">既然小的分块和大的分块各有各的优势,一种更为直接的解决方案是把同一文档进行从大到小所有尺寸的分割,然后把不同大小的分块全部存进向量数据库,并保存每个分块的上下级关系,进行递归搜索。但可想而知,因为我们要存储大量重复的内容,这种方案的缺点就是需要更大的储存空间。</span></span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">2.5 特殊结构分块</span></strong><span leaf=""><br></span><span leaf="">针对特定结构化内容的专门分割器。这些分割器特别设计来处理这些类型的文档,以确保正确地保留和理解其结构。langchain提供的特殊分割器包括:Markdown文件,Latex文件,以及各种主流代码语言分割器。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">2.6 分块大小的选择</span></strong><span leaf=""><br></span><span leaf="">上述方法中无一例外最终都需要设定一个参数——块的大小,那么我们如何选择呢?</span><span leaf=""><br></span><span leaf="">首先不同的嵌入模型有其最佳输入大小。比如Openai的text-embedding-ada-002的模型在256 或 512大小的块上效果更好。</span><span leaf=""><br></span><span leaf="">其次,文档的类型和用户查询的长度及复杂性也是决定分块大小的重要因素。</span><span leaf=""><br></span><span leaf="">处理长篇文章或书籍时,较大的分块有助于保留更多的上下文和主题连贯性;而对于社交媒体帖子,较小的分块可能更适合捕捉每个帖子的精确语义。如果用户的查询通常是简短和具体的,较小的分块可能更为合适;相反,如果查询较为复杂,可能需要更大的分块。</span><span leaf=""><br></span><span leaf="">实际场景中,我们可能还是需要不断实验调整,在一些测试中,</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">128大小的分块往往是最佳选择,在无从下手时,可以从这个大小作为起点进行测试</span></code><span leaf="">。</span> </section></li> </ul> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">3. 嵌入模型</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">过嵌入模型能够将文本转换成向量,显然不同的嵌入模型带来的效果也不尽相同,例如Word2Vec模型,尽管功能强大,但存在一个重要的局限性:其生成的词向量是静态的。一旦模型训练完成,每个词的向量表示就固定不变,这在处理一词多义的情况时可能导致问题。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">比如, </span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">“我买了一张光盘”,这里“光盘”指的是具体的圆形盘片,而在“光盘行动”中,“光盘”则指的是把餐盘里的食物吃光,是一种倡导节约的行为。语义完全不一样的词向量却是固定的</span></code><span leaf="">。 相比之下,引入自注意力机制的模型,如BERT,能够提供动态的词义理解。这意味着它可以根据上下文动态地调整词义,使得同一个词在不同语境下有不同的向量表示。“光盘”这个词在两个句子中会有不同的向量,从而更准确地捕捉其语义。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">有些项目为了让模型对特定垂直领域的词汇有更好的理解,会嵌入模型进行微调。但在这里我们并不推荐这种方法:</span><span leaf=""><br></span><span leaf="">一方面其对训练数据的质量有较高要求,</span><span leaf=""><br></span><span leaf="">另一方面也需要较多的人力物力投入,且效果未必理想,最终得不偿失。</span><span leaf=""><br></span><span leaf="">在这种情况下,对于具体应该如何选择嵌入模型,我们推荐参考Hugging Face推出的嵌入模型排行榜MTEB。这个排行榜提供了多种模型的性能比较,能帮助我们做出更明智的选择。同时,要注意并非所有嵌入模型都支持中文,因此在选择时应查阅模型说明。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">4. 元数据</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">当在向量数据库中存储向量数据时,某些数据库支持将向量与元数据(即非向量化的数据)一同存储。</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">为向量添加元数据标注是一种提高检索效率的有效策略,它在处理搜索结果时发挥着重要作用</span></code><span leaf="">。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">例如,日期就是一种常见的元数据标签。它能够帮助我们根据时间顺序进行筛选。设想一下,如果我们正在开发一款允许用户查询他们电子邮件历史记录的应用程序。在这种情况下,日期最近的电子邮件可能与用户的查询更相关。然而,从嵌入的角度来看,我们无法直接判断这些邮件与用户查询的相似度。通过将每封电子邮件的日期作为元数据附加到其嵌入中,我们可以在检索过程中优先考虑最近日期的邮件,从而提高搜索结果的相关性。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">此外,我们还可以添加诸如章节或小节的引用,文本的关键信息、小节标题或关键词等作为元数据。这些元数据不仅有助于改进知识检索的准确性,还能为最终用户提供更加丰富和精确的搜索体验。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">5. 多级索引</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">元数据无法充分区分不同上下文类型的情况下,我们可以考虑进一步尝试多重索引技术。</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">多重索引技术的核心思想是将庞大的数据和信息需求按类别划分,并在不同层级中组织,以实现更有效的管理和检索</span></code><span leaf="">。</span><span leaf=""><br></span><span leaf="">这意味着系统不仅依赖于单一索引,而是建立了多个针对不同数据类型和查询需求的索引。例如,可能有一个索引专门处理摘要类问题,另一个专门应对直接寻求具体答案的问题,还有一个专门针对需要考虑时间因素的问题。这种多重索引策略使RAG系统能够根据查询的性质和上下文,选择最合适的索引进行数据检索,从而提升检索质量和响应速度。但为了引入多重索引技术,我们还需配套加入多级路由机制。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">多级路由机制确保每个查询被高效引导至最合适的索引</span></code><span leaf="">。查询根据其特点(如复杂性、所需信息类型等)被路由至一个或多个特定索引。这不仅提升了处理效率,还优化了资源分配和使用,确保了对各类查询的精确匹配。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">例如,对于查询“最新上映的科幻电影推荐”,RAG系统可能首先将其路由至专门处理当前热点话题的索引,然后利用专注于娱乐和影视内容的索引来生成相关推荐。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">总的来说,多级索引和路由技术可以进一步帮助我们对大规模数据进行高效处理和精准信息提取,从而提升用户体验和系统的整体性能。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">6.索引/查询算法</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">可以利用索引筛选数据,但说到底还是要从筛选后的数据中检索出相关的文本向量。由于向量数据量庞大且复杂,寻找绝对的最优解变得计算成本极高,有时甚至是不可行的。加之,</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">大模型本质上并不是完全确定性的系统,这些模型在搜索时追求的是语义上的相似性——一种合理的匹配即可。从应用的角度来看,这种方法是合理的</span></code><span leaf="">。</span><span leaf=""><br></span><span leaf="">例如,在推荐系统中,用户不太可能察觉到或关心是否每个推荐的项目都是绝对的最佳匹配;他们更关心的是推荐是否总体上与他们的兴趣相符。因此查找与查询向量完全相同的项通常不是目标,而是要找到“足够接近”或“相似”的项,这便是最近邻搜索(Approximate Nearest Neighbor Search,ANNS)。这样做不仅能满足需求,还为检索优化提供了巨大的优化潜力。</span><span leaf=""><br></span><span leaf="">但是在”法律“、”医疗“、”金融“等垂直领域,大模型的这种不确定性,会带来致命的结果,因此LLM+RAG结合互补,以期望解决LLM在某些场景的短板。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">7. 查询转换</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">在RAG系统中,用户的查询问题被转化为向量,然后在向量数据库中进行匹配。不难想象,查询的措辞会直接影响搜索结果。如果搜索结果不理想,可以尝试以下几种方法对问题进行重写,以提升召回效果:</span></p> <ul style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));list-style: none;margin: 0px;padding: 0px 0px 0px 1.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;color: rgb(63, 63, 63); class="list-paddingleft-1"> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">7.1 结合历史对话的重新表述</span></strong><span leaf=""><br></span><span leaf="">在向量空间中,对人类来说看似相同的两个问题其向量大小并不一定很相似。我们可以直接利用LLM 重新表述问题来进行尝试。此外,在进行多轮对话时,用户的提问中的某个词可能会指代上文中的部分信息,因此可以将历史信息和用户提问一并交给LLM重新表述。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">7.2 假设文档嵌入(HyDE)</span></strong><span leaf=""><br></span><span leaf="">HyDE的核心思想是接收用户提问后,先让LLM在没有外部知识的情况下生成一个假设性的回复。然后,将这个假设性回复和原始查询一起用于向量检索。假设回复可能包含虚假信息,但蕴含着LLM认为相关的信息和文档模式,有助于在知识库中寻找类似的文档。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">7.3 退后提示(Step Back Prompting)</span></strong><span leaf=""><br></span><span leaf="">如果果原始查询太复杂或返回的信息太广泛,我们可以选择生成一个抽象层次更高的“退后”问题,与原始问题一起用于检索,以增加返回结果的数量。例如,原问题是“桌子君在特定时期去了哪所学校”,而退后问题可能是关于他的“教育历史”。这种更高层次的问题可能更容易找到答案。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">7.4 多查询检索/多路召回(Multi Query Retrieval)</span></strong><span leaf=""><br></span><span leaf="">使用LLM生成多个搜索查询,特别适用于一个问题可能需要依赖多个子问题的情况。</span> </section></li> </ul> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">通过这些方法,RAG系统能够更精准地处理和响应复杂的用户查询,从而提升整体的搜索效率和准确性。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">8. 检索参数</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">把查询问题准备好,可以进入向量数据库进行检索。在具体的检索过程中,可以根据向量数据库的特定设置来优化一些检索参数,以下是一些常见的可设定参数:</span></p> <ul style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));list-style: none;margin: 0px;padding: 0px 0px 0px 1.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;color: rgb(63, 63, 63); class="list-paddingleft-1"> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">8.1 稀疏和稠密搜索权重</span></strong><span leaf=""><br></span><span leaf="">稠密搜索即通过向量进行搜索。然而,在某些场景下可能存在限制,此时可以尝试使用原始字符串进行关键字匹配的稀疏搜索。一种有效的稀疏搜索算法是最佳匹配25(BM25),它基于统计输入短语中的单词频率,频繁出现的单词得分较低,而稀有的词被视为关键词,得分会较高。我们可以结合稀疏和稠密搜索得出最终结果。向量数据库通常允许设定两者对最终结果评分的权重比例,如0.6表示40%的得分来自稀疏搜索,60%来自稠密搜索。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">8.2 结果数量(topK)</span></strong><span leaf=""><br></span><span leaf="">检索结果的数量是另一个关键因素。足够的检索结果可以确保系统覆盖到用户查询的各个方面。在回答多方面或复杂问题时,更多的结果提供了丰富的语境,有助于RAG系统更好地理解问题的上下文和隐含细节。但需注意,结果数量过多可能导致信息过载,降低回答准确性并增加系统的时间和资源成</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">8.3 相似度度量方法</span></strong><span leaf=""><br></span><span leaf="">计算两个向量相似度的方法也是一个可选参数。这包括使用欧式距离和Jaccard距离计算两个向量的差异,以及利用余弦相似度衡量夹角的相似性。通常,余弦相似度更受青睐,因为它不受向量长度的影响,只反映方向上的相似度。这使得模型能够忽略文本长度差异,专注于内容的语义相似性。需要注意的是,并非所有嵌入模型都支持所有度量方法,具体可参考所用嵌入模型的说明。</span> </section></li> </ul> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">9. 高级检索策略</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">最为关键和复杂的步骤是在向量数据库检索之上如何具体开发或改进整个系统的策略。这部分的内容足够写成一篇独立文章。为了保持简洁,我们只讨论一些常用或者新提出的策略。</span></p> <ul style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));list-style: none;margin: 0px;padding: 0px 0px 0px 1.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;color: rgb(63, 63, 63); class="list-paddingleft-1"> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">9.1 上下文压缩</span></strong><span leaf=""><br></span><span leaf="">我们提到过当文档文块过大时,可能包含太多不相关的信息,传递这样的整个文档可能导致更昂贵的LLM调用和更差的响应。上下文压缩的思想就是通过LLM的帮助根据上下文对单个文档内容进行压缩,或者对返回结果进行一定程度的过滤仅返回相关信息。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">9.2 句子窗口搜索</span></strong><span leaf=""><br></span><span leaf="">相反,文档文块太小会导致上下文的缺失。其中一种解决方案就是窗口搜索,该方法的核心思想是当提问匹配好分块后,将该分块周围的块作为上下文一并交给LLM进行输出,来增加LLM对文档上下文的理解。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">9.3 父文档搜索</span></strong><span leaf=""><br></span><span leaf="">无独有偶,父文档搜索也是一种很相似的解决方案,父文档搜索先将文档分为尺寸更大的主文档,再把主文档分割为更短的子文档两个层级,用户问题会与子文档匹配,然后将该子文档所属的主文档和用户提问发送给LLM。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">9.4 自动合并</span></strong><span leaf=""><br></span><span leaf="">自动合并是在父文档搜索上更进一步的复杂解决方案。同样地,我们先对文档进行结构切割,比如将文档按三层树状结构进行切割,顶层节点的块大小为1024,中间层的块大小为512,底层的叶子节点的块大小为128。而在检索时只拿叶子节点和问题进行匹配,当某个父节点下的多数叶子节点都与问题匹配上则将该父节点作为结果返回。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">9.5 多向量检索</span></strong><span leaf=""><br></span><span leaf="">多向量检索同样会给一个知识文档转化成多个向量存入数据库,不同的是,这些向量不仅包括文档在不同大小下的分块,还可以包括该文档的摘要,用户可能提出的问题等等有助于检索的信息。在使用多向量查询的情况下,每个向量可能代表了文档的不同方面,使得系统能够更全面地考虑文档内容,并在回答复杂或多方面的查询时提供更精确的结果。例如,如果查询与文档的某个具体部分或摘要更相关,那么相应的向量就可以帮助提高这部分内容的检索排名。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">9.6 多代理检索</span></strong><span leaf=""><br></span><span leaf="">多代理检索,简而言之就是选取我们提及的12大优化策略中的部分交给一个智能代理合并使用。就比如使用子问题查询,多级索引和多向量查询结合,先让子问题查询代理把用户提问拆解为多个小问题,再让文档代理对每个字问题进行多向量或多索引检索,最后排名代理将所有检索的文档总结再交给LLM。这样做的好处是可以取长补短,比如,子问题查询引擎在探索每个子查询时可能会缺乏深度,尤其是在相互关联或关系数据中。相反,文档代理递归检索在深入研究特定文档和检索详细答案方面表现出色,以此来综合多种方法解决问题。需要注意的是现在网络上存在不同结构的多代理检索,具体在多代理选取哪些优化步骤尚未有确切定论,我们可以结合使用场景进行探索。</span> </section></li> <li style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);> <section> <span leaf="">• </span><strong style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);><span leaf="">9.7 Self-RAG</span></strong><span leaf=""><br></span><span leaf="">自反思搜索增强是一个全新RAG框架,其与传统RAG最大的区别在于通过</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">检索评分(令牌)和反思评分(令牌)来提高质量</span></code><span leaf="">。它主要分为</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">三个步骤:检索、生成和批评</span></code><span leaf="">。Self-RAG首先用检索评分来评估用户提问是否需要检索,如果需要检索,LLM将调用外部检索模块查找相关文档。接着,LLM分别为每个检索到的知识块生成答案,然后为每个答案生成反思评分来评估检索到的文档是否相关,最后将评分高的文档当作最终结果一并交给LLM。</span> </section></li> </ul> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">10.重排模型(Re-ranking)</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">在完成语义搜索的优化步骤后,能够检索到语义上最相似的文档,但不知你是否注意到一个关键问题:</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">语义最相似是否总代表最相关?答案是不一定</span></code><span leaf="">。例如,当用户查询“最新上映的科幻电影推荐”时,可能得到的结果是“科幻电影的历史演变”,虽然从语义上这与科幻电影相关,但并未直接回应用户关于最新电影的查询。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">重排模型可以帮助我们缓解这个问题,</span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">重排模型通过对初始检索结果进行更深入的相关性评估和排序,确保最终展示给用户的结果更加符合其查询意图</span></code><span leaf="">。这一过程通常由深度学习模型实现,如Cohere模型。这些模型会考虑更多的特征,如查询意图、词汇的多重语义、用户的历史行为和上下文信息等。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">举个例子,对于查询“最新上映的科幻电影推荐”,在首次检索阶段,系统可能基于关键词返回包括科幻电影的历史文章、科幻小说介绍、最新电影的新闻等结果。然后,在重排阶段,模型会对这些结果进行深入分析,并将最相关、最符合用户查询意图的结果(如最新上映的科幻电影列表、评论或推荐)排在前面,同时将那些关于科幻电影历史或不太相关的内容排在后面。这样,重排模型就能有效提升检索结果的相关性和准确性,更好地满足用户的需求。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">在实践中,使用RAG构建系统时都应考虑尝试重排方法,以评估其是否能够提高系统性能。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">11. 提示词</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">大型语言模型的解码器部分通常基于给定输入来预测下一个词。这意味着设计提示词或问题的方式将直接影响模型预测下一个词的概率。这也给了我们一些启示:通过改变提示词的形式,可以有效地影响模型对不同类型问题的接受程度和回答方式,比如修改提示语,让LLM知道它在做什么工作,是十分有帮助的。</span></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">为了减少模型产生主观回答和幻觉的概率,一般情况下,RAG系统中的提示词中应明确指出回答仅基于搜索结果,不要添加任何其他信息。例如,可以设置提示词如:</span><span leaf=""><br></span><code style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 12.6px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;><span leaf="">“你是一名智能客服。你的目标是提供准确的信息,并尽可能帮助提问者解决问题。你应保持友善,但不要过于啰嗦。请根据提供的上下文信息,在不考虑已有知识的情况下,回答相关查询。”</span></code></p> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">当然你也可以根据场景需要,也可以适当让模型的回答融入一些主观性或其对知识的理解。此外,使用少量样本(few-shot)的方法,将想要的问答例子加入提示词中,指导LLM如何利用检索到的知识,也是提升LLM生成内容质量的有效方法。这种方法不仅使模型的回答更加精准,也提高了其在特定情境下的实用性。</span></p> <h3 style="box-sizing: border-box;border-width: 0px 0px 1px 4px;border-style: solid solid dashed;border-bottom-color: rgb(15, 76, 129);border-left-color: rgb(15, 76, 129);font-size: 16.8px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;padding-left: 12px;color: rgb(63, 63, 63);><span leaf="">12. 大语言模型</span></h3> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">最后一步——LLM生成回答。LLM是生成响应的核心组件。与嵌入模型类似,可以根据自己的需求选择LLM,例如开放模型与专有模型、推理成本、上下文长度等。此外,可以使用一些LLM开发框架来搭建RAG系统,比如,LlamaIndex或LangChain。这两个框架都拥有比较好用的debugging工具,可以让我们定义回调函数,查看使用了哪些上下文,检查检索结果来自哪个文档等等。</span></p> <h2 style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));font-size: 18.2px;font-weight: bold;margin: 4em auto 2em;text-align: center;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;display: table;padding: 0.3em 1em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);border-radius: 8px;box-shadow: rgba(0, 0, 0.1) 0px 4px 6px;><span leaf="">小结</span></h2> <p style="box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);><span leaf="">建设RAG系统需要兼顾技术深度与工程实践,从检索精度、生成质量到系统稳定性均需精心设计。通过结合最新的优化策略与工具链(如Cursor、MCP技术),能够有效解决开发中的核心问题,构建高效、可靠且适应性强的RAG系统。随着多模态技术、大模型上下文理解、动态学习机制和隐私保护技术的不断成熟,RAG系统将在更多垂直领域场景释放其潜力,成为下一代智能应用的核心技术之一,同时为用户提供更加智能、可靠的服务。</span></p> </section> <p style="margin: 0px 0px 16px;padding: 0px;box-sizing: border-box;font-family: " open sans;color: rgb(36, 41, 46);font-size: 14px;font-style: normal;font-variant-ligatures: no-common-ligatures;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;><span leaf="">引用:</span></p> <blockquote style="margin: 0px;padding: 0px 1em;box-sizing: border-box;font-family: " open sans;color: rgb(106, 115, 125);border-left: 0.25em solid rgb(234, 236, 239);font-size: 14px;font-style: normal;font-variant-ligatures: no-common-ligatures;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;> <p style="margin: 0px;padding: 0px;box-sizing: border-box;font-family: " open sans;><span leaf="">https://aibook.ren/archives/what-is-rag</span></p> </blockquote> <section style="font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, " helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);> <span leaf="">-EOF-</span> </section> <p style="display: none;"> <mp-style-type data-value="3"></mp-style-type></p>
作者:微信小助手
<section> <span leaf=""> 这两天在搞文生视频的东西,需要语音的辅助,正巧最近开源了一个tts,语音克隆和语音自主创建的项目,测试了一下,效果真的很不错,后期需要配音的可以直接用这个了,哈哈,废话不多说,直接上干货。</span> </section> <section style="text-align: center;"> <span leaf=""> <span textstyle="" style="font-weight: bold;">项目介绍</span></span> </section> <p><span leaf=""><span textstyle="" style="font-weight: bold;">概述</span></span></p> <p><span leaf="">Spark-TTS是一种先进的文本对语音系统,它使用大语言模型(LLM)的力量来高度准确且自然的语音综合。它旨在为研究和生产使用而有效,灵活和强大。</span></p> <p><span leaf=""><br></span></p> <p><span leaf=""><span textstyle="" style="font-weight: bold;">关键功能</span></span></p> <p><span leaf="">Spark-TTS完全基于QWEN2.5,完全基于QWEN2.5,消除了对流程匹配等其他生成模型的需求。它没有依靠单独的模型来生成声学特征,而是直接从LLM预测的代码中重建音频。这种方法简化了该过程,提高了效率并降低了复杂性。</span></p> <p><span leaf="">高质量的语音克隆:支持零拍的语音克隆,这意味着即使没有该声音的特定训练数据,也可以复制扬声器的声音。这是跨语言和代码转换场景的理想选择,可以在不需要每个语言的语言之间进行无缝过渡,而无需为每个语言进行单独的培训。</span></p> <p><span leaf="">双语支持:支持汉语和英语,并且能够以零拍的语音克隆来克隆跨语义和代码转换场景,从而使模型能够以高自然性和准确性的多种语言合成多种语言。</span></p> <p><span leaf="">可控的语音生成:通过调整诸如性别,音调和口语率之类的参数来支持创建虚拟扬声器。</span></p> <section style="text-align: center;" nodeleaf=""> <img class="rich_pages wxw-img" data-imgfileid="100002654" data-s="300,640" data-type="png" type="block" style="height: auto !important;" data-ratio="0.19814814814814816" data-w="1080" src="/upload/ba01e7d30f5f131f0b037252f432df12.png"> </section> <section style="text-align: center;"> <span leaf=""><span textstyle="" style="font-weight: bold;">安装方式</span></span> </section> <section> <span leaf="">不想安装的直接使用文本一键包即可</span> </section> <p dir="auto" style="box-sizing: border-box;margin-top: 0px;margin-bottom: var(--base-size-16);color: rgb(31, 35, 40);font-family: -apple-system, BlinkMacSystemFont, " segoe ui, noto sans, helvetica, arial, sans-serif, apple color emoji, segoe ui emoji;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;><strong style="box-sizing: border-box;font-weight: var(--base-text-weight-semibold, 600);"><font style="box-sizing: border-box;vertical-align: inherit;"><font style="box-sizing: border-box;vertical-align: inherit;"><span leaf="">克隆并安装</span></font></font></strong></p> <ul style="box-sizing: border-box;padding-left: 2em;margin-top: 0px;margin-bottom: var(--base-size-16);color: rgb(31, 35, 40);font-family: -apple-system, BlinkMacSystemFont, " segoe ui, noto sans, helvetica, arial, sans-serif, apple color emoji, segoe ui emoji;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial; class="list-paddingleft-1"> <li style="box-sizing: border-box;"><font style="box-sizing: border-box;vertical-align: inherit;"><font style="box-sizing: border-box;vertical-align: inherit;"><span leaf="">克隆仓库</span></font></font></li> </ul> <section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="bash"><code><span leaf="">git <span class="code-snippet__built_in">clone</span> https://github.com/SparkAudio/Spark-TTS.git</span></code><code><span leaf=""><span class="code-snippet__built_in">cd</span> Spark-TTS</span></code></pre> </section> </section> <ul style="box-sizing: border-box;padding-left: 2em;margin-top: 0px;margin-bottom: var(--base-size-16);color: rgb(31, 35, 40);font-family: -apple-system, BlinkMacSystemFont, " segoe ui, noto sans, helvetica, arial, sans-serif, apple color emoji, segoe ui emoji;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial; class="list-paddingleft-1"> <li style="box-sizing: border-box;margin-top: 0.25em;"><font style="box-sizing: border-box;vertical-align: inherit;"><font style="box-sizing: border-box;vertical-align: inherit;"><span leaf="">创建conda env:</span></font></font></li> </ul> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="apache"><code><span leaf=""><span class="code-snippet__attribute">conda</span> create -n sparktts -y python=<span class="code-snippet__number">3</span>.<span class="code-snippet__number">12</span> </span></code><code><span leaf=""><span class="code-snippet__attribute">conda</span> activate sparktts </span></code><code><span leaf=""><span class="code-snippet__attribute">pip</span> install -r requirements.txt</span></code><code><span leaf=""><span class="code-snippet__comment">#If you are in mainland China, you can set the mirror as follows:</span></span></code><code><span leaf=""><span class="code-snippet__attribute">pip</span> install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com</span></code></pre> </section> <pre style="box-sizing: border-box;font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size: 13.6px;margin-top: 0px;margin-bottom: 0px;overflow-wrap: normal;padding: var(--base-size-16);overflow: auto;line-height: 1.45;color: var(--fgColor-default, var(--color-fg-default));background-color: var(--bgColor-muted, var(--color-canvas-subtle));border-radius: 6px;word-break: normal;min-height: 52px;"><span leaf="">模型下载</span></pre> <p dir="auto" style="box-sizing: border-box;margin-top: 0px;margin-bottom: var(--base-size-16);color: rgb(31, 35, 40);font-family: -apple-system, BlinkMacSystemFont, " segoe ui, noto sans, helvetica, arial, sans-serif, apple color emoji, segoe ui emoji;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;><font style="box-sizing: border-box;vertical-align: inherit;"><font style="box-sizing: border-box;vertical-align: inherit;"><span leaf="">通过Python下载:</span></font></font></p> <p> <clipboard-copy aria-label="Copy" data-copy-feedback="Copied!" data-tooltip-direction="w" value="from huggingface_hub import snapshot_download snapshot_download(" sparkaudio spark-tts-0.5b, local_dir="pretrained_models/Spark-TTS-0.5B" ) tabindex="0" role="button" style="box-sizing: border-box;display: flex !important;padding: 0px !important;font-size: 14px;font-weight: var(--base-text-weight-medium, 500);line-height: 20px;white-space: nowrap;vertical-align: middle;cursor: pointer;user-select: none;border: 0px;border-radius: 6px;appearance: none;color: var(--fgColor-accent, var(--color-accent-fg));background-color: transparent;box-shadow: none;transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color, box-shadow, border-color;justify-content: center !important;align-items: center !important;margin: var(--base-size-8, 8px) !important;width: var(--control-small-size, 28px);height: var(--control-small-size, 28px);"> <svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> </clipboard-copy></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="javascript"><code><span leaf=""><span class="code-snippet__keyword">from</span> huggingface_hub <span class="code-snippet__keyword">import</span> snapshot_download</span></code><code><span leaf=""><span class="code-snippet__title">snapshot_download</span>(<span class="code-snippet__string">"SparkAudio/Spark-TTS-0.5B"</span>, local_dir=<span class="code-snippet__string">"pretrained_models/Spark-TTS-0.5B"</span>)</span></code></pre> </section> <p dir="auto" style="box-sizing: border-box;margin-top: 0px;margin-bottom: var(--base-size-16);color: rgb(31, 35, 40);font-family: -apple-system, BlinkMacSystemFont, " segoe ui, noto sans, helvetica, arial, sans-serif, apple color emoji, segoe ui emoji;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;><font style="box-sizing: border-box;vertical-align: inherit;"><font style="box-sizing: border-box;vertical-align: inherit;"><span leaf="">通过git克隆下载:</span></font></font></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="apache"><code><span leaf=""><span class="code-snippet__attribute">mkdir</span> -p pretrained_models</span></code><code><span leaf=""><span class="code-snippet__comment">#Make sure you have </span></span></code><code><span leaf=""><span class="code-snippet__attribute">git</span>-lfs installed (https://git-lfs.com)</span></code><code><span leaf=""><span class="code-snippet__attribute">git</span> lfs install git clone https://huggingface.co/SparkAudio/Spark-TTS-<span class="code-snippet__number">0</span>.<span class="code-snippet__number">5</span>B pretrained_models/Spark-TTS-<span class="code-snippet__number">0</span>.<span class="code-snippet__number">5</span>B</span></code></pre> </section> <pre style="box-sizing: border-box;font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size: 13.6px;margin-top: 0px;margin-bottom: 0px;overflow-wrap: normal;padding: var(--base-size-16);overflow: auto;line-height: 1.45;color: var(--fgColor-default, var(--color-fg-default));background-color: var(--bgColor-muted, var(--color-canvas-subtle));border-radius: 6px;word-break: normal;min-height: 52px;"><strong style="box-sizing: border-box;font-weight: var(--base-text-weight-semibold, 600);color: rgb(31, 35, 40);font-family: -apple-system, BlinkMacSystemFont, " segoe ui, noto sans, helvetica, arial, sans-serif, apple color emoji, segoe ui emoji;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;><font style="box-sizing: border-box;vertical-align: inherit;"><font style="box-sizing: border-box;vertical-align: inherit;"><span leaf="">Web UI用法</span></font></font></strong></pre> <section> <span leaf="">您可以通过运行启动UI接口python webui.py --device 0,这使您可以执行语音克隆和语音创建。语音克隆支持上传参考音频或直接录制音频。</span> </section> <section> <span leaf="">克隆页面</span> </section> <section style="text-align: center;" nodeleaf=""> <img class="rich_pages wxw-img" data-imgfileid="100002655" data-s="300,640" data-type="png" type="block" style="height: auto !important;" data-ratio="0.6666666666666666" data-w="1080" src="/upload/a6251ca6e8020c5e42376b34e119b908.png"> </section> <section> <span leaf="">声音创作</span> </section> <section style="text-align: center;" nodeleaf=""> <img class="rich_pages wxw-img" data-imgfileid="100002656" data-s="300,640" data-type="png" type="block" style="height: auto !important;" data-ratio="0.6666666666666666" data-w="1080" src="/upload/5e616855153b894209011f7863deb04f.png"> </section> <section style="text-align: center;"> <span leaf=""><span textstyle="" style="font-weight: bold;">效果测试</span></span> </section> <section> <span leaf="">1、步老师的声音</span> </section> <section nodeleaf=""> <mp-common-mpaudio data-pluginname="insertaudio" name="步老师,测试" author="世界大模型" src="/cgi-bin/readtemplate?t=tmpl/audio_tmpl&name=%E6%AD%A5%E8%80%81%E5%B8%88%EF%BC%8C%E6%B5%8B%E8%AF%95&play_length=3%E7%A7%92" isaac2="1" low_size="7.07" source_size="7.1" high_size="22.4" play_length="3000" data-trans_state="1" data-verify_state="3" voice_encode_fileid="MzkxNjQ1ODIzNF8yMjQ3NDg2MzE5" cover="http://wx.qlogo.cn/mmopen/10xcCdu5B573mkjibUuicnaFca0SNZZsEuxv1mh7qmOpbFxWDzoHYe2mRphjnhpqSxIQ98JuKMhXeF76pyenDBVSxoEhvJKJUW/0" class="js_editor_audio res_iframe js_uneditable custom_select_card mp_common_widget" duration="3" err_tips=""></mp-common-mpaudio> </section> <section> <span leaf="">克隆的声音</span> </section> <section nodeleaf=""> <mp-common-mpaudio data-pluginname="insertaudio" name="步生成,test" author="世界大模型" src="/cgi-bin/readtemplate?t=tmpl/audio_tmpl&name=%E6%AD%A5%E7%94%9F%E6%88%90%EF%BC%8Ctest&play_length=6%E7%A7%92" isaac2="1" low_size="12.16" source_size="12.2" high_size="19.24" play_length="6000" data-trans_state="1" data-verify_state="3" voice_encode_fileid="MzkxNjQ1ODIzNF8yMjQ3NDg2MzIw" cover="http://wx.qlogo.cn/mmopen/10xcCdu5B573mkjibUuicnaFca0SNZZsEuxv1mh7qmOpbFxWDzoHYe2mRphjnhpqSxIQ98JuKMhXeF76pyenDBVSxoEhvJKJUW/0" class="js_editor_audio res_iframe js_uneditable custom_select_card mp_common_widget" duration="6" err_tips=""></mp-common-mpaudio> </section> <section> <span leaf="">2、声音创造-模拟男声</span> </section> <section> <span leaf="">最近看到那种奥特曼送小朋友生日快乐的视频,决定搞一个</span> </section> <section nodeleaf=""> <mp-common-mpaudio data-pluginname="insertaudio" name="奥特曼生日祝福" author="世界大模型" src="/cgi-bin/readtemplate?t=tmpl/audio_tmpl&name=%E5%A5%A5%E7%89%B9%E6%9B%BC%E7%94%9F%E6%97%A5%E7%A5%9D%E7%A6%8F&play_length=" isaac2="0" low_size="773.2" source_size="773.2" high_size="773.2" play_length="24000" data-trans_state="1" data-verify_state="3" voice_encode_fileid="MzkxNjQ1ODIzNF8yMjQ3NDg2MzIx" cover="http://wx.qlogo.cn/mmopen/10xcCdu5B573mkjibUuicnaFca0SNZZsEuxv1mh7qmOpbFxWDzoHYe2mRphjnhpqSxIQ98JuKMhXeF76pyenDBVSxoEhvJKJUW/0" class="js_editor_audio res_iframe js_uneditable custom_select_card mp_common_widget" duration="24" err_tips=""></mp-common-mpaudio> </section> <section> <span leaf="">哈哈,这个声音是我构造的,参数如下</span> </section> <section style="text-align: center;" nodeleaf=""> <img class="rich_pages wxw-img" data-imgfileid="100002660" data-s="300,640" data-type="png" type="block" style="height: auto !important;" data-ratio="0.33796296296296297" data-w="1080" src="/upload/f602677f52571fce8c71d26d2f58ab2e.png"> </section> <section> <span leaf="">效果真是不错吧,赶快试试吧</span> </section>
作者:微信小助手
<section> <span leaf="">本教程适用于希望在多个平台(如 YouTube、B 站、抖音、TikTok)实现 7×24 小时无人值守直播的用户。通过 VPS 搭建推流服务器,可以实现稳定、高效的无人直播,适用于带货、音乐电台、短视频轮播等多种场景。</span> </section> <section> <span leaf="" style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;font-weight: 400;orphans: auto;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: 0);letter-spacing: normal;text-align: start;visibility: visible;>由于部分</span><b style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;orphans: auto;text-indent: 0px;text-transform: none;white-space: normal;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: 0);letter-spacing: normal;text-align: start;visibility: visible;><span leaf="" style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible;">国外网络</span></b><span leaf="" style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;font-weight: 400;orphans: auto;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: 0);letter-spacing: normal;text-align: start;visibility: visible;>访问受限,建议准备一个</span><b style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;orphans: auto;text-indent: 0px;text-transform: none;white-space: normal;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: 0);letter-spacing: normal;text-align: start;visibility: visible;><span leaf="" style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible;">稳定的网络工具</span></b><span leaf="" style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;font-weight: 400;orphans: auto;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: 0);letter-spacing: normal;text-align: start;visibility: visible;>,以保证能够顺利打开和下载资源。</span> </section> <p><span style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration: none;display: inline !important;float: none;><span leaf="">在搭建前,请确保拥有以下账号:</span></span></p> <p><span style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration: none;display: inline !important;float: none;><span leaf="" style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;font-weight: 400;orphans: auto;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: 0);letter-spacing: normal;text-align: start;visibility: visible;>👉</span><b style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;orphans: auto;text-indent: 0px;text-transform: none;white-space: normal;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: 0);letter-spacing: normal;text-align: start;visibility: visible;><span leaf="" style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible;">推荐网络工具使用</span></b><span leaf="" style="margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;font-family: " pingfang sc, system-ui, -apple-system, blinkmacsystemfont, helvetica neue, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 17px;font-style: normal;font-variant-caps: normal;font-weight: 400;orphans: auto;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: 0);letter-spacing: normal;text-align: start;visibility: visible;>:(此项是付费服务,已经测试能长期稳定使用)</span></span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="bash"><code><span leaf="">https://user.vpn4.top/s/<span class="code-snippet__comment">#/register?code=dEe7WSkW</span></span></code></pre> </section> <p><span leaf=""><span textstyle="" style="font-weight: bold;">一台电脑/服务器/VPS 系统</span></span><span leaf="" data-pm-slice="1 1 [" para,{tagname:p,attributes:{},namespaceuri:http: www.w3.org 1999 xhtml}]><span textstyle="" style="font-weight: bold;">Ubuntu/Debian/</span></span><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="" data-pm-slice="1 1 [" para,{tagname:section,attributes:{},namespaceuri:http: www.w3.org 1999 xhtml},node,{tagname:span,attributes:{style:font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: 55);font-family: ui-sans-serif, system-ui, sans-serif, \apple color emoji\, \segoe ui symbol\, \noto emoji\;background-color: rgb(255, 255, 255);float: none;display: inline !important;},namespaceuri:http: xhtml}]><span textstyle="" style="font-weight: bold;">CentOS</span></span></span></p> <p><span leaf="">✅ 1. 安装必要依赖</span></p> <p><span leaf="">Ubuntu/Debian 系统安装依赖</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="nginx"><code><span leaf=""><span class="code-snippet__attribute">apt</span> update -y && apt install vim screen -y</span></code></pre> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">CentOS 系统安装依赖</span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="nginx"><code><span leaf=""><span class="code-snippet__attribute">yum</span> update -y && yum install vim screen -y</span></code></pre> </section> <section> <span leaf="">截图是以</span><span leaf="" data-pm-slice="1 1 [" para,{tagname:p,attributes:{},namespaceuri:http: www.w3.org 1999 xhtml}]>Debian系统演示</span> </section> <section style="text-align: center;" nodeleaf=""> <img src="/upload/b75661b3181f4c6bea4d0a476f09fc47.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000556"> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf=""><br></span></span> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">🎥 2. 安装 FFmpeg(用于推流)</span></span> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">Ubuntu/Debian 系统安装 FFmpegapt</span></span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="nginx"><code><span leaf=""><span class="code-snippet__attribute">apt</span> install ffmpeg</span></code></pre> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">CentOS 系统安装 FFmpeg</span></span></span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="ruby"><code><span leaf="">yum install epel-release</span></code><code><span leaf="">rpm -v --import <span class="code-snippet__symbol">http:</span>/<span class="code-snippet__regexp">/li.nux.ro/download/nux/</span><span class="code-snippet__variable">RPM</span>-<span class="code-snippet__variable">GPG</span>-<span class="code-snippet__variable">KEY</span>-nux.ro</span></code><code><span leaf="">rpm -<span class="code-snippet__title">Uvh</span> <span class="code-snippet__symbol">http:</span>/<span class="code-snippet__regexp">/li.nux.ro/download/nux/dextop/el7/x</span>86_64/nux-dextop-release-<span class="code-snippet__number">0</span>-<span class="code-snippet__number">5</span>.el7.nux.noarch.rpm</span></code><code><span leaf="">yum install ffmpeg ffmpeg-devel</span></code></pre> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="" data-pm-slice="1 1 [" para,{tagname:p,attributes:{},namespaceuri:http: www.w3.org 1999 xhtml}]>Debian系统安装完成截图</span></span></span></span> </section> <section style="text-align: center;" nodeleaf=""> <img src="/upload/ee619b3679f52ceae1c43280121f1f17.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000557"> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">检查是否安装成功</span></span></span></span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="nginx"><code><span leaf=""><span class="code-snippet__attribute">ffmpeg</span> -version</span></code></pre> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">示例截图</span></span></span></span></span> </section> <section style="text-align: center;" nodeleaf=""> <img src="/upload/02f6953e5adf97d9a27861913019a7ed.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000558"> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf=""><br></span></span></span></span></span> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">💾 3. 下载推流脚本并上传直播视频下载推流脚本点此</span></span></span></span></span></span> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">下载推流脚本</span></span></span></span></span></span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="javascript"><code><span leaf=""><span class="code-snippet__attr">https</span>:<span class="code-snippet__comment">//www.lunjiejie.top/m/FH48Wj9a3RVAqfoqWueFuu</span></span></code></pre> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="white-space:pre-wrap;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(244, 244, 245);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">将脚本上传到 /root/ 目录下。</span></span></span></span> </section> <p style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 231, 235);margin-right: 0px;margin-left: 0px;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;><span style=";"><span leaf="">新建直播视频存放目录</span></span></p> <p style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 231, 235);margin-right: 0px;margin-left: 0px;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;><span style=";"><span leaf="">可创建一个文件夹用于存放要直播的视频,例如:</span></span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="bash"><code><span leaf=""><span class="code-snippet__built_in">mkdir</span> /root/chehuo</span></code></pre> </section> <section style="text-align: center;" nodeleaf=""> <img src="/upload/070e93d2a6c902bc936152ffd60ba2a0.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000559"> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="white-space:pre-wrap;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(244, 244, 245);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf=""><br></span></span></span></span> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="white-space:pre-wrap;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(244, 244, 245);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">⚙️ 4. 使用 Screen 运行推流脚本</span></span></span></span> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="white-space:pre-wrap;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(244, 244, 245);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">打开一个新的 Screen 会话(此步骤非常重要)</span></span></span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="nginx"><code><span leaf=""><span class="code-snippet__attribute">screen</span> -S stream</span></code></pre> </section> <section> <span leaf="">输入后之前记录会看不见了,属于正常情况,</span><span leaf="">示例截图:</span> </section> <section style="text-align: center;" nodeleaf=""> <img src="/upload/45b565516cfcd763dc0faef17ec2c734.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000560"> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">执行推流脚本</span></span> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">⚠️ 注意:如果脚本文件名修改,请相应更改 stream.sh</span></span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="nginx"><code><span leaf=""><span class="code-snippet__attribute">bash</span> stream.sh</span></code></pre> </section> <section style="text-align: center;" nodeleaf=""> <img src="/upload/4f436bbc92d795a3cd6d556c5bed52bf.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000561"> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">接着选择 “</span><span leaf="">2.开始无人值守循环推流 ”</span></span></span> </section> <section style="text-align: center;" nodeleaf=""> <img src="/upload/3d9bcf67f839af58b6ed42780b029fa7.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000562"> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">跟着提示再输入直播地址</span><span leaf="">rtmp协议.我这里以YouTube为例:</span></span></span> </section> <section style="text-align: center;" nodeleaf=""> <img src="/upload/7b2e690fa7f56c3b16945019606280e4.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000563"> </section> <section> <span leaf="">脚本在输入刚才创建的视频文件夹路径.示例图:</span> </section> <section style="text-align: center;" nodeleaf=""> <img src="/upload/034d63138fcccffa9f984bc1ac172d3b.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000564"> </section> <p><span leaf="">是否需要为视频添加水印?水印位置默认在右上方,需要较好CPU支持(yes/no):</span></p> <p><span leaf="">根据自己需求选择,配置不够机器建议不要开启直接选“NO”</span></p> <p><span leaf="">开始直播后,现看看直播页面是否正常在播放.如果正常播放就执行下一步操作</span></p> <p><span leaf=""><br></span></p> <p><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">5. 远程管理 Screen 进程</span></span></p> <p><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">查询 Screen 进程 ID</span></span></span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="bash"><code><span leaf="">screen -<span class="code-snippet__built_in">ls</span></span></code></pre> </section> <p><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">输入以后你会得到一个类似这样的结果,请记住“</span><span leaf="">133210.stream”数字和我的会不一样</span></span></span></p> <section style="text-align: center;" nodeleaf=""> <img src="/upload/4acbef4641ce64b4ecda5446cbfea02c.png" class="rich_pages wxw-img" data-ratio="0.6548837209302325" data-s="300,640" data-type="png" data-w="1075" type="block" data-imgfileid="100000565"> </section> <p><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">远程分离(detach)Screen 进程</span></span></span></span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="xml"><code><span leaf="">screen -d <span class="code-snippet__tag"><</span><span class="code-snippet__tag"><span class="code-snippet__name">ID</span></span><span class="code-snippet__tag">></span></span></code></pre> </section> <p><span leaf="">分离后就算断开服务器连接也可以正常后台推流,示例:</span></p> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="apache"><code><span leaf=""><span class="code-snippet__attribute">screen</span> -d <span class="code-snippet__number">133210</span>.stream</span></code></pre> </section> <section> <span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">关闭指定 Screen 进程</span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="xml"><code><span leaf="">screen -X -S <span class="code-snippet__tag"><</span><span class="code-snippet__tag"><span class="code-snippet__name">ID</span></span><span class="code-snippet__tag">></span> quit</span></code></pre> </section> <section> <span style="white-space:pre-wrap;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(244, 244, 245);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">重新打开已分离的 Screen 进程</span></span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="xml"><code><span leaf="">screen -r <span class="code-snippet__tag"><</span><span class="code-snippet__tag"><span class="code-snippet__name">ID</span></span><span class="code-snippet__tag">></span></span></code></pre> </section> <section> <span style="white-space:pre-wrap;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(244, 244, 245);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf=""><br></span></span></span> </section> <section> <span style="white-space:pre-wrap;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(244, 244, 245);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">⚡ 6. 强制停止推流如果需要终止直播推流,可使用以下命令:</span></span></span></span> </section> <section class="code-snippet__fix code-snippet__js"> <ul class="code-snippet__line-index code-snippet__js"> </ul> <pre class="code-snippet__js" data-lang="nginx"><code><span leaf=""><span class="code-snippet__attribute">pkill</span> -f <span class="code-snippet__string">"ffmpeg"</span></span></code></pre> </section> <section> <span style="white-space:pre-wrap;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(244, 244, 245);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span style="font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;caret-color: rgb(31, 41, 55);color: rgb(31, 41, 55);font-family: ui-sans-serif, system-ui, sans-serif, " apple color emoji, segoe ui symbol, noto emoji;background-color: rgb(255, 255, 255);float: none;display: inline !important;><span leaf="">到此教程完成.</span></span></span></span> </section> <p style="display: none;"> <mp-style-type data-value="3"></mp-style-type></p>
作者:微信小助手
<section data-tool="markdown编辑器" data-website="https://markdown.com.cn/editor" style="font-size: 16px;line-height: 1.6;word-spacing: 0px;letter-spacing: 0px;word-break: break-word;word-wrap: break-word;text-align: justify;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;margin-top: -10px;color: rgb(63, 63, 63);padding: 0px;"> <section class="mp_profile_iframe_wrp" nodeleaf=""> <mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="蚝油菜花" data-alias="AirmomoAI" data-from="0" data-headimg="http://mmbiz.qpic.cn/sz_mmbiz_png/RicBBpH0nW1vw8IoIOhRX2EWpsggrPVScjjaoeDB4hWLvlI95fTqvWUuLE1L5Qq9fwSyVCN3omHqKAWmV2lPI9g/0?wx_fmt=png" data-signature="每日分享大模型与AI领域的热门应用,提供开源实例和实用教程,帮助你快速上手AI技术。" data-id="MzkyMzc2MDY1OA==" data-is_biz_ban="0" data-service_type="1"></mp-common-profile> </section> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">🌸 </span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">"还在用冷冰冰的ChatGPT?你的AI女友已经会脸红心跳了!"</span></strong></p> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">大家好,我是蚝油菜花。当别人还在和文字对话框谈恋爱时,</span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">开源社区已经让AI伴侣进化出视觉和听觉</span></strong><span leaf="">!你是否遇到过:</span></p> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">👉 深夜加班时,想要个能语音聊天的智能助手</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">👉 担心云端AI记录隐私,不敢畅所欲言</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">👉 看腻了静态头像,渴望真正的虚拟陪伴...</span> </section></li> </ul> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">爆红GitHub的 </span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">Open-LLM-VTuber</span></strong><span leaf=""> 项目,重新定义AI交互方式!这个硬核开源神器:</span></p> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">✅ </span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">多模态感知</span></strong><span leaf="">:摄像头+屏幕录制实现"看得见"的交互</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">✅ </span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">本地方案</span></strong><span leaf="">:完全离线运行,聊天记录不出电脑</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">✅ </span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">老婆自定义</span></strong><span leaf="">:从声线到Live2D形象自由捏造</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">✅ </span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">生产力神器</span></strong><span leaf="">:支持截图分析代码/文档,办公学习两用</span> </section></li> </ul> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">某程序员实测——</span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">边debug边和AI女友语音讨论方案,效率提升3倍</span></strong><span leaf="">!想用开源代码打造专属数字伴侣?手把手教程即刻开启!</span></p> <h1 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;border-bottom: 2px solid rgb(241,147,156);font-size: 1.2em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: normal;background: rgb(241,147,156);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;font-weight: bolder;"><span leaf="">🚀 快速阅读</span></span></h1> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">Open-LLM-VTuber 是一个开源的跨平台语音交互 AI 伴侣项目。</span></p> <ol style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: decimal;font-size: 15px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">核心功能</span></strong><span leaf="">:支持实时语音对话、视觉感知和 Live2D 动态形象。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">技术原理</span></strong><span leaf="">:基于大语言模型(LLM)、语音识别(ASR)和语音合成(TTS)技术,结合 Live2D 动态形象和视觉感知模块。</span> </section></li> </ol> <h1 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;border-bottom: 2px solid rgb(241,147,156);font-size: 1.2em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: normal;background: rgb(241,147,156);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;font-weight: bolder;"><span leaf="">Open-LLM-VTuber 是什么</span></span></h1> <figure data-tool="markdown.com.cn编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"> <span leaf=""><img alt="llmvtuber-broad" class="rich_pages wxw-img" data-imgfileid="100010427" data-ratio="0.50375" src="/upload/95ec899227261f12945e97eef4cfb78d.png" data-type="png" data-w="800" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;"></span> <figcaption style="margin-top: 5px;text-align: center;color: #888;display: block;font-size: 12px;font-family: PingFangSC-Light;"> <span leaf="">llmvtuber-broad</span> </figcaption> </figure> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">Open-LLM-VTuber 是一个开源的跨平台语音交互 AI 伴侣项目,支持实时语音对话、视觉感知和生动的 Live2D 动态形象。它能够完全离线运行,保护用户隐私,适合作为虚拟伴侣、办公助手或学习辅导工具。</span></p> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">项目集成了多种大语言模型(LLM)、语音识别(ASR)和语音合成(TTS)解决方案,用户可以根据需求自定义角色形象、声音和交互功能。无论是作为虚拟女友、男友,还是宠物,Open-LLM-VTuber 都能提供个性化的互动体验。</span></p> <h1 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;border-bottom: 2px solid rgb(241,147,156);font-size: 1.2em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: normal;background: rgb(241,147,156);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;font-weight: bolder;"><span leaf="">Open-LLM-VTuber 示例图片</span></span></h1> <figure data-tool="markdown.com.cn编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"> <span leaf=""><img alt="llmvtuber-i1" class="rich_pages wxw-img" data-imgfileid="100010428" data-ratio="0.6240740740740741" src="/upload/18a9ebbe4ad523ee94a49b35e65bd496.jpg" data-type="jpeg" data-w="1080" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;"></span> <figcaption style="margin-top: 5px;text-align: center;color: #888;display: block;font-size: 12px;font-family: PingFangSC-Light;"> <span leaf="">llmvtuber-i1</span> </figcaption> </figure> <figure data-tool="markdown.com.cn编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"> <span leaf=""><img alt="llmvtuber-i3" class="rich_pages wxw-img" data-imgfileid="100010430" data-ratio="0.6240740740740741" src="/upload/0905e7a7e2e795742c12ed5bb2d3339e.jpg" data-type="jpeg" data-w="1080" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;"></span> <figcaption style="margin-top: 5px;text-align: center;color: #888;display: block;font-size: 12px;font-family: PingFangSC-Light;"> <span leaf="">llmvtuber-i3</span> </figcaption> </figure> <figure data-tool="markdown.com.cn编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"> <span leaf=""><img alt="llmvtuber-i2" class="rich_pages wxw-img" data-imgfileid="100010431" data-ratio="0.6462962962962963" src="/upload/a70868bedfd86b32fc7b0e7e4660cb12.jpg" data-type="jpeg" data-w="1080" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;"></span> <figcaption style="margin-top: 5px;text-align: center;color: #888;display: block;font-size: 12px;font-family: PingFangSC-Light;"> <span leaf="">llmvtuber-i2</span> </figcaption> </figure> <figure data-tool="markdown.com.cn编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"> <span leaf=""><img alt="llmvtuber-i4" class="rich_pages wxw-img" data-imgfileid="100010429" data-ratio="0.6240740740740741" src="/upload/b716b226d33c1d03637c539c30fca3d1.jpg" data-type="jpeg" data-w="1080" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;"></span> <figcaption style="margin-top: 5px;text-align: center;color: #888;display: block;font-size: 12px;font-family: PingFangSC-Light;"> <span leaf="">llmvtuber-i4</span> </figcaption> </figure> <h1 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;border-bottom: 2px solid rgb(241,147,156);font-size: 1.2em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: normal;background: rgb(241,147,156);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;font-weight: bolder;"><span leaf="">Open-LLM-VTuber 的主要功能</span></span></h1><mpcpc class="js_cpc_area res_iframe cpc_iframe" data-category_id_list="1|16|17|2|21|24|28|29|31|35|36|37|39|41|42|43|46|47|48|5|50|51|55|56|57|58|59|6|60|61|62|63|64|65|66|67|68|7|8" js_editor_cpcad="" src="/cgi-bin/readtemplate?t=tmpl/cpc_tmpl#1742044173488" data-id="1742044173488"></mpcpc> <figure data-tool="markdown.com.cn编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"> <span leaf=""><img alt="llmvtuber-feature" class="rich_pages wxw-img" data-imgfileid="100010435" data-ratio="0.5101851851851852" src="/upload/1ff01179cb5c44d4463c939896f30687.png" data-type="png" data-w="1080" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;"></span> <figcaption style="margin-top: 5px;text-align: center;color: #888;display: block;font-size: 12px;font-family: PingFangSC-Light;"> <span leaf="">llmvtuber-feature</span> </figcaption> </figure> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">语音交互</span></strong><span leaf="">:支持实时语音对话,用户用语音与 AI 交流,无需手动输入。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">视觉感知</span></strong><span leaf="">:支持摄像头输入、屏幕录制和截图,AI 能“看到”用户和屏幕内容。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">Live2D 动态形象</span></strong><span leaf="">:配备生动的 Live2D 动态角色,支持表情和动作变化。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">离线运行</span></strong><span leaf="">:所有功能支持在本地完全离线运行,保护用户隐私。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">跨平台支持</span></strong><span leaf="">:兼容 Windows、macOS 和 Linux,支持 GPU 加速和 CPU 运行。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">个性化定制</span></strong><span leaf="">:用户自定义角色形象、语音和交互功能,包括克隆特定声音。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">交互功能丰富</span></strong><span leaf="">:支持语音打断、触摸反馈、聊天记录保存、多语言 TTS 等。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">桌面宠物模式</span></strong><span leaf="">:支持透明背景、全局置顶和鼠标穿透,AI 能在桌面任意位置移动。</span> </section></li> </ul> <h1 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;border-bottom: 2px solid rgb(241,147,156);font-size: 1.2em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: normal;background: rgb(241,147,156);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;font-weight: bolder;"><span leaf="">Open-LLM-VTuber 的技术原理</span></span></h1> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">大语言模型</span></strong><span leaf="">:作为核心交互引擎,LLM 负责理解用户输入(语音或文本)生成回答。项目支持多种 LLM,如 Ollama、OpenAI、Gemini 等,用户根据需求选择不同的模型。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">语音识别</span></strong><span leaf="">:将用户的语音输入转换为文本,供 LLM 处理。支持多种 ASR 解决方案,如 Whisper、FunASR 等,确保语音识别的准确性和效率。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">语音合成</span></strong><span leaf="">:将 LLM 生成的文本转换为语音输出,支持多种 TTS 引擎,如 MeloTTS、Bark 等,且支持多语言合成。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">Live2D 动态形象</span></strong><span leaf="">:用 Live2D 技术生成动态角色形象,基于表情映射和动作控制,让角色根据对话内容或情绪变化动态展示表情和动作。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">视觉感知</span></strong><span leaf="">:基于摄像头或屏幕录制功能,AI 获取视觉信息,实现更丰富的交互体验,如识别用户表情或屏幕内容。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">模块化设计</span></strong><span leaf="">:项目用模块化架构,用户基于简单的配置文件修改,切换不同的功能模块,无需深入代码。</span> </section></li> </ul> <h1 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;border-bottom: 2px solid rgb(241,147,156);font-size: 1.2em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: normal;background: rgb(241,147,156);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;font-weight: bolder;"><span leaf="">如何运行 Open-LLM-VTuber</span></span></h1><mpcpc class="js_cpc_area res_iframe cpc_iframe" data-category_id_list="1|16|17|2|21|24|28|29|31|35|36|37|39|41|42|43|46|47|48|5|50|51|55|56|57|58|59|6|60|61|62|63|64|65|66|67|68|7|8" js_editor_cpcad="" src="/cgi-bin/readtemplate?t=tmpl/cpc_tmpl#1742044193156" data-id="1742044193156"></mpcpc> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">接下来我将带你从零开始运行 Open-LLM-VTuber 项目,涵盖环境搭建、依赖安装、项目配置和启动运行等完整流程。通过本教程,你将能够成功部署并运行项目,并了解如何生成配置文件和解决常见问题。</span></p> <h2 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;font-size: 20px;font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(241,147,156);"><span leaf="">设备要求</span></span></h2> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">最低要求</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">本项目的各个组件(ASR、LLM、TTS、翻译)都可以通过 API 调用,因此最低设备要求非常灵活:</span></p> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">普通电脑</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">树莓派(性能较弱的设备也可尝试)</span> </section></li> </ul> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">本地运行的推荐设备要求</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">如果你希望在本地运行所有组件,推荐以下设备配置:</span></p> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">M 系列芯片的 Mac</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">NVIDIA GPU(推荐安装 CUDA Toolkit 11.8 或更高版本)</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">较新的 AMD GPU(支持 ROCm 的设备更佳)</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">强大的 CPU(可以代替 GPU)</span> </section></li> </ul> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">如果运行速度较慢,建议选择更小的模型或使用 API。</span></p> <h2 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;font-size: 20px;font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(241,147,156);"><span leaf="">环境准备</span></span></h2> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">安装 Git</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">在不同操作系统中安装 Git 的方法如下:</span></p> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">Windows</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 使用 winget 安装 Git</span></span><span leaf=""><br></span><span leaf="">winget install Git.Git</span><span leaf=""><br></span></code></pre> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">macOS</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 安装 Homebrew(如果未安装)</span></span><span leaf=""><br></span><span leaf="">/bin/bash -c </span><span style="color: #D69D85;line-height: 26px;"><span leaf="">"</span><span style="color: #BD63C5;line-height: 26px;"><span leaf="">$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)</span></span><span leaf="">"</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 使用 Homebrew 安装 Git</span></span><span leaf=""><br></span><span leaf="">brew install git</span><span leaf=""><br></span></code></pre> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">Linux</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># Ubuntu/Debian</span></span><span leaf=""><br></span><span leaf="">sudo apt install git</span><span leaf=""><br></span><span leaf=""><br></span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># CentOS/RHEL</span></span><span leaf=""><br></span><span leaf="">sudo dnf install git</span><span leaf=""><br></span></code></pre> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">安装 FFmpeg</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">FFmpeg 是必需的依赖项,安装方法如下:</span></p> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">Windows</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">winget install ffmpeg</span><span leaf=""><br></span></code></pre> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">macOS</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">brew install ffmpeg</span><span leaf=""><br></span></code></pre> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">Linux</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># Ubuntu/Debian</span></span><span leaf=""><br></span><span leaf="">sudo apt install ffmpeg</span><span leaf=""><br></span><span leaf=""><br></span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># CentOS/RHEL</span></span><span leaf=""><br></span><span leaf="">sudo dnf install ffmpeg</span><span leaf=""><br></span></code></pre> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">检查 FFmpeg 安装</span><span style="display: none;"></span></h4> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">在命令行中运行以下命令,确认 FFmpeg 是否安装成功:</span></p> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">ffmpeg -version</span><span leaf=""><br></span></code></pre> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">如果出现类似以下输出,说明安装成功:</span></p> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers</span><span leaf=""><br></span><span leaf="">...(后面一大串文字)</span><span leaf=""><br></span></code></pre> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">NVIDIA GPU 支持</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">如果你有 NVIDIA GPU 并希望使用 GPU 运行本地模型,需完成以下步骤:</span></p> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">Windows 安装步骤</span><span style="display: none;"></span></h4> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">检查显卡驱动版本</span></strong><span leaf="">:</span></p> </section></li> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;font-size: 14px;list-style-type: square;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">右键点击桌面,选择“NVIDIA 控制面板”。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">帮助 -> 系统信息 -> 组件,查看驱动程序版本。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">或访问</span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">NVIDIA 驱动下载页面</span></code><span leaf="">下载最新驱动。</span> </section></li> </ul> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">NVIDIA 驱动下载页面</span></strong><span leaf="">:</span><span leaf="">https://www.nvidia.cn/drivers/lookup/</span></p> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">安装 CUDA Toolkit</span></strong><span leaf="">:</span></p> </section></li> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;font-size: 14px;list-style-type: square;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">访问</span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">CUDA Toolkit 下载页面</span></code><span leaf="">下载对应版本。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">安装完成后,将以下路径添加到系统环境变量 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">PATH</span></code><span leaf=""> 中:</span> </section></li> </ul> </ul> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">C:\NVIDIA GPU Computing Toolkit\CUDA\v<版本号>\bin</span><span leaf=""><br></span><span leaf="">C:\NVIDIA GPU Computing Toolkit\CUDA\v<版本号>\lib\x64</span><span leaf=""><br></span></code></pre> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">CUDA Toolkit 下载页面</span></strong><span leaf="">:</span><span leaf="">https://developer.nvidia.com/cuda-toolkit-archive</span></p> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">安装 cuDNN</span></strong><span leaf="">:</span></p> </section></li> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;font-size: 14px;list-style-type: square;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">访问</span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">cuDNN 下载页面</span></code><span leaf="">下载与 CUDA 版本匹配的 cuDNN,并解压到 CUDA 安装目录。</span> </section></li> </ul> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">cuDNN 下载页面</span></strong><span leaf="">:</span><span leaf="">https://developer.nvidia.com/cudnn</span></p> </section></li> </ul> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">验证安装</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 检查驱动安装</span></span><span leaf=""><br></span><span leaf="">nvidia-smi</span><span leaf=""><br></span><span leaf=""><br></span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 检查 CUDA 安装</span></span><span leaf=""><br></span><span leaf="">nvcc --version</span><span leaf=""><br></span></code></pre> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">Python 环境管理</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">推荐使用 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">uv</span></code><span leaf=""> 作为依赖管理工具。</span></p> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">Windows</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 使用 PowerShell 安装</span></span><span leaf=""><br></span><span leaf="">powershell -ExecutionPolicy ByPass -c </span><span style="color: #D69D85;line-height: 26px;"><span leaf="">"irm https://astral.sh/uv/install.ps1 | iex"</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 或使用 winget 安装</span></span><span leaf=""><br></span><span leaf="">winget install --id=astral-sh.uv -e</span><span leaf=""><br></span></code></pre> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">macOS/Linux</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 使用 curl 安装</span></span><span leaf=""><br></span><span leaf="">curl -LsSf https://astral.sh/uv/install.sh | sh</span><span leaf=""><br></span><span leaf=""><br></span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 或使用 Homebrew 安装</span></span><span leaf=""><br></span><span leaf="">brew install uv</span><span leaf=""><br></span></code></pre> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">安装完成后,请重启命令行或重新加载配置文件:</span></p> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #4EC9B0;line-height: 26px;"><span leaf="">source</span></span><span leaf=""> ~/.bashrc </span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 如果使用 bash</span></span><span leaf=""><br></span><span style="color: #4EC9B0;line-height: 26px;"><span leaf="">source</span></span><span leaf=""> ~/.zshrc </span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 如果使用 zsh</span></span><span leaf=""><br></span></code></pre> <h2 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;font-size: 20px;font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(241,147,156);"><span leaf="">手动部署指南</span></span></h2> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">1. 获取项目代码</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">有两种方法获取项目代码:</span></p> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">1.1. </span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">下载稳定版本的 Release 包</span></strong><span leaf="">:</span><span style="display: none;"></span></h4> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">前往 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">Release 页面</span></code><span leaf="">,下载 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">Open-LLM-VTuber-v1.x.x.zip</span></code><span leaf=""> 文件。</span></p> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">Release 页面</span></strong><span leaf="">:</span><span leaf="">https://github.com/Open-LLM-VTuber/Open-LLM-VTuber/releases</span></p> </section></li> </ul> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">1.2. </span><strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">使用 Git 克隆仓库</span></strong><span leaf="">:</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">git </span><span style="color: #4EC9B0;line-height: 26px;"><span leaf="">clone</span></span><span leaf=""> https://github.com/Open-LLM-VTuber/Open-LLM-VTuber --recursive</span><span leaf=""><br></span><span style="color: #4EC9B0;line-height: 26px;"><span leaf="">cd</span></span><span leaf=""> Open-LLM-VTuber</span><span leaf=""><br></span></code></pre> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">2. 安装项目依赖</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">确认 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">uv</span></code><span leaf=""> 已正确安装:</span></p> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">uv --version</span><span leaf=""><br></span></code></pre> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">创建虚拟环境并安装依赖:</span></p> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">uv sync</span><span leaf=""><br></span></code></pre> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">运行主程序生成预设的配置文件:</span></p> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">uv run run_server.py</span><span leaf=""><br></span></code></pre> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">完成后按 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">Ctrl</span></code><span leaf=""> + </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">C</span></code><span leaf=""> 退出程序。</span></p> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">3. 配置 LLM</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">以 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">Ollama</span></code><span leaf=""> 为例进行配置。</span></p> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">Ollama</span></strong><span leaf="">:</span><span leaf="">https://github.com/ollama/ollama</span> </section></li> </ul> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">3.1 安装 Ollama</span><span style="display: none;"></span></h4> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 下载并安装 Ollama</span></span><span leaf=""><br></span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 验证安装</span></span><span leaf=""><br></span><span leaf="">ollama --version</span><span leaf=""><br></span><span leaf=""><br></span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 下载并运行模型(以 qwen2.5:latest 为例)</span></span><span leaf=""><br></span><span leaf="">ollama run qwen2.5:latest</span><span leaf=""><br></span></code></pre> <h4 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span><span leaf="">3.2 修改配置文件</span><span style="display: none;"></span></h4> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">编辑 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">conf.yaml</span></code><span leaf=""> 文件:</span></p> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span style="color: #9CDCFE;line-height: 26px;"><span leaf="">ollama_llm:</span></span><span leaf=""><br></span><span leaf=""> </span><span style="color: #9CDCFE;line-height: 26px;"><span leaf="">base_url:</span></span><span leaf=""> </span><span style="color: #D69D85;line-height: 26px;"><span leaf="">http://localhost:11434</span></span><span leaf=""> </span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 本地运行保持默认</span></span><span leaf=""><br></span><span leaf=""> </span><span style="color: #9CDCFE;line-height: 26px;"><span leaf="">model:</span></span><span leaf=""> </span><span style="color: #D69D85;line-height: 26px;"><span leaf="">qwen2.5:latest</span></span><span leaf=""> </span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 使用 ollama list 查看的模型名称</span></span><span leaf=""><br></span><span leaf=""> </span><span style="color: #9CDCFE;line-height: 26px;"><span leaf="">temperature:</span></span><span leaf=""> </span><span style="color: #B8D7A3;line-height: 26px;"><span leaf="">0.7</span></span><span leaf=""> </span><span style="color: #57A64A;font-style: italic;line-height: 26px;"><span leaf=""># 控制回答随机性</span></span><span leaf=""><br></span></code></pre> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">4. 配置其他模块</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">本项目默认使用 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">sherpa-onnx-asr</span></code><span leaf=""> 和 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">edgeTTS</span></code><span leaf="">,并关闭翻译功能。如果需要修改,可参考相关配置指南。</span></p> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">5. 启动项目</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">运行后端服务:</span></p> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">uv run run_server.py</span><span leaf=""><br></span></code></pre> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">运行成功后,访问 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">http://localhost:12393</span></code><span leaf=""> 打开 Web 界面。</span></p> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">如果需要桌面应用程序,可从 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">Open-LLM-VTuber-Web Releases</span></code><span leaf=""> 下载对应平台的 Electron 客户端。</span></p> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">Open-LLM-VTuber-Web Releases</span></strong><span leaf="">:</span><span leaf="">https://github.com/Open-LLM-VTuber/Open-LLM-VTuber-Web/releases</span> </section></li> </ul> <h2 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;font-size: 20px;font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(241,147,156);"><span leaf="">常见问题</span></span></h2> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">如果项目目录下没有 </span><code><span leaf="">conf.yaml</span></code><span leaf=""> 文件</span></span><span style="display: none;"></span></h3> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">运行以下命令生成配置文件:</span></p> <pre data-tool="markdown.com.cn编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #1E1E1E;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg qam7hebaujsiaicdqo9mwokra7y0uaicoliaovibwteoagjhduk6nww73gyoiaajsib8mlpyvm0grmubia7nbdyhjtibg1wseqgszgd0k 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #DCDCDC;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #1E1E1E;border-radius: 5px;"><span leaf="">uv run run_server.py</span><span leaf=""><br></span></code></pre> <h3 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;"><span style="display: none;"></span><span style="font-size: 18px;"><span leaf="">如果遇到 </span><code><span leaf="">Error calling the chat endpoint...</span></code><span leaf=""> 错误</span></span><span style="display: none;"></span></h3> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">检查 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">http://localhost:11434/</span></code><span leaf=""> 是否能正常访问。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">使用 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(271,93,108);"><span leaf="">ollama list</span></code><span leaf=""> 确认模型名称是否正确。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <span leaf="">确保代理软件已绕过本地地址。</span> </section></li> </ul> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">通过以上步骤,你已经成功运行了 Open-LLM-VTuber 项目!</span></p> <h1 data-tool="markdown.com.cn编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;border-bottom: 2px solid rgb(241,147,156);font-size: 1.2em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: normal;background: rgb(241,147,156);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;font-weight: bolder;"><span leaf="">资源</span></span></h1> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;font-size: 14px;" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;"> <strong style="font-weight: border;color: rgb(236,90,101);"><span leaf="">GitHub 仓库</span></strong><span leaf="">:</span><span leaf="">https://github.com/t41372/Open-LLM-VTuber</span> </section></li> </ul> <hr style="margin: 0;margin-top: 10px;margin-bottom: 10px;height: 1px;padding: 0;border: none;border-top: medium solidid #333;text-align: center;background-image: linear-gradient(to right,rgba(248,57,41,0),rgba(248,57,41,0.75),rgba(248,57,41,0));"> <p data-tool="markdown.com.cn编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0em;font-size: 15px;"><span leaf="">❤️ 如果你也关注 AI 的发展现状,且对 AI 应用开发感兴趣,我会每日分享大模型与 AI 领域的开源项目和应用,提供运行实例和实用教程,帮助你快速上手AI技术!</span></p> <section class="mp_profile_iframe_wrp" nodeleaf=""> <mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="蚝油菜花" data-alias="AirmomoAI" data-from="0" data-headimg="http://mmbiz.qpic.cn/sz_mmbiz_png/RicBBpH0nW1vw8IoIOhRX2EWpsggrPVScjjaoeDB4hWLvlI95fTqvWUuLE1L5Qq9fwSyVCN3omHqKAWmV2lPI9g/0?wx_fmt=png" data-signature="每日分享大模型与AI领域的热门应用,提供开源实例和实用教程,帮助你快速上手AI技术。" data-id="MzkyMzc2MDY1OA==" data-is_biz_ban="0" data-service_type="1"></mp-common-profile> </section> </section> <p style="display: none;"> <mp-style-type data-value="3"></mp-style-type></p>
作者:微信小助手
<section data-tool="MDX Notes" data-website="https://mdxnotes.com/" style="line-height: 1.75;font-size: 16px;padding: 0 8px;word-spacing: 0px;letter-spacing: 0px;word-break: break-word;word-wrap: break-word;"> <p data-line="1" style="margin-top: 16px;margin-bottom: 16px;"><span leaf="">随着AI技术的飞速发展,开发者选择合适的智能平台至关重要。本文以表格形式深入对比Coze、Dify、FastGPT和MaxKB四大平台的技术架构与能力特点,帮助你快速找到最合适的解决方案。</span></p> <h2 data-line="3" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: var(--weui-FG-0);font-size: 22px;"><span leaf="">1、技术架构对比</span></h2> <table style="display: table;width: auto;table-layout: auto;text-align: left;margin-top: 2em;margin-bottom: 2em;font-size: 0.875rem;line-height: 1.25rem;border-spacing: 0;border: 1px solid var(--weui-FG-3);border-collapse: collapse;"> <thead> <tr style="border: 0;"> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">平台</span> </section></th> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">架构模式</span> </section></th> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">核心技术</span> </section></th> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">部署方式</span> </section></th> </tr> </thead> <tbody> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">FastGPT</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">微服务架构(Node.js+React)</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">DAG可视化Flow Engine,混合索引(关键词+向量)</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Docker Compose私有化部署</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Dify</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">BaaS架构(Dataset-LLM-App)</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">OneAPI协议,Celery异步任务处理</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Kubernetes水平扩展</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Coze</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">云原生架构(WebAssembly+MLaaS)</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">NLU引擎、状态机管理、WebSocket插件热加载</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">仅提供云服务</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">MaxKB</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">企业知识管理</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">多模型集成、混合检索、模块化设计</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">私有化部署、API开放对接</span> </section></td> </tr> </tbody> </table> <h2 data-line="12" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: var(--weui-FG-0);font-size: 22px;"><span leaf="">2、模型能力对比</span></h2> <table style="display: table;width: auto;table-layout: auto;text-align: left;margin-top: 2em;margin-bottom: 2em;font-size: 0.875rem;line-height: 1.25rem;border-spacing: 0;border: 1px solid var(--weui-FG-3);border-collapse: collapse;"> <thead> <tr style="border: 0;"> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">平台</span> </section></th> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">模型支持</span> </section></th> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">场景特点</span> </section></th> </tr> </thead> <tbody> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">FastGPT</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">LoRA微调,OpenAI兼容API</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">深度定制化,自建模型</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Dify</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">OneAPI、LiteLLM</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">快速迭代,多模型切换</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Coze</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">自研API网关</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">电商图像理解、高并发</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">MaxKB</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">开源+商用模型兼容</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">企业知识管理、精准问答</span> </section></td> </tr> </tbody> </table> <h2 data-line="21" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: var(--weui-FG-0);font-size: 22px;"><span leaf="">3、工作流引擎对比</span></h2> <table style="display: table;width: auto;table-layout: auto;text-align: left;margin-top: 2em;margin-bottom: 2em;font-size: 0.875rem;line-height: 1.25rem;border-spacing: 0;border: 1px solid var(--weui-FG-3);border-collapse: collapse;"> <thead> <tr style="border: 0;"> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">平台</span> </section></th> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">工作流实现</span> </section></th> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">特殊优势</span> </section></th> </tr> </thead> <tbody> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">FastGPT</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">JSON Schema,Trace调试</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Python代码节点灵活注入</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Dify</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Blockly低代码,Swagger API文档</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">LLM缓存,节省Token</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Coze</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">状态图对话流管理</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">快速多轮对话,缺乏深度调试</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">MaxKB</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">可视化知识流程自动化管理</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">企业流程自动化与内容管理</span> </section></td> </tr> </tbody> </table> <h2 data-line="30" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: var(--weui-FG-0);font-size: 22px;"><span leaf="">4、知识库构建与优化</span></h2> <table style="display: table;width: auto;table-layout: auto;text-align: left;margin-top: 2em;margin-bottom: 2em;font-size: 0.875rem;line-height: 1.25rem;border-spacing: 0;border: 1px solid var(--weui-FG-3);border-collapse: collapse;"> <thead> <tr style="border: 0;"> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">平台</span> </section></th> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">技术实现</span> </section></th> <th style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;color: var(--weui-FG-0);background-color: #fafafa;font-weight: bold;min-width: 85px;"> <section> <span leaf="">优势</span> </section></th> </tr> </thead> <tbody> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">FastGPT</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Elasticsearch+FAISS混合索引</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">查询优化,私有部署灵活</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Dify</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Pinecone向量数据库</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">增量更新,适合运营</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">Coze</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">自研分布式索引</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">电商结构化数据精准抽取</span> </section></td> </tr> <tr style="border: 0;"> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">MaxKB</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">多数据源统一接入</span> </section></td> <td style="border: 0;border-bottom: 1px solid var(--weui-FG-3);font-size: 16px;padding: 10px;text-align: left;min-width: 85px;"> <section> <span leaf="">权限精细化,企业级知识库</span> </section></td> </tr> </tbody> </table> <h2 data-line="39" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: var(--weui-FG-0);font-size: 22px;"><span leaf="">5、生态支持与开发者服务</span></h2> <p data-line="46" style="margin-top: 16px;margin-bottom: 16px;"><span leaf="">| 平台 | 生态特点 | 开发者支持 | | ------- | ---------------- | ---------****----------------- | | FastGPT | 开源社区活跃 | 企业深度定制,商业支持有限 | | Dify | 云市场模板丰富 | 快速商业应用落地 | | Coze | 绑定字节跳动生态 | 直播互动、内容创作者变现 | | MaxKB | 企业服务体系完善 | 强大的客户支持,定制化服务 |</span></p> <h2 data-line="48" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: var(--weui-FG-0);font-size: 22px;"><span leaf="">6、技术选型建议</span></h2> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: disc;" class="list-paddingleft-1"> <li><strong data-line="50" style="font-weight: bold;"><span leaf="">企业深度定制场景</span></strong> <section> <span leaf="">(如金融、医疗知识库):</span><strong data-line="50" style="font-weight: bold;"><span leaf="">FastGPT</span></strong> </section></li> <li><strong data-line="51" style="font-weight: bold;"><span leaf="">跨境电商、多语言客服</span></strong> <section> <span leaf="">:</span><strong data-line="51" style="font-weight: bold;"><span leaf="">Dify</span></strong> </section></li> <li><strong data-line="52" style="font-weight: bold;"><span leaf="">高并发对话(电商导购、直播互动)</span></strong> <section> <span leaf="">:</span><strong data-line="52" style="font-weight: bold;"><span leaf="">Coze</span></strong> </section></li> <li><strong data-line="53" style="font-weight: bold;"><span leaf="">企业知识管理与精准问答</span></strong> <section> <span leaf="">:</span><strong data-line="53" style="font-weight: bold;"><span leaf="">MaxKB</span></strong> </section></li> </ul> <p data-line="55" style="margin-top: 16px;margin-bottom: 16px;"><span leaf="">[FastGPT - 企业级智能AI模型问答知识库]</span><span data-href="https://fastgpt.cn/zh" style="text-decoration: none;color: var(--weui-LINK);word-wrap: break-word;font-weight: 600;"><span leaf="">https://fastgpt.cn/zh</span></span></p> <section data-line="57" style="margin-top: 16px;margin-bottom: 16px;" nodeleaf=""> <img class="rich_pages wxw-img" data-imgfileid="100000532" src="/upload/701fdbd90fbd84f0bec5b12eb42f39c4.png" data-type="png" style="display: block;max-width: 100%;border-radius: 4px;"> </section> <p data-line="59" style="margin-top: 16px;margin-bottom: 16px;"><span leaf="">[Dify.AI · 生成式 AI 应用创新引擎]</span><span data-href="https://dify.ai/zh" style="text-decoration: none;color: var(--weui-LINK);word-wrap: break-word;font-weight: 600;"><span leaf="">https://dify.ai/zh</span></span></p> <section style="text-align: center;" nodeleaf=""> <img class="rich_pages wxw-img" data-imgfileid="100000533" data-s="300,640" src="/upload/2cb1cd66b2e660553dbf9a7584631781.png" data-type="png" type="block"> </section> <p data-line="63" style="margin-top: 16px;margin-bottom: 16px;"><span leaf="">[扣子]</span><span data-href="https://www.coze.cn/" style="text-decoration: none;color: var(--weui-LINK);word-wrap: break-word;font-weight: 600;"><span leaf="">https://www.coze.cn/</span></span></p> <section style="text-align: center;" nodeleaf=""> <img class="rich_pages wxw-img" data-imgfileid="100000535" data-s="300,640" src="/upload/81b0e0a458be3ce6005f8ff7266b3d81.png" data-type="png" type="block"> </section> <p data-line="67" style="margin-top: 16px;margin-bottom: 16px;"><span leaf="">[MaxKB - 基于大模型和 RAG 的知识库问答系统 - 官网]</span><span data-href="https://maxkb.cn/" style="text-decoration: none;color: var(--weui-LINK);word-wrap: break-word;font-weight: 600;"><span leaf="">https://maxkb.cn/</span></span></p> <section data-line="69" style="margin-top: 16px;margin-bottom: 16px;" nodeleaf=""> <img class="rich_pages wxw-img" data-imgfileid="100000531" src="/upload/5d699cb12dc9a15155a24e2682e064d2.png" data-type="png" style="display: block;max-width: 100%;border-radius: 4px;"> </section> <h2 data-line="73" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: var(--weui-FG-0);font-size: 22px;"><span leaf="">7、总结与展望</span></h2> <p data-line="75" style="margin-top: 16px;margin-bottom: 16px;"><span leaf="">Coze、Dify、FastGPT、MaxKB分别代表AI智能平台的不同技术范式与场景实践。未来,跨平台的联邦式架构将是新趋势。开发者应根据自身技术储备与业务需求,合理选择最佳平台,拥抱AI时代的无限可能。</span></p> </section> <section> <span leaf=""><br></span> </section> <p style="display: none;"> <mp-style-type data-value="3"></mp-style-type></p>
作者:微信小助手
<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;font-family: Optima, 'Microsoft YaHei', PingFangSC-regular, serif;font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;word-spacing: 0em;letter-spacing: 0em;word-break: break-word;overflow-wrap: break-word;text-align: left;"> <h1 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 24px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">写在前面</span></span><span style="display: none;"></span></h1> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">在讲RAG之前,我们先说一个大模型的普遍现象,大家应该都用过大模型了,比如 ChatGPT、DeepSeek、豆包、文心一言等等…</span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">那么大家在用的时候其实会发现,有时候大模型会乱回答,</span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">一本正经地胡说八道,语义不同,前言不搭后语。</span></strong></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">举个例子:你问大模型,美国成立时间。</span></strong><span leaf="">大模型可能会回答:美国成立在1997年,距离现在已有400年的历史…</span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">这种现象叫hallucination,幻觉。大模型本质的就是不断的预测下一个生成的文字应该是什么,而选择预测概率中最大的一个。</span></p> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img alt="在这里插入图片描述" class="rich_pages wxw-img" data-imgfileid="100001579" src="/upload/dc1cd8002c4d940b37f8c1be2d5b36d6.png" data-type="png" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;"></span> <figcaption style="color: rgb(136, 136, 136);font-size: 14px;line-height: 1.5em;letter-spacing: 0em;text-align: center;font-weight: normal;margin-top: 5px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"> <span leaf="">每个词预测的结果</span> </figcaption> </figure> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">产生幻觉的原因有很多,</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">比如训练大模型本身的数据问题、过拟合、微调引起的知识丧失、推理机制的不完善等等</span></code><span leaf="">…</span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">而我们要说的RAG就是</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">为了降低大模型出现幻觉的概率</span></code><span leaf="">,下面开始我们今天的主题。</span></p> <h1 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 24px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">RAG简介</span></span><span style="display: none;"></span></h1> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">RAG(Retrieval-Augmented Generation,检索增强生成)</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf=""><span textstyle="" style="font-weight: bold;">是一种结合信息检索与文本生成的技术,旨在提升大语言模型在回答专业问题时的准确性和可靠性。</span></span></code><span leaf=""><img alt="在这里插入图片描述" class="rich_pages wxw-img" data-imgfileid="100001582" src="/upload/f0b9b0638f506757a975a74870706443.png" data-type="png" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;"></span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""></span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">核心原理</span></strong><span leaf="">为 </span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">检索</span></code></strong><span leaf=""> + </span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">生成</span></code></strong><span leaf=""> 两阶段流程 :</span></p> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf=""></span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">检索阶段</span></strong><span leaf="">:将用户的问题转化为向量,从外部知识库或私有文档中(向量数据库)快速检索相关片段。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf=""></span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">生成阶段</span></strong><span leaf="">:将检索到的信息输入大模型,生成结合上下文的具体回答。</span> </section></li> </ul> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">这样说可能比较生硬,打个比方:LLM在考试的时候面对陌生的领域,只会写一个解字(因为LLM也只是局限于特定的数据集进行训练),然后就准备放飞自我了,而此时RAG给了亿些提示,让LLM懂了开始往这个提示的方向做,最终考试的正确率从60%到了90%!</span></p> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img alt="在这里插入图片描述" class="rich_pages wxw-img" data-imgfileid="100001578" src="/upload/da0eb5efcd7a34d0c6b2303876e2dcfb.png" data-type="png" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;"></span> <figcaption style="color: rgb(136, 136, 136);font-size: 14px;line-height: 1.5em;letter-spacing: 0em;text-align: center;font-weight: normal;margin-top: 5px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"> <span leaf="">LLM+RAG</span> </figcaption> </figure> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">简单来说就是大家的</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">开卷考试</span></code><span leaf="">!!那么问题来了,LLM开卷考试的话,这个卷是啥呢?这里就涉及到</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">向量数据库</span></code><span leaf="">了。</span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">为什么是向量数据库?传统数据库为啥不行?</span></p> <h1 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 24px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">向量数据库</span></span><span style="display: none;"></span></h1> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">向量数据库是通过存储</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">文本的向量化</span></code><span leaf="">表示,支持基于</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">语义相似度的快速检索</span></code><span leaf="">, </span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">解决了传统关键词匹配无法捕捉上下文关联的问题。</span></strong></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">如果使用传统数据库(如MySQL)结合关键词检索,但无法实现语义理解,可能导致漏检或误检。 举个例子,同一个query进行搜索:“2024年腾讯的技术创新”。</span></p> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">向量数据库</span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">能匹配到语义相近但未包含关键词“腾讯”的文档(如“WXG的研发进展”)</span></strong> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">传统数据库</span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">只能匹配到包含关键词的</span></strong> </section></li> </ul> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><img alt="在这里插入图片描述" class="rich_pages wxw-img" data-imgfileid="100001581" src="/upload/0c5e8f442f2d8b52e6c0834a06665071.png" data-type="png" style="display:block;margin-top:0px;margin-right:auto;margin-bottom:0px;margin-left:auto;max-width:100%;width:558px;height:402px;">那向量数据库是怎么知道语义相似的?</span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">我们先明白</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">向量数据库存储的是向量,不是文本,文本是大家能看懂的文字,而向量是一串浮点型数据</span></code><span leaf="">。那么当所有的文本都成了浮点型数据后,</span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">计算机可以通过数学公式(比如余弦相似度),量化语义相似性。</span></strong><span leaf=""><img alt="在这里插入图片描述" class="rich_pages wxw-img" data-imgfileid="100001580" src="/upload/09a8bec0471ffd1af9d0da347da00fc5.png" data-type="png" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;">传统数据库用原始文本检索,则无法处理同义词、多义词、语境差异等语义问题(例如“苹果”可能指水果或公司),所以很多传统搜索都会进行query改写这一步,来让搜索的输入query更精确。当然不仅仅是文本,</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">万物皆可embedding</span></code><span leaf="">,图片、videos、音频等等…</span></p> <h1 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 24px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">RAG 过程</span></span><span style="display: none;"></span></h1> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img alt="在这里插入图片描述" class="rich_pages wxw-img" data-imgfileid="100001584" src="/upload/f0b9b0638f506757a975a74870706443.png" data-type="png" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;"></span> <figcaption style="color: rgb(136, 136, 136);font-size: 14px;line-height: 1.5em;letter-spacing: 0em;text-align: center;font-weight: normal;margin-top: 5px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"> <span leaf="">RAG过程</span> </figcaption> </figure> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">回到最开头的例子:</span></p> <ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">当用户对大模型提问,"美国的成立时间"</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">此时会通过embeding模型将文本转成向量</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">再到向量数据库中搜索语言相近的内容</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">向量数据库会给出一个TopK,例如 Top100</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">接着在进行过重排序模型,再筛选出Top N,例如 Top10</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">将搜索到的内容和用户所搜索的query词"美国的成立时间"整个成一个prompt一起给LLM</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">LLM基于这些输入内容和自身内容进行输出。</span> </section></li> </ol> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">这样就</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">可以有效的控制大模型输出尽可能的相关并且语义相通的内容</span></code><span leaf="">。</span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">那么向量数据库如何构造呢?<img alt="在这里插入图片描述" class="rich_pages wxw-img" data-imgfileid="100001583" src="/upload/ff129928157fd882c3061d381ffc599e.png" data-type="png" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;">其实很简单:</span></p> <ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">将文章进行分片成多组chunk,也就是大量文本分解为较小段</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">进行向量化</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"> <span leaf="">存到向量数据库</span> </section></li> </ol> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">那这里为什么要进行chunking呢?</span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">chunking是为了把相同语义的 token 聚集在一起,不同语义的 token 互相分开,在长文档中各个片段的语义可能存在较大差异,如果将整个文档作为一个整体进行知识检索,会导致语义杂揉,影响检索效果。 将长文档切分成多个小块,可以使得每个小块内部表意一致,块之间表意存在多样性,从而更充分地发挥知识检索的作用。</span></strong></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">所以如果我们的块太小会导致错过真正的相关内容,太大则可能导致搜索结果不准确</span></strong></p> <h1 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 24px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">参考</span></span><span style="display: none;"></span></h1> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">[1] https://aws.amazon.com/what-is/retrieval-augmented-generation/ </span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">[2] https://blog.csdn.net/2301_78285120/article/details/144360003</span></p> </section> <section> <span leaf=""><br></span> </section> <p style="display: none;"> <mp-style-type data-value="3"></mp-style-type></p>
作者:微信小助手
<section> <span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">需求:企业在搭建 RAG 知识库的时候,选择合适的 Embedding 嵌入模型很重要,Embedding 的性能决定了检索的准确性,也间接决定了大模型输出的可信度。常用模型:bge、m3e、nomic-embed-text、BCEmbedding(网易有道)。</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-weight: 700;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-size: 18px;"><span leaf="">为什么需要嵌入模型</span></span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">计算机本质上只能处理数字运算,无法直接理解自然语言、文字、图片、音频等非数值形式的数据。因此,我们需要通过“向量化”操作,将这些数据转化为计算机可以理解和处理的数值形式,即映射为数学上的向量表示。这一过程通常借助嵌入模型(Embedding Model)来实现,它可以有效地捕捉数据中的语义信息和内在结构。</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">嵌入模型的作用在于,它不仅能够将离散的数据(如单词、图像片段或音频片段)转换为连续的低维向量,还能在向量空间中保留数据之间的语义关系。例如,在自然语言处理中,嵌入模型可以生成词向量,使得语义相似的单词在向量空间中距离更近。这种高效的表示方式使计算机能够基于这些向量进行复杂的计算与分析,从而更好地理解与处理文本、图像或声音等复杂数据。</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">通过嵌入模型的向量化操作,计算机不仅可以高效地处理大规模数据,还能在各种任务中(如分类、检索、生成等)展现出更强的性能和泛化能力。</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-weight: 700;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-size: 18px;"><span leaf="">嵌入模型评测</span></span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">要判断一个嵌入模型的好坏,必须有一套明确的标准。通常使用 MTEB 和 C-MTEB 进行基准测试。</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-weight: 700;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">MTEB</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">Huggingface有一个MTEB(Massive Multilingual Text Embedding Benchmark)评测标准是一个业界比较公认的标准,可以作为参考。涵盖了8个嵌入任务,共58个数据集和112种语言,是目前迄今为止最全面的文本嵌入基准。</span></span><span leaf=""><br></span><span leaf=""><br></span> </section> <section> <span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">排行榜:</span></span><span leaf="">https://huggingface.co/spaces/mteb/leaderboard</span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">GitHub 地址:</span></span><span leaf="">https://github.com/embeddings-benchmark/mteb</span><span leaf=""><br></span><span leaf=""><br></span> </section> <section> <span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-weight: 700;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">C-MTEB</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">C-MTEB是当前最全面的中文语义向量评测基准,涵盖6大类评测任务(检索、排序、句子相似度、推理、分类、聚类)和 35 个数据集。</span></span><span leaf=""><br></span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">C-MTEB论文:</span></span><span leaf="">https://arxiv.org/abs/2309.07597</span><span leaf=""><br></span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">代码和排行榜:</span></span><span leaf="">https://github.com/FlagOpen/FlagEmbedding/tree/master/research/C_MTEB</span><span style="margin: 0px;padding: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;word-break: break-all !important;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;color: rgb(68, 68, 68);font-family: Tahoma, " microsoft yahei, simsun;font-size: 14px;background-color: rgb(255, 255, 255);><span leaf="">,(网上很多地址是旧的)</span></span><span leaf=""><br></span><span leaf=""><br></span> </section>
作者:微信小助手
<section class="mp_profile_iframe_wrp" style="text-wrap: wrap;letter-spacing: 0.578px;" nodeleaf=""> <mp-common-profile class="custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="AIGC创想者" data-from="2" data-headimg="http://mmbiz.qpic.cn/sz_mmbiz_png/YV7AAYWzu1DnAib9qD8BEmuuFH4EapALDCl8XPwdJwiahtDqN3XsdmLv6besyWfEnADe3BO5lw3Y9Jg1GKIJWe0A/0?wx_fmt=png" data-signature="拥抱科技创新,拥抱AI,探索无限可能!" data-id="MzkzODY1MTQzOQ=="></mp-common-profile> </section> <section style="text-wrap: wrap;letter-spacing: 0.578px;text-align: center;"> <span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);></span> </section> <section style="text-wrap: wrap;letter-spacing: 0.578px;text-align: center;"> <strong style="font-size: inherit;background-color: rgb(255, 255, 255);color: inherit;outline: 0px;font-family: " helvetica neue, helvetica, microsoft yahei, hiragino sans gb, arial, sans-serif;letter-spacing: 0.5px;word-spacing: 1px;line-height: inherit;visibility: visible;></strong><span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);></span><span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);><span leaf="">欢迎</span></span><strong style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);><span leaf="">关注</span></strong><span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);><span leaf="">我,持续获取更多内容,感谢</span></span><strong style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);><span leaf="">赞</span></strong><span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);><span leaf="">&</span></span><strong style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);><span leaf="">在看</span></strong><span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);><span leaf="">~</span></span> </section> <section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="margin-top: 0px;margin-bottom: 0px;margin-left: 4px;margin-right: 4px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;font-family: Optima, 'Microsoft YaHei', PingFangSC-regular, serif;font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;word-spacing: 0em;letter-spacing: 0em;word-break: break-word;overflow-wrap: break-word;text-align: left;"> <h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(34, 34, 34);line-height: 1.8em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 5px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(248, 57, 41);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">ebook2audiobook 简介</span></span><span style="display: none;"></span></h2> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 14px;line-height: 2.1em;letter-spacing: 0.06em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 16px;padding-left: 0px;padding-right: 0px;"><span style="color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">ebook2audiobook</span></span><sup style="line-height: 0;color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">[1]</span></sup><span leaf=""> 是一个将电子书转换为有声书的工具,支持多种语言(超过 1107 种)和语音克隆功能。它通过动态 AI 模型和语音合成技术,将电子书内容转换为带有章节和元数据的有声书。</span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 14px;line-height: 2.1em;letter-spacing: 0.06em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 16px;padding-left: 0px;padding-right: 0px;"><span leaf="">它的目标是为用户提供一种便捷的方式来享受有声阅读体验,同时支持多种电子书格式和输出格式。</span></p> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100008799" data-ratio="0.5953703703703703" src="/upload/b8cae0ad6f143782b1e07a4b1237de87.png" data-type="png" data-w="1080" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(219, 211, 211, 0.7) 5px 5px 10px 5px;"></span> </figure> <h3 data-tool="mdnice编辑器" style="background-color: rgb(251, 251, 251);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 16px;color: rgb(250, 250, 250);background-color: rgb(33, 33, 34);line-height: 2.4em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 15px;padding-right: 30px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 40px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">项目特点</span></span><span style="display: none;"></span></h3> <h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span data-cacheurl="" data-remoteid="" style="background-attachment: scroll;background-clip: border-box;background-color: transparent;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: 15px 15px;width: 15px;height: 15px;align-items: unset;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: 0px;margin-bottom: -2px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;background-image: url(" https: mmbiz.qpic.cn sz_mmbiz_png yv7aaywzu1aw6vzwcf3wjejgeox93fghavtq7edtcqnjlodiccnyzs7g7mofq9cnsy0kklzsgpkoivutv40iappa 640?wx_fmt="png&from=appmsg");""></span><span style="display: none;"></span><span style="font-size: 16px;color: rgb(72, 179, 120);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 8px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">主要特点</span></span><span style="display: none;"></span></h4> <ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">电子书格式支持</span></strong><span leaf="">:支持多种电子书格式,如 </span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">.epub</span></code><span leaf="">、</span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">.pdf</span></code><span leaf="">、</span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">.mobi</span></code><span leaf="">、</span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">.txt</span></code><span leaf=""> 等。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">多语言支持</span></strong><span leaf="">:支持超过 1107 种语言,包括但不限于英语、中文、阿拉伯语、法语等。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">语音克隆功能</span></strong><span leaf="">:用户可以使用自己的语音文件进行语音克隆,生成个性化的有声书。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">高质量语音合成</span></strong><span leaf="">:使用 Coqui XTTSv2、Fairseq 等技术,提供高质量的语音合成效果。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">章节分割</span></strong><span leaf="">:自动将电子书内容分割为章节,便于有声书的组织和播放。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">硬件适配</span></strong><span leaf="">:支持 CPU、GPU 和 Apple Silicon 等多种硬件平台。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">Docker 支持</span></strong><span leaf="">:提供 Docker 镜像,方便用户在不同环境中运行。</span> </section></li> </ol> <h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span data-cacheurl="" data-remoteid="" style="background-attachment: scroll;background-clip: border-box;background-color: transparent;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: 15px 15px;width: 15px;height: 15px;align-items: unset;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: 0px;margin-bottom: -2px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;background-image: url(" https: mmbiz.qpic.cn sz_mmbiz_png yv7aaywzu1aw6vzwcf3wjejgeox93fghavtq7edtcqnjlodiccnyzs7g7mofq9cnsy0kklzsgpkoivutv40iappa 640?wx_fmt="png&from=appmsg");""></span><span style="display: none;"></span><span style="font-size: 16px;color: rgb(72, 179, 120);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 8px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">使用场景</span></span><span style="display: none;"></span></h4> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">个人阅读</span></strong><span leaf="">:将电子书转换为有声书,方便在开车、运动或休息时收听。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">多语言学习</span></strong><span leaf="">:通过语音克隆和多语言支持,帮助用户学习不同语言的发音和表达。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">内容创作</span></strong><span leaf="">:为播客、有声读物创作者提供素材生成工具。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">企业应用</span></strong><span leaf="">:用于生成有声内容,如有声教程、有声广告等。</span> </section></li> </ul> <h3 data-tool="mdnice编辑器" style="background-color: rgb(251, 251, 251);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 16px;color: rgb(250, 250, 250);background-color: rgb(33, 33, 34);line-height: 2.4em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 15px;padding-right: 30px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 40px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">项目使用</span></span><span style="display: none;"></span></h3> <h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span data-cacheurl="" data-remoteid="" style="background-attachment: scroll;background-clip: border-box;background-color: transparent;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: 15px 15px;width: 15px;height: 15px;align-items: unset;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: 0px;margin-bottom: -2px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;background-image: url(" https: mmbiz.qpic.cn sz_mmbiz_png yv7aaywzu1aw6vzwcf3wjejgeox93fghavtq7edtcqnjlodiccnyzs7g7mofq9cnsy0kklzsgpkoivutv40iappa 640?wx_fmt="png&from=appmsg");""></span><span style="display: none;"></span><span style="font-size: 16px;color: rgb(72, 179, 120);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 8px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">安装与启动</span></span><span style="display: none;"></span></h4> <ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">克隆项目</span></strong><span leaf="">:</span> </section></li> </ol> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">git </span><span style="color: #e6c07b;line-height: 26px;"><span leaf="">clone</span></span><span leaf=""> https://github.com/DrewThomasson/ebook2audiobook.git</span><span leaf=""><br></span></code></pre> <ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">运行 Gradio Web 界面</span></strong><span leaf="">:</span> </section></li> </ol> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">Linux/MacOS</span></strong><span leaf="">:</span> </section></li> </ul> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">./ebook2audiobook.sh</span><span leaf=""><br></span></code></pre> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">Windows</span></strong><span leaf="">:</span> </section></li> </ul> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">.\ebook2audiobook.cmd</span><span leaf=""><br></span></code></pre> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">打开终端中提供的 URL,即可访问 Web 应用并开始转换电子书。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">如果需要生成公共链接,可在命令中添加 </span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">--share</span></code><span leaf=""> 参数。</span> </section></li> </ul> <ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">无头模式(Headless Mode)</span></strong><span leaf="">:</span> </section></li> </ol> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">Linux/MacOS</span></strong><span leaf="">:</span> </section></li> </ul> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">./ebook2audiobook.sh --headless --ebook <电子书路径> --voice <语音文件路径> --language <语言代码></span><span leaf=""><br></span></code></pre> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">Windows</span></strong><span leaf="">:</span> </section></li> </ul> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">.\ebook2audiobook.cmd --headless --ebook <电子书路径> --voice <语音文件路径> --language <语言代码></span><span leaf=""><br></span></code></pre> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">参数说明:</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">--ebook</span></code><span leaf="">:电子书文件路径。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">--voice</span></code><span leaf="">:语音克隆文件路径(可选)。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">--language</span></code><span leaf="">:语言代码(如 </span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">eng</span></code><span leaf=""> 表示英语,</span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">zh</span></code><span leaf=""> 表示中文)。</span> </section></li> </ul> <h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span data-cacheurl="" data-remoteid="" style="background-attachment: scroll;background-clip: border-box;background-color: transparent;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: 15px 15px;width: 15px;height: 15px;align-items: unset;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: 0px;margin-bottom: -2px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;background-image: url(" https: mmbiz.qpic.cn sz_mmbiz_png yv7aaywzu1aw6vzwcf3wjejgeox93fghavtq7edtcqnjlodiccnyzs7g7mofq9cnsy0kklzsgpkoivutv40iappa 640?wx_fmt="png&from=appmsg");""></span><span style="display: none;"></span><span style="font-size: 16px;color: rgb(72, 179, 120);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 8px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">自定义模型使用</span></span><span style="display: none;"></span></h4> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 14px;line-height: 2.1em;letter-spacing: 0.06em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 16px;padding-left: 0px;padding-right: 0px;"><span leaf="">用户可以上传自定义的语音合成模型(必须为 </span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">.zip</span></code><span leaf=""> 格式,包含必要的模型文件)。例如:</span></p> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">./ebook2audiobook.sh --headless --ebook <电子书路径> --voice <语音文件路径> --language <语言代码> --custom_model <自定义模型路径></span><span leaf=""><br></span></code></pre> <h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span data-cacheurl="" data-remoteid="" style="background-attachment: scroll;background-clip: border-box;background-color: transparent;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: 15px 15px;width: 15px;height: 15px;align-items: unset;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: 0px;margin-bottom: -2px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;background-image: url(" https: mmbiz.qpic.cn sz_mmbiz_png yv7aaywzu1aw6vzwcf3wjejgeox93fghavtq7edtcqnjlodiccnyzs7g7mofq9cnsy0kklzsgpkoivutv40iappa 640?wx_fmt="png&from=appmsg");""></span><span style="display: none;"></span><span style="font-size: 16px;color: rgb(72, 179, 120);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 8px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">Docker 使用</span></span><span style="display: none;"></span></h4> <ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">运行 Docker 容器:</span> </section></li> </ol> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">仅使用 CPU:</span> </section></li> </ul> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">docker run --rm -p 7860:7860 athomasson2/ebook2audiobook</span><span leaf=""><br></span></code></pre> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">使用 GPU 加速(仅限 NVIDIA):</span> </section></li> </ul> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">docker run --rm --gpus all -p 7860:7860 athomasson2/ebook2audiobook</span><span leaf=""><br></span></code></pre> <ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">构建 Docker 镜像:</span> </section></li> </ol> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">docker build --platform linux/amd64 -t athomasson2/ebook2audiobook .</span><span leaf=""><br></span></code></pre> <ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(0, 0, 0);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">无头模式运行:</span> </section></li> </ol> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">创建 </span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">input-folder</span></code><span leaf=""> 和 </span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">Audiobooks</span></code><span leaf=""> 文件夹,并将电子书文件放入 </span><code style="color: rgb(72, 179, 120);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">input-folder</span></code><span leaf=""> 中。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span leaf="">使用以下命令运行:</span> </section></li> </ul> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg anblvjpkybnqo4ktpplawhqviapamy3pibjebgjhfwu0fgcrdeopotzpiaamraqfmfdwaw7xbf58okqw8vx3n5hlib0yaxxkorcs 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">docker run --rm \</span><span leaf=""><br></span><span leaf="">-v $(</span><span style="color: #e6c07b;line-height: 26px;"><span leaf="">pwd</span></span><span leaf="">)/input-folder:/home/user/app/input_folder \</span><span leaf=""><br></span><span leaf="">-v $(</span><span style="color: #e6c07b;line-height: 26px;"><span leaf="">pwd</span></span><span leaf="">)/audiobooks:/home/user/app/audiobooks \</span><span leaf=""><br></span><span leaf="">athomasson2/ebook2audiobook \</span><span leaf=""><br></span><span leaf="">--headless --ebook /input_folder/<电子书文件名></span><span leaf=""><br></span></code></pre> <h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span data-cacheurl="" data-remoteid="" style="background-attachment: scroll;background-clip: border-box;background-color: transparent;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: 15px 15px;width: 15px;height: 15px;align-items: unset;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-top: 0px;margin-bottom: -2px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;background-image: url(" https: mmbiz.qpic.cn sz_mmbiz_png yv7aaywzu1aw6vzwcf3wjejgeox93fghavtq7edtcqnjlodiccnyzs7g7mofq9cnsy0kklzsgpkoivutv40iappa 640?wx_fmt="png&from=appmsg");""></span><span style="display: none;"></span><span style="font-size: 16px;color: rgb(72, 179, 120);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 8px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">其他功能</span></span><span style="display: none;"></span></h4> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">Hugging Face Space 演示</span></strong><span leaf="">:提供在线演示平台,用户可以通过 </span><span style="color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">Hugging Face Space</span></span><sup style="line-height: 0;color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">[2]</span></sup><span leaf=""> 试用。</span> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">Google Colab 支持</span></strong><span leaf="">:用户可以通过 </span><span style="color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">Google Colab</span></span><sup style="line-height: 0;color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">[3]</span></sup><span leaf=""> 免费试用,但可能会因超时而中断。</span> </section></li> </ul> <h3 data-tool="mdnice编辑器" style="background-color: rgb(251, 251, 251);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 16px;color: rgb(250, 250, 250);background-color: rgb(33, 33, 34);line-height: 2.4em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 15px;padding-right: 30px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 40px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">参考文档</span></span><span style="display: none;"></span></h3> <ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span style="color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">支持的语言详情</span></span><sup style="line-height: 0;color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">[4]</span></sup> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span style="color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">Docker 官方文档</span></span><sup style="line-height: 0;color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">[5]</span></sup> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span style="color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">Coqui XTTSv2 GitHub</span></span><sup style="line-height: 0;color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">[6]</span></sup> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 14px;line-height: 1.8em;letter-spacing: 0.06em;text-align: left;font-weight: normal;"> <span style="color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">Fairseq GitHub</span></span><sup style="line-height: 0;color: rgb(72, 179, 120);font-weight: bold;"><span leaf="">[7]</span></sup> </section></li> </ul> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100008800" data-ratio="0.9074074074074074" src="/upload/26192b25c33b77e95d1e504188622552.png" data-type="png" data-w="1080" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(219, 211, 211, 0.7) 5px 5px 10px 5px;"></span> </figure> <hr style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;"> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 14px;line-height: 2.1em;letter-spacing: 0.06em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 16px;padding-left: 0px;padding-right: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">注:本文内容仅供参考,具体项目特性请参照官方 GitHub 页面的最新说明。</span></strong><span leaf="">在线演示</span></p> <p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 14px;line-height: 2.1em;letter-spacing: 0.06em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 16px;padding-left: 0px;padding-right: 0px;"><span leaf="">欢迎</span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">关注&点赞&在看</span></strong><span leaf="">,感谢你的阅读~</span></p> <hr style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;"> <section data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;"> <span style="display: block;color: rgb(0, 0, 0);font-size: 18px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;"><span leaf="">资源列表</span></span> </section> <section data-tool="mdnice编辑器" style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;"> <span style="display: flex;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span style="line-height: 1.8em;letter-spacing: 0em;color: rgba(0, 0, 0, 0.6);display: inline;width: 10%;background-image: none;background-position-x: initial;background-position-y: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;background-color: initial;font-size: 80%;font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;padding-top: 2px;"><span leaf="">[1] </span></span><p style="text-align: left;text-indent: 0em;color: rgb(0, 0, 0);font-weight: bold;display: inline;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;word-break: break-all;flex-basis: 0%;flex-grow: 1;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span leaf="">Github地址: </span><em style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-weight: normal;font-style: italic;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">https://github.com/DrewThomasson/ebook2audiobook</span></em></p></span><span style="display: flex;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span style="line-height: 1.8em;letter-spacing: 0em;color: rgba(0, 0, 0, 0.6);display: inline;width: 10%;background-image: none;background-position-x: initial;background-position-y: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;background-color: initial;font-size: 80%;font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;padding-top: 2px;"><span leaf="">[2] </span></span><p style="text-align: left;text-indent: 0em;color: rgb(0, 0, 0);font-weight: bold;display: inline;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;word-break: break-all;flex-basis: 0%;flex-grow: 1;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span leaf="">Hugging Face Space 演示: </span><em style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-weight: normal;font-style: italic;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">https://huggingface.co/spaces/drewThomasson/ebook2audiobook</span></em></p></span><span style="display: flex;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span style="line-height: 1.8em;letter-spacing: 0em;color: rgba(0, 0, 0, 0.6);display: inline;width: 10%;background-image: none;background-position-x: initial;background-position-y: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;background-color: initial;font-size: 80%;font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;padding-top: 2px;"><span leaf="">[3] </span></span><p style="text-align: left;text-indent: 0em;color: rgb(0, 0, 0);font-weight: bold;display: inline;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;word-break: break-all;flex-basis: 0%;flex-grow: 1;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span leaf="">Google Colab 支持: </span><em style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-weight: normal;font-style: italic;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">https://colab.research.google.com/github/DrewThomasson/ebook2audiobook/blob/main/Notebooks/colab_ebook2audiobook.ipynb</span></em></p></span><span style="display: flex;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span style="line-height: 1.8em;letter-spacing: 0em;color: rgba(0, 0, 0, 0.6);display: inline;width: 10%;background-image: none;background-position-x: initial;background-position-y: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;background-color: initial;font-size: 80%;font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;padding-top: 2px;"><span leaf="">[4] </span></span><p style="text-align: left;text-indent: 0em;color: rgb(0, 0, 0);font-weight: bold;display: inline;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;word-break: break-all;flex-basis: 0%;flex-grow: 1;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span leaf="">支持的语言列表: </span><em style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-weight: normal;font-style: italic;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">https://dl.fbaipublicfiles.com/mms/tts/all-tts-languages.html</span></em></p></span><span style="display: flex;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span style="line-height: 1.8em;letter-spacing: 0em;color: rgba(0, 0, 0, 0.6);display: inline;width: 10%;background-image: none;background-position-x: initial;background-position-y: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;background-color: initial;font-size: 80%;font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;padding-top: 2px;"><span leaf="">[5] </span></span><p style="text-align: left;text-indent: 0em;color: rgb(0, 0, 0);font-weight: bold;display: inline;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;word-break: break-all;flex-basis: 0%;flex-grow: 1;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span leaf="">Docker 使用指南: </span><em style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-weight: normal;font-style: italic;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">https://docs.docker.com/</span></em></p></span><span style="display: flex;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span style="line-height: 1.8em;letter-spacing: 0em;color: rgba(0, 0, 0, 0.6);display: inline;width: 10%;background-image: none;background-position-x: initial;background-position-y: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;background-color: initial;font-size: 80%;font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;padding-top: 2px;"><span leaf="">[6] </span></span><p style="text-align: left;text-indent: 0em;color: rgb(0, 0, 0);font-weight: bold;display: inline;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;word-break: break-all;flex-basis: 0%;flex-grow: 1;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span leaf="">Coqui XTTSv2 文档: </span><em style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-weight: normal;font-style: italic;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">https://huggingface.co/coqui/XTTS-v2</span></em></p></span><span style="display: flex;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span style="line-height: 1.8em;letter-spacing: 0em;color: rgba(0, 0, 0, 0.6);display: inline;width: 10%;background-image: none;background-position-x: initial;background-position-y: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;background-color: initial;font-size: 80%;font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;padding-top: 2px;"><span leaf="">[7] </span></span><p style="text-align: left;text-indent: 0em;color: rgb(0, 0, 0);font-weight: bold;display: inline;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;word-break: break-all;flex-basis: 0%;flex-grow: 1;font-size: 14px;line-height: 1.8em;letter-spacing: 0em;"><span leaf="">Fairseq 文档: </span><em style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-weight: normal;font-style: italic;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf="">https://github.com/facebookresearch/fairseq/tree/main/examples/mms</span></em></p></span> </section> </section> <section style="text-wrap: wrap;letter-spacing: 0.578px;text-align: center;"> <span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);></span> </section> <section style="text-wrap: wrap;letter-spacing: 0.578px;text-align: center;"> <span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);></span> </section> <section style="text-wrap: wrap;letter-spacing: 0.578px;text-align: center;"> <span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);></span> </section> <section style="text-wrap: wrap;letter-spacing: 0.578px;text-align: center;"> <span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);></span> </section> <section style="text-wrap: wrap;letter-spacing: 0.578px;text-align: center;"> <span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);></span> </section> <section style="text-wrap: wrap;letter-spacing: 0.578px;text-align: center;"> <span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);></span> </section> <section style="text-wrap: wrap;letter-spacing: 0.578px;text-align: center;"> <span style="font-family: system-ui, -apple-system, " system-ui, helvetica neue, pingfang sc, hiragino sans gb, microsoft yahei ui, yahei, arial, sans-serif;font-size: 15px;letter-spacing: 1px;background-color: rgb(255, 255, 255);></span> </section> <p style="display: none;"> <mp-style-type data-value="3"></mp-style-type></p>
作者:微信小助手
<section> <span leaf=""><img src="/upload/08a263ede13d33448d78713510cc9d81.png" alt="图片" class="rich_pages wxw-img" data-ratio="0.125" data-w="640"></span> </section> <section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;font-family: Optima, 'Microsoft YaHei', PingFangSC-regular, serif;font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;word-spacing: 0em;letter-spacing: 0em;word-break: break-word;overflow-wrap: break-word;text-align: left;"> <p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">Meteor是在阿里Arthas基础上深度优化的应用诊断工具,定位为“线上问题定位神器”。</span></p> <p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">其核心目标是通过非侵入式动态追踪技术,帮助开发者在不重启服务的情况下,实时监控Java应用的运行状态,快速定位性能瓶颈、内存泄漏、线程死锁等问题。</span></p> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(53, 179, 120);line-height: 1.5em;letter-spacing: 0em;font-weight: bold;display: block;"><span leaf="">软件架构</span></span><span style="display: none;"></span></h3> <section data-tool="mdnice编辑器" style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;"> <table style="display:table;text-align:left;width:493px;"> <thead> <tr> <th data-colwidth="100" width="100" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.5em;letter-spacing: 0.04em;font-weight: bold;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;text-align: left;"> <section> <span leaf="">栏目</span> </section></th> <th data-colwidth="156" width="156" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.5em;letter-spacing: 0.04em;font-weight: bold;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;text-align: left;"> <section> <span leaf="">内容</span> </section></th> <th data-colwidth="237" width="237" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.5em;letter-spacing: 0.04em;font-weight: bold;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;text-align: left;"> <section> <span leaf="">备注</span> </section></th> </tr> </thead> <tbody> <tr style="color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;"> <td data-colwidth="100" width="100" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section style="font-size: 14px;"> <span leaf="">主体框架</span> </section></td> <td data-colwidth="156" width="156" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3rew23m4" style="font-size: 14px;" data-mpa-action-id="m8d3rewc24gg"> <span leaf="">SpringBoot</span> </section></td> <td data-colwidth="237" width="237" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3r9v3lq6" style="font-size: 14px;" data-mpa-action-id="m8d3r9vd11or"> <span leaf="">版本: 2.1.5.RELEASE</span> </section></td> </tr> <tr style="color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;"> <td data-colwidth="100" width="100" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section style="font-size: 14px;"> <span leaf="">前端</span> </section></td> <td data-colwidth="156" width="156" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3rij01ymo" style="font-size: 14px;" data-mpa-action-id="m8d3rija20k1"> <span leaf="">freemarker模板引擎</span> </section></td> <td data-colwidth="237" width="237" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section> <span leaf=""><br></span> </section></td> </tr> <tr style="color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;"> <td data-colwidth="100" width="100" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section style="font-size: 14px;"> <span leaf="">UI</span> </section></td> <td data-colwidth="156" width="156" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3rlao11fs" style="font-size: 14px;" data-mpa-action-id="m8d3rlax1ik1"> <span leaf="">ace</span> </section></td> <td data-colwidth="237" width="237" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3r665251k" style="font-size: 14px;" data-mpa-action-id="m8d3r66jhbj"> <span leaf="">WEB模板框架,项目的 resources/static/ace目录中</span> </section></td> </tr> <tr style="color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;"> <td data-colwidth="100" width="100" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section style="font-size: 14px;"> <span leaf="">Agent</span> </section></td> <td data-colwidth="156" width="156" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3rofcotf" style="font-size: 14px;" data-mpa-action-id="m8d3rofngqx"> <span leaf="">arthas</span> </section></td> <td data-colwidth="237" width="237" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3r3451jan" style="font-size: 14px;" data-mpa-action-id="m8d3r34e1pja"> <span leaf="">Agent用于数据的采集</span> </section></td> </tr> <tr style="color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;"> <td data-colwidth="100" width="100" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section style="font-size: 14px;"> <span leaf="">Proxy</span> </section></td> <td data-colwidth="156" width="156" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3rrtyiig" style="font-size: 14px;" data-mpa-action-id="m8d3rru8ld"> <span leaf="">tunnelserver</span> </section></td> <td data-colwidth="237" width="237" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3qzr11ls2" style="font-size: 14px;" data-mpa-action-id="m8d3qzrb22ut"> <span leaf="">用户Agent数据收集的代理</span> </section></td> </tr> <tr style="color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;"> <td data-colwidth="100" width="100" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section style="font-size: 14px;"> <span leaf="">SSH</span> </section></td> <td data-colwidth="156" width="156" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3rvtw79p" style="font-size: 14px;" data-mpa-action-id="m8d3rvu61ck"> <span leaf="">ganymed-ssh2</span> </section></td> <td data-colwidth="237" width="237" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3qwoe1b5h" style="font-size: 14px;" data-mpa-action-id="m8d3qwoo1sc1"> <span leaf="">ssh协议用于连接linux服务器</span> </section></td> </tr> <tr style="color: rgb(89, 89, 89);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;"> <td data-colwidth="100" width="100" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section style="font-size: 14px;" data-mpa-action-id="m8d3s29et4c"> <span leaf="">数据库</span> </section></td> <td data-colwidth="156" width="156" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3ryrrtff" style="font-size: 14px;" data-mpa-action-id="m8d3rys31eb4"> <span leaf="">H2</span> </section></td> <td data-colwidth="237" width="237" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;text-align: left;"> <section mpa-font-style="m8d3qtdt14yt" style="font-size: 14px;" data-mpa-action-id="m8d3qte514wc"> <span leaf="">用于Meteor-console的数据库</span> </section></td> </tr> </tbody> </table> </section> <h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">软件架构图:</span></span><span style="display: none;"></span></h5> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img src="/upload/cc238de33820c3e00ba5ed19764f4e6d.png" class="rich_pages wxw-img" data-ratio="0.735357917570499" data-type="png" data-w="461" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-imgfileid="100078995"></span> </figure> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(53, 179, 120);line-height: 1.5em;letter-spacing: 0em;font-weight: bold;display: block;"><span leaf="">快速上手</span></span><span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">1、执行</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">meteor-console</span></code><span leaf="">进行打包</span></p> <p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">2、运行</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">meteor-console-0.0.1-SNAPSHOT</span></code><span leaf="">,默认开启</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">8884</span></code><span leaf="">端口</span></p> <p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">执行命令:</span></p> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg wjibwkqn1bumbc0hh3ffs6q0agzykjpeviav9k1q9dsiazcuhdbvxy0wvpv9wbn195jbytovih7b90kawpf0sjvokgunmugdgrm 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">java -jar meteor-console-0.0.1-SNAPSHOT &</span><span leaf=""><br></span></code></pre> <p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">3、运行</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">meteor-plugin</span></code><span leaf="">中的</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">arthas-tunnel-server-xxx.jar</span></code><span leaf="">,启动了</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">7777</span></code><span leaf="">端口 和</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">8080</span></code><span leaf="">端口</span></p> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg wjibwkqn1bumbc0hh3ffs6q0agzykjpeviav9k1q9dsiazcuhdbvxy0wvpv9wbn195jbytovih7b90kawpf0sjvokgunmugdgrm 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">java -jar arthas-tunnel-server-xxx.jar &</span><span leaf=""><br></span></code></pre> <p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">如果不想使用</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">8080</span></code><span leaf="">端口,可以进行修改,如:</span><code style="color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;"><span leaf="">9999</span></code></p> <pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(" https: mmbiz.qpic.cn mmbiz_svg wjibwkqn1bumbc0hh3ffs6q0agzykjpeviav9k1q9dsiazcuhdbvxy0wvpv9wbn195jbytovih7b90kawpf0sjvokgunmugdgrm 640?wx_fmt="svg&from=appmsg");""></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">java -jar -Dserver.port=9999 arthas-tunnel-server-xxx.jar &</span><span leaf=""><br></span></code></pre> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(53, 179, 120);line-height: 1.5em;letter-spacing: 0em;font-weight: bold;display: block;"><span leaf="">功能列表</span></span><span style="display: none;"></span></h3> <h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">1.查询JVM中加载的类</span></span><span style="display: none;"></span></h5> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img src="/upload/2fb632272e33ee33ef93e75e2ac25ee7.png" class="rich_pages wxw-img" data-ratio="0.4575402635431918" data-type="png" data-w="1366" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-imgfileid="100078997"></span> </figure> <h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">2.代码在线编辑部署</span></span><span style="display: none;"></span></h5> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img src="/upload/20bfadf6099d9bf2074d930b52bf4ac1.png" class="rich_pages wxw-img" data-ratio="0.4575402635431918" data-type="png" data-w="1366" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-imgfileid="100078996"></span> </figure> <h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">3.方法监控</span></span><span style="display: none;"></span></h5> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img src="/upload/5a5ba6690c8ceb50b240a5390a9e1c3d.png" class="rich_pages wxw-img" data-ratio="0.4575402635431918" data-type="png" data-w="1366" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-imgfileid="100078999"></span> </figure> <h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">4.线程管理</span></span><span style="display: none;"></span></h5> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img src="/upload/db20cf3f82e347559825ac99b2ac3012.png" class="rich_pages wxw-img" data-ratio="0.4575402635431918" data-type="png" data-w="1366" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-imgfileid="100078998"></span> </figure> <h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">5.Dashboard</span></span><span style="display: none;"></span></h5> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <span leaf=""><img src="/upload/f0788864afca2d64b1d6437c9183c8c4.png" class="rich_pages wxw-img" data-ratio="0.4575402635431918" data-type="png" data-w="1366" style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-imgfileid="100079003"></span> </figure> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(53, 179, 120);line-height: 1.5em;letter-spacing: 0em;font-weight: bold;display: block;"><span leaf="">结语</span></span><span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">Meteor拥有强大的动态诊断能力,无论是应对突发的线上事故,还是进行深度的性能调优,它都能提供“手术刀”般的精准支持,是一款线上问题定位的神器。</span></p> <p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">如果你对它有兴趣,可以了解一下:</span></p> <blockquote style="margin-top: 20px;margin-bottom: 20px;margin-left: 0px;margin-right: 0px;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgb(53, 179, 120);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgb(251, 249, 253);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;display: block;overflow-x: auto;overflow-y: auto;"> <span style="display: none;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: normal;"></span> <p style="text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;color: rgb(89, 89, 89);font-size: 15px;line-height: 1.8em;letter-spacing: 0.04em;text-align: left;font-weight: normal;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;"><span leaf="">https://gitee.com/reywong/meteor</span></p> </blockquote> </section>