deploy: 86988e31d97db966d602d923fe425622a4103550
This commit is contained in:
commit
01c44329f4
5
404.html
Normal file
5
404.html
Normal file
@ -0,0 +1,5 @@
|
||||
<!doctype html><html lang=zh-cn dir=ltr><head><meta charset=utf-8><title>FastGPT</title><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="A Lightweight, Modern Documentation Theme for Hugo"><meta name=keywords content="Documentation,Hugo,Hugo Theme,Bootstrap"><meta name=author content="Colin Wilson - Lotus Labs"><meta name=email content="support@aigis.uk"><meta name=website content="https://lotusdocs.dev"><meta name=Version content="v0.1.0"><link rel=icon href=https://doc.tryfastgpt.ai/favicon.ico sizes=any><link rel=icon type=image/svg+xml href=https://doc.tryfastgpt.ai/favicon.svg><link rel=apple-touch-icon sizes=180x180 href=https://doc.tryfastgpt.ai/apple-touch-icon.png><link rel=icon type=image/png sizes=32x32 href=https://doc.tryfastgpt.ai/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=https://doc.tryfastgpt.ai/favicon-16x16.png><link rel=manifest crossorigin=use-credentials href=https://doc.tryfastgpt.ai/site.webmanifest><link rel=preconnect href=https://gstatic.loli.net/><link rel=preconnect href=https://gstatic.loli.net/ crossorigin><link href="https://fonts.loli.net/css?family=Inter:300,400,600,700|Fira+Code:500,700|JetBrains+Mono:500,700&display=block" rel=stylesheet><link rel=stylesheet href=/scss/style.min.030f48ac3f689f0ac3916ef65025d82203150b5c7c9f50fb53a189182f2bba573ee621e15d095bfaf5b4db3fe27170ea.css integrity=sha384-Aw9IrD9onwrDkW72UCXYIgMVC1x8n1D7U6GJGC8rulc+5iHhXQlb+vW02z/icXDq><script src=/js/bootstrap.1d45dfc5d2726b7dab81f4f79c8683c5c08ec8f539f18dcb6724d690f825bbaf320353147818f1376885a08a116e74b3.js integrity=sha384-HUXfxdJya32rgfT3nIaDxcCOyPU58Y3LZyTWkPglu68yA1MUeBjxN2iFoIoRbnSz defer></script>
|
||||
<script type=text/javascript src=https://doc.tryfastgpt.ai/js/image-compare.min.b181189e797ddef290813acdab2d11c521bedcf9d92918ad9a52a1670feb560b009b104b3d4498032b08821690b5ac32.js integrity=sha384-sYEYnnl93vKQgTrNqy0RxSG+3PnZKRitmlKhZw/rVgsAmxBLPUSYAysIghaQtawy></script></head><body><div><header id=topnav><div class="container d-flex justify-content-between align-items-center"><a class=logo aria-label=Home href=/><svg width="26" height="26" viewBox="0 0 1041 1348" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M340.837.33933 681.068.338989V.455643C684.032.378397 686.999.339702 689.967.339702 735.961.3397 781.504 9.62899 823.997 27.6772 866.49 45.7254 905.099 72.1791 937.622 105.528 970.144 138.877 995.942 178.467 1013.54 222.04 1031.14 265.612 1040.2 312.312 1040.2 359.474H340.836V1347.84C296.157 1347.84 251.914 1338.55 210.636 1320.49 169.357 1302.43 131.85 1275.95 100.257 1242.58 68.6636 1209.21 43.6023 1169.59 26.5041 1125.99 11.3834 1087.43 2.75216 1046.42.957956 1004.81H.605869L.605897 368.098H.70363c-.597878-26.267 1.53378-52.655 6.43943-78.687C20.2709 219.745 52.6748 155.754 100.257 105.528 147.839 55.3017 208.462 21.0975 274.461 7.24017 296.426 2.62833 318.657.339101 340.837.33933z" fill="url(#paint0_linear_1172_228)"/><path d="M633.639 904.645H513.029V576.37H635.422V576.377C678.161 576.607 720.454 585.093 759.951 601.37 799.997 617.874 836.384 642.064 867.033 672.559c30.65 30.495 54.963 66.698 71.55 106.542C955.171 818.944 963.709 861.648 963.709 904.775H633.639V904.645z" fill="url(#paint1_linear_1172_228)"/><defs><linearGradient id="paint0_linear_1172_228" x1="520.404" y1=".338989" x2="520.404" y2="1347.84" gradientUnits="userSpaceOnUse"><stop stop-color="#326dff"/><stop offset="1" stop-color="#8eaeff"/></linearGradient><linearGradient id="paint1_linear_1172_228" x1="738.369" y1="576.37" x2="738.369" y2="904.775" gradientUnits="userSpaceOnUse"><stop stop-color="#326dff"/><stop offset="1" stop-color="#8eaeff"/></linearGradient></defs></svg></a><div class="d-flex align-items-center"><div id=navigation><ul class="navigation-menu nav-right"><li><a href=/docs/>Docs</a></li></ul></div><ul class="social-link d-flex list-inline mb-0"><li class="list-inline-item mb-0"><a href=https://github.com/labring/FastGPT alt=github rel="noopener noreferrer" target=_blank><div class="btn btn-icon btn-landing border-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>GitHub</title><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37.0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44.0 0020 4.77 5.07 5.07.0 0019.91 1S18.73.65 16 2.48a13.38 13.38.0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07.0 005 4.77 5.44 5.44.0 003.5 8.55c0 5.42 3.3 6.61 6.44 7A3.37 3.37.0 009 18.13V22"/></svg></div></a></li></ul><div class="menu-extras ms-3 me-2"><div class=menu-item><button class="navbar-toggle btn btn-icon btn-soft-light" id=isToggle aria-label=toggleMenu onclick=toggleMenu()><div class=lines><span></span>
|
||||
<span></span>
|
||||
<span></span></div></button></div></div></div></div></header></div><div class=mb-4 id=content><div class="d-flex flex-column justify-content-center align-items-center four-oh-four"><div class=px-1><h1 class=text-center>Page not found :(</h1><h4 class=text-center>The page you are looking for doesn't exist or has been moved.</h4></div><div class=px-1><a href=/><i class="material-icons size-48 me-0">home</i></a></div></div></div><footer class="footer footer-light footer-bar"><div class=footer-py-30><div class="container text-center"><div class="row align-items-center"><div class=col-sm-6><div class=text-sm-start><p class=mb-0>© 2025 the FastGPT Authors.</p></div></div><div class="col-sm-6 mt-4 mt-sm-0 pt-2 pt-sm-0"></div></div></div></div></footer><script type=text/javascript src=https://doc.tryfastgpt.ai/js/bundle.min.d26bada42aacabf0a605636aba0bce9543bb24ed6b0f215dfa05077278d571a26b3e2cea8da2843e8256ffc49825559c.js integrity=sha384-0mutpCqsq/CmBWNqugvOlUO7JO1rDyFd+gUHcnjVcaJrPizqjaKEPoJW/8SYJVWc></script>
|
||||
<script>const viewers=document.querySelectorAll(".image-compare");let configs=[{addCircle:!0,addCircleBlur:!1,labelOptions:{after:"Light",before:"Dark",onHover:!1},showLabels:!0,startingPoint:50},{addCircle:!0,addCircleBlur:!1,controlColor:"#3C4257",labelOptions:{after:"Life Saver",before:"Inter",onHover:!1},showLabels:!0,startingPoint:25},{addCircle:!0,addCircleBlur:!0,labelOptions:{after:"Cardinal",before:"Blue",onHover:!1},showLabels:!0,startingPoint:25}];viewers.forEach((e,t)=>{let n=new ImageCompare(e,configs[t]).mount()})</script></body></html>
|
||||
BIN
android-chrome-192x192.png
Normal file
BIN
android-chrome-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
BIN
android-chrome-256x256.png
Normal file
BIN
android-chrome-256x256.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
BIN
android-chrome-512x512.png
Normal file
BIN
android-chrome-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
apple-touch-icon.png
Normal file
BIN
apple-touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
9
browserconfig.xml
Normal file
9
browserconfig.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
1
categories/index.xml
Normal file
1
categories/index.xml
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on FastGPT</title><link>https://doc.tryfastgpt.ai/categories/</link><description>Recent content in Categories on FastGPT</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://doc.tryfastgpt.ai/categories/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
44
docs/agreement/index.html
Normal file
44
docs/agreement/index.html
Normal file
File diff suppressed because one or more lines are too long
30
docs/agreement/index.xml
Normal file
30
docs/agreement/index.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>协议 on FastGPT</title><link>https://doc.tryfastgpt.ai/docs/agreement/</link><description>Recent content in 协议 on FastGPT</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://doc.tryfastgpt.ai/docs/agreement/index.xml" rel="self" type="application/rss+xml"/><item><title>开源协议</title><link>https://doc.tryfastgpt.ai/docs/agreement/open-source/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/agreement/open-source/</guid><description>FastGPT 项目在 Apache License 2.0 许可下开源,但包含以下附加条件:
|
||||
FastGPT 允许被用于商业化,例如作为其他应用的“后端即服务”使用,或者作为应用开发平台提供给企业。然而,当满足以下条件时,必须联系作者获得商业许可:
|
||||
多租户 SaaS 服务:除非获得 FastGPT 的明确书面授权,否则不得使用 tryfastgpt.ai 的源码来运营与 tryfastgpt.ai 服务类似的多租户 SaaS 服务。 LOGO 及版权信息:在使用 FastGPT 的过程中,不得移除或修改 FastGPT 控制台内的 LOGO 或版权信息。 请通过电子邮件 yujinlong@sealos.io 联系我们咨询许可事宜。
|
||||
作为贡献者,你必须同意将你贡献的代码用于以下用途:
|
||||
生产者有权将开源协议调整为更严格或更宽松的形式。 可用于商业目的,例如 FastGPT 的云服务。 除此之外,所有其他权利和限制均遵循 Apache License 2.0。如果你需要更多详细信息,可以参考 Apache License 2.0 的完整版本。本产品的交互设计受到外观专利保护。© 2023 Sealos.</description></item><item><title>服务协议</title><link>https://doc.tryfastgpt.ai/docs/agreement/terms/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/agreement/terms/</guid><description>最后更新时间:2024年3月3日
|
||||
FastGPT 服务协议是您与珠海环界云计算有限公司(以下简称“我们”或“本公司”)之间就FastGPT云服务(以下简称“本服务”)的使用等相关事项所订立的协议。请您仔细阅读并充分理解本协议各条款,特别是免除或者限制我们责任的条款、对您权益的限制条款、争议解决和法律适用条款等。如您不同意本协议任一内容,请勿注册或使用本服务。
|
||||
第1条 服务内容
|
||||
我们将向您提供存储、计算、网络传输等基于互联网的信息技术服务。 我们将不定期向您通过站内信、电子邮件或短信等形式向您推送最新的动态。 我们将为您提供相关技术支持和客户服务,帮助您更好地使用本服务。 我们将为您提供稳定的在线服务,保证每月服务可用性不低于99%。 第2条 用户注册与账户管理
|
||||
您在使用本服务前需要注册一个账户。您保证在注册时提供的信息真实、准确、完整,并及时更新。 您应妥善保管账户名和密码,对由此产生的全部行为负责。如发现他人使用您的账户,请及时修改账号密码或与我们进行联系。 我们有权对您的账户进行审查,如发现您的账户存在异常或违法情况,我们有权暂停或终止向您提供服务。 第3条 使用规则
|
||||
您不得利用本服务从事任何违法活动或侵犯他人合法权益的行为,包括但不限于侵犯知识产权、泄露他人商业机密等。 您不得通过任何手段恶意注册账户,包括但不限于以牟利、炒作、套现等目的。 您不得利用本服务传播任何违法、有害、恶意软件等信息。 您应遵守相关法律法规及本协议的规定,对在本服务中发布的信息及使用本服务所产生的结果承担全部责任。 我们禁止使用我们对接的模型服务生成可能对个人或社会造成伤害的内容。保障平台的安全性,是长期稳定运营的关键。如发现任何利用平台接入模型能力进行违规内容生成和使用,将立即封号,账号余额不退。违规内容包括但不限于: 剥削和虐待 禁止描述、展示或宣扬儿童性剥削或性虐待的内容,无论法律是否禁止。这包括涉及儿童或使儿童色情的内容。 禁止描述或用于培养儿童的内容。修饰是成年人以剥削,特别是性剥削为目的与儿童建立关系的行为。这包括以性剥削、贩运或其他形式剥削为目的与儿童交流。 未经同意的私密内容 服务禁止描述、提供或宣传未经同意的亲密活动的内容。 禁止描述、提供特征或宣传或用于招揽商业性活动和性服务的内容。这包括鼓励和协调真正的性活动。 禁止描述或用于人口贩运目的的内容。这包括招募人员、便利交通、支付和助长对人的剥削,如强迫劳动、家庭奴役、役、强迫婚姻和强迫医疗程序。 自杀和自残,禁止描述、赞美、支持、促进、美化、鼓励和/或指导个人自残或自杀的内容。 暴力内容和行为 禁止描述、展示或宣扬血腥暴力或血腥的内容。 禁止描绘恐怖主义行为的内容;赞扬或支持恐怖组织、恐怖行为者或暴力恐怖意识形态;鼓励恐怖活动;向恐怖组织或恐怖事业提供援助;或协助恐怖组织招募成员。 禁止通过暴力威胁或煽动来鼓吹或宣扬对他人的暴力行为的内容。 仇恨言论和歧视 禁止基于实际或感知的种族、民族、国籍、性别、性别认同、性取向、宗教信仰、年龄、残疾状况、种姓或与系统性偏见或边缘化相关的任何其他特征等特征攻击、诋毁、恐吓、降级、针对或排斥个人或群体的内容。 禁止针对个人或群体进行威胁、恐吓、侮辱、贬低或贬低的语言或图像、宣扬身体伤害或其他虐待行为(如跟踪)的内容。 禁止故意欺骗并可能对公共利益产生不利影响的内容,包括与健康、安全、选举诚信或公民参与相关的欺骗性或不真实内容。 直接支持非法主动攻击或造成技术危害的恶意软件活动的内容,例如提供恶意可执行文件、组织拒绝服务攻击或管理命令和控制服务器。 第4条 费用及支付
|
||||
您同意支付与本服务相关的费用,具体费用标准以我们公布的价格为准。 我们可能会根据运营成本和市场情况调整费用标准。最新价格以您付款时刻的价格为准。 第5条 服务免责与责任限制
|
||||
本服务按照现有技术和条件所能达到的水平提供。我们不能保证本服务完全无故障或满足您的所有需求。 对于因您自身误操作导致的数据丢失、损坏等情况,我们不承担责任。 由于生成式 AI 的特性,其在不同国家的管控措施也会有所不同,请所有使用者务必遵守所在地的相关法律。如果您以任何违反 FastGPT 可接受使用政策的方式使用,包括但不限于法律、法规、政府命令或法令禁止的任何用途,或任何侵犯他人权利的使用;由使用者自行承担。我们对由客户使用产生的问题概不负责。下面是各国对生成式AI的管控条例的链接: 中国生成式人工智能服务管理办法(征求意见稿)
|
||||
第6条 知识产权
|
||||
我们对本服务及相关软件、技术、文档等拥有全部知识产权,除非经我们明确许可,您不得进行复制、分发、出租、反向工程等行为。 您在使用本服务过程中产生的所有数据和内容(包括但不限于文件、图片等)的知识产权归您所有。我们不会对您的数据和内容进行使用、复制、修改等行为。 在线服务中其他用户的数据和内容的知识产权归原用户所有,未经原用户许可,您不得进行使用、复制、修改等行为。 第7条 其他条款
|
||||
如本协议中部分条款因违反法律法规而被视为无效,不影响其他条款的效力。 本公司保留对本协议及隐私政策的最终解释权。如您对本协议或隐私政策有任何疑问,请联系我们:yujinlong@sealos.io。</description></item><item><title>隐私政策</title><link>https://doc.tryfastgpt.ai/docs/agreement/privacy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/agreement/privacy/</guid><description>最后更新时间:2024年3月3日
|
||||
我们非常重视您的隐私保护,在您使用FastGPT云服务时(以下简称为“本服务”),我们将按照以下政策收集、使用、披露和保护您的个人信息。请您仔细阅读并充分理解本隐私政策。
|
||||
我们可能需要收集的信息
|
||||
在您注册或使用本服务时,我们可能收集您的姓名、电话号码、电子邮件地址、地址等个人信息。 在您使用本服务过程中产生的信息,如操作日志、访问IP地址、设备型号等。 我们可能会通过 Cookies 或其他技术收集和存储您访问本服务的相关信息,以便为您提供更好的用户体验。 我们如何使用收集的信息?
|
||||
我们会根据法律法规规定以及与用户之间的约定来处理用户的个人信息。 我们可能会将收集到的信息用于改进服务质量、开发新产品或功能等目的。 我们可能会将收集到的信息用于向您推送与本服务相关的通知或广告。 信息披露
|
||||
我们不会向任何第三方披露您的个人信息,除非:
|
||||
您事先同意; 法律法规要求; 为维护我们或其他用户的合法权益。 我们可能与关联公司、合作伙伴分享您的个人信息,但我们会采取相应的保密措施,确保信息安全。
|
||||
信息保护
|
||||
我们采取各种安全措施,包括加密、访问控制等技术手段,以保护您的个人信息免受未经授权的访问、使用或泄露。 我们会定期对收集、存储和处理的个人信息进行安全评估,以确保个人信息安全。 在发生个人信息泄露等安全事件时,我们会立即启动应急预案,并在法律法规规定的范围内向您及时告知。 我们不会使用您的数据进行额外的备份存储或用于模型训练。 您在本服务进行的数据删除均为物理删除,不可恢复。如有非物理删除的操作,我们会在服务中特别指出。 用户权利
|
||||
您有权随时查阅、更正或删除您的个人信息。 您有权拒绝我们收集您的个人信息,但这可能导致您无法使用本服务的部分功能。 您有权要求我们停止处理您的个人信息,但这可能导致您无法继续使用本服务。 隐私政策更新
|
||||
我们可能会对本隐私政策进行修改。如本隐私政策发生变更,我们将在本服务页面上发布修改后的隐私政策。如您继续使用本服务,则视为同意修改后的隐私政策。 我们鼓励您定期查阅本隐私政策,以了解我们如何保护您的个人信息。 未成年人保护
|
||||
我们非常重视对未成年人个人信息的保护,如您为未成年人,请在监护人指导下使用本服务,并请监护人帮助您在使用本服务过程中正确处理个人信息。
|
||||
跨境数据传输
|
||||
由于我们的服务器可能位于不同国家或地区,您同意我们可能需要将您的个人信息传输至其他国家或地区,并在该等国家或地区存储和处理以向您提供服务。我们会采取适当措施确保跨境传输的数据仍然受到适当保护。
|
||||
联系我们
|
||||
如您对本隐私政策有任何疑问、建议或投诉,请通过以下方式与我们联系:yujinlong@sealos.io。 我们将尽快回复并解决您提出的问题。</description></item></channel></rss>
|
||||
44
docs/agreement/open-source/index.html
Normal file
44
docs/agreement/open-source/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/agreement/privacy/index.html
Normal file
44
docs/agreement/privacy/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/agreement/terms/index.html
Normal file
44
docs/agreement/terms/index.html
Normal file
File diff suppressed because one or more lines are too long
9
docs/browserconfig.xml
Normal file
9
docs/browserconfig.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
44
docs/community/index.html
Normal file
44
docs/community/index.html
Normal file
File diff suppressed because one or more lines are too long
63
docs/development/configuration/index.html
Normal file
63
docs/development/configuration/index.html
Normal file
File diff suppressed because one or more lines are too long
84
docs/development/custom-models/bge-rerank/index.html
Normal file
84
docs/development/custom-models/bge-rerank/index.html
Normal file
File diff suppressed because one or more lines are too long
94
docs/development/custom-models/chatglm2-m3e/index.html
Normal file
94
docs/development/custom-models/chatglm2-m3e/index.html
Normal file
File diff suppressed because one or more lines are too long
70
docs/development/custom-models/chatglm2/index.html
Normal file
70
docs/development/custom-models/chatglm2/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/custom-models/index.html
Normal file
44
docs/development/custom-models/index.html
Normal file
File diff suppressed because one or more lines are too long
49
docs/development/custom-models/index.xml
Normal file
49
docs/development/custom-models/index.xml
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>本地模型使用 on FastGPT</title><link>https://doc.tryfastgpt.ai/docs/development/custom-models/</link><description>Recent content in 本地模型使用 on FastGPT</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://doc.tryfastgpt.ai/docs/development/custom-models/index.xml" rel="self" type="application/rss+xml"/><item><title>接入 Marker PDF 文档解析</title><link>https://doc.tryfastgpt.ai/docs/development/custom-models/marker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/custom-models/marker/</guid><description>背景 linkPDF 是一个相对复杂的文件格式,在 FastGPT 内置的 pdf 解析器中,依赖的是 pdfjs 库解析,该库基于逻辑解析,无法有效的理解复杂的 pdf 文件。所以我们在解析 pdf 时候,如果遇到图片、表格、公式等非简单文本内容,会发现解析效果不佳。
|
||||
市面上目前有多种解析 PDF 的方法,比如使用 Marker,该项目使用了 Surya 模型,基于视觉解析,可以有效提取图片、表格、公式等复杂内容。
|
||||
在 FastGPT v4.9.0 版本中,开源版用户可以在config.json文件中添加systemEnv.customPdfParse配置,来使用 Marker 解析 PDF 文件。商业版用户直接在 Admin 后台根据表单指引填写即可。需重新拉取 Marker 镜像,接口格式已变动。
|
||||
使用教程 link1. 安装 Marker link参考文档 Marker 安装教程,安装 Marker 模型。封装的 API 已经适配了 FastGPT 自定义解析服务。
|
||||
这里介绍快速 Docker 安装的方法:
|
||||
docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.2 docker run --gpus all -itd -p 7231:7232 --name model_pdf_v2 -e PROCESSES_PER_GPU=&#34;2&#34; crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.2 2. 添加 FastGPT 文件配置 link { xxx &#34;systemEnv&#34;: { xxx &#34;customPdfParse&#34;: { &#34;url&#34;: &#34;http://xxxx.</description></item><item><title>使用 Xinference 接入本地模型</title><link>https://doc.tryfastgpt.ai/docs/development/custom-models/xinference/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/custom-models/xinference/</guid><description>Xinference 是一款开源模型推理平台,除了支持 LLM,它还可以部署 Embedding 和 ReRank 模型,这在企业级 RAG 构建中非常关键。同时,Xinference 还提供 Function Calling 等高级功能。还支持分布式部署,也就是说,随着未来应用调用量的增长,它可以进行水平扩展。
|
||||
安装 Xinference linkXinference 支持多种推理引擎作为后端,以满足不同场景下部署大模型的需要,下面会分使用场景来介绍一下这三种推理后端,以及他们的使用方法。
|
||||
1. 服务器 link如果你的目标是在一台 Linux 或者 Window 服务器上部署大模型,可以选择 Transformers 或 vLLM 作为 Xinference 的推理后端:
|
||||
Transformers:通过集成 Huggingface 的 Transformers 库作为后端,Xinference 可以最快地 集成当今自然语言处理(NLP)领域的最前沿模型(自然也包括 LLM)。 vLLM: vLLM 是由加州大学伯克利分校开发的一个开源库,专为高效服务大型语言模型(LLM)而设计。它引入了 PagedAttention 算法, 通过有效管理注意力键和值来改善内存管理,吞吐量能够达到 Transformers 的 24 倍,因此 vLLM 适合在生产环境中使用,应对高并发的用户访问。 假设你服务器配备 NVIDIA 显卡,可以参考这篇文章中的指令来安装 CUDA,从而让 Xinference 最大限度地利用显卡的加速功能。
|
||||
Docker 部署 link你可以使用 Xinference 官方的 Docker 镜像来一键安装和启动 Xinference 服务(确保你的机器上已经安装了 Docker),命令如下:
|
||||
docker run -p 9997:9997 --gpus all xprobe/xinference:latest xinference-local -H 0.</description></item><item><title>接入 bge-rerank 重排模型</title><link>https://doc.tryfastgpt.ai/docs/development/custom-models/bge-rerank/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/custom-models/bge-rerank/</guid><description>不同模型推荐配置 link推荐配置如下:
|
||||
模型名 内存 显存 硬盘空间 启动命令 bge-reranker-base &gt;=4GB &gt;=4GB &gt;=8GB python app.py bge-reranker-large &gt;=8GB &gt;=8GB &gt;=8GB python app.py bge-reranker-v2-m3 &gt;=8GB &gt;=8GB &gt;=8GB python app.py 源码部署 link1. 安装环境 link Python 3.9, 3.10 CUDA 11.7 科学上网环境 2. 下载代码 link3 个模型代码分别为:
|
||||
https://github.com/labring/FastGPT/tree/main/plugins/model/rerank-bge/bge-reranker-base https://github.com/labring/FastGPT/tree/main/plugins/model/rerank-bge/bge-reranker-large https://github.com/labring/FastGPT/tree/main/plugins/model/rerank-bge/bge-reranker-v2-m3 3. 安装依赖 link pip install -r requirements.txt 4. 下载模型 link3个模型的 huggingface 仓库地址如下:
|
||||
https://huggingface.co/BAAI/bge-reranker-base https://huggingface.co/BAAI/bge-reranker-large https://huggingface.co/BAAI/bge-reranker-v2-m3 在对应代码目录下 clone 模型。目录结构:
|
||||
bge-reranker-base/ app.py Dockerfile requirements.txt 5. 运行代码 link python app.py 启动成功后应该会显示如下地址:</description></item><item><title>接入 ChatGLM2-6B</title><link>https://doc.tryfastgpt.ai/docs/development/custom-models/chatglm2/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/custom-models/chatglm2/</guid><description>前言 linkFastGPT 允许你使用自己的 OpenAI API KEY 来快速调用 OpenAI 接口,目前集成了 GPT-3.5, GPT-4 和 embedding,可构建自己的知识库。但考虑到数据安全的问题,我们并不能将所有的数据都交付给云端大模型。
|
||||
那么如何在 FastGPT 上接入私有化模型呢?本文就以清华的 ChatGLM2 为例,为各位讲解如何在 FastGPT 中接入私有化模型。
|
||||
ChatGLM2-6B 简介 linkChatGLM2-6B 是开源中英双语对话模型 ChatGLM-6B 的第二代版本,具体介绍可参阅 ChatGLM2-6B 项目主页。
|
||||
warning 注意,ChatGLM2-6B 权重对学术研究完全开放,在获得官方的书面许可后,亦允许商业使用。本教程只是介绍了一种用法,无权给予任何授权!
|
||||
推荐配置 link依据官方数据,同样是生成 8192 长度,量化等级为 FP16 要占用 12.8GB 显存、int8 为 8.1GB 显存、int4 为 5.1GB 显存,量化后会稍微影响性能,但不多。
|
||||
因此推荐配置如下:
|
||||
类型 内存 显存 硬盘空间 启动命令 fp16 &gt;=16GB &gt;=16GB &gt;=25GB python openai_api.py 16 int8 &gt;=16GB &gt;=9GB &gt;=25GB python openai_api.py 8 int4 &gt;=16GB &gt;=6GB &gt;=25GB python openai_api.</description></item><item><title>接入 M3E 向量模型</title><link>https://doc.tryfastgpt.ai/docs/development/custom-models/m3e/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/custom-models/m3e/</guid><description>前言 linkFastGPT 默认使用了 openai 的 embedding 向量模型,如果你想私有部署的话,可以使用 M3E 向量模型进行替换。M3E 向量模型属于小模型,资源使用不高,CPU 也可以运行。下面教程是基于 “睡大觉” 同学提供的一个的镜像。
|
||||
部署镜像 link镜像名: stawky/m3e-large-api:latest
|
||||
国内镜像: registry.cn-hangzhou.aliyuncs.com/fastgpt_docker/m3e-large-api:latest 端口号: 6008 环境变量:
|
||||
# 设置安全凭证(即oneapi中的渠道密钥) 默认值:sk-aaabbbcccdddeeefffggghhhiiijjjkkk 也可以通过环境变量引入:sk-key。有关docker环境变量引入的方法请自寻教程,此处不再赘述。 接入 One API link添加一个渠道,参数如下:
|
||||
测试 linkcurl 例子:
|
||||
curl --location --request POST &#39;https://domain/v1/embeddings&#39; \ --header &#39;Authorization: Bearer xxxx&#39; \ --header &#39;Content-Type: application/json&#39; \ --data-raw &#39;{ &#34;model&#34;: &#34;m3e&#34;, &#34;input&#34;: [&#34;laf是什么&#34;] }&#39; Authorization 为 sk-key。model 为刚刚在 One API 填写的自定义模型。
|
||||
接入 FastGPT link修改 config.json 配置文件,在 vectorModels 中加入 M3E 模型:</description></item><item><title>接入 ChatGLM2-m3e 模型</title><link>https://doc.tryfastgpt.ai/docs/development/custom-models/chatglm2-m3e/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/custom-models/chatglm2-m3e/</guid><description>前言 linkFastGPT 默认使用了 OpenAI 的 LLM 模型和向量模型,如果想要私有化部署的话,可以使用 ChatGLM2 和 m3e-large 模型。以下是由用户@不做了睡大觉 提供的接入方法。该镜像直接集成了 M3E-Large 和 ChatGLM2-6B 模型,可以直接使用。
|
||||
部署镜像 link 镜像名: stawky/chatglm2-m3e:latest 国内镜像名: registry.cn-hangzhou.aliyuncs.com/fastgpt_docker/chatglm2-m3e:latest 端口号: 6006 # 设置安全凭证(即oneapi中的渠道密钥)
|
||||
默认值:sk-aaabbbcccdddeeefffggghhhiiijjjkkk
|
||||
也可以通过环境变量引入:sk-key。有关docker环境变量引入的方法请自寻教程,此处不再赘述。 接入 One API link为 chatglm2 和 m3e-large 各添加一个渠道,参数如下:
|
||||
这里我填入 m3e 作为向量模型,chatglm2 作为语言模型
|
||||
测试 linkcurl 例子:
|
||||
curl --location --request POST &#39;https://domain/v1/embeddings&#39; \
|
||||
--header &#39;Authorization: Bearer sk-aaabbbcccdddeeefffggghhhiiijjjkkk&#39; \
|
||||
--header &#39;Content-Type: application/json&#39; \
|
||||
--data-raw &#39;{
|
||||
&#34;model&#34;: &#34;m3e&#34;,
|
||||
&#34;input&#34;: [&#34;laf是什么&#34;]
|
||||
}&#39; curl --location --request POST &#39;https://domain/v1/chat/completions&#39; \
|
||||
--header &#39;Authorization: Bearer sk-aaabbbcccdddeeefffggghhhiiijjjkkk&#39; \
|
||||
--header &#39;Content-Type: application/json&#39; \
|
||||
--data-raw &#39;{
|
||||
&#34;model&#34;: &#34;chatglm2&#34;,
|
||||
&#34;messages&#34;: [{&#34;role&#34;: &#34;user&#34;, &#34;content&#34;: &#34;Hello!</description></item><item><title>使用 Ollama 接入本地模型</title><link>https://doc.tryfastgpt.ai/docs/development/custom-models/ollama/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/custom-models/ollama/</guid><description>Ollama 是一个开源的AI大模型部署工具,专注于简化大语言模型的部署和使用,支持一键下载和运行各种大模型。
|
||||
安装 Ollama linkOllama 本身支持多种安装方式,但是推荐使用 Docker 拉取镜像部署。如果是个人设备上安装了 Ollama 后续需要解决如何让 Docker 中 FastGPT 容器访问宿主机 Ollama的问题,较为麻烦。
|
||||
Docker 安装(推荐) link你可以使用 Ollama 官方的 Docker 镜像来一键安装和启动 Ollama 服务(确保你的机器上已经安装了 Docker),命令如下:
|
||||
docker pull ollama/ollama docker run --rm -d --name ollama -p 11434:11434 ollama/ollama 如果你的 FastGPT 是在 Docker 中进行部署的,建议在拉取 Ollama 镜像时保证和 FastGPT 镜像处于同一网络,否则可能出现 FastGPT 无法访问的问题,命令如下:
|
||||
docker run --rm -d --name ollama --network (你的 Fastgpt 容器所在网络) -p 11434:11434 ollama/ollama 主机安装 link如果你不想使用 Docker ,也可以采用主机安装,以下是主机安装的一些方式。
|
||||
MacOS link如果你使用的是 macOS,且系统中已经安装了 Homebrew 包管理器,可通过以下命令来安装 Ollama:</description></item></channel></rss>
|
||||
75
docs/development/custom-models/m3e/index.html
Normal file
75
docs/development/custom-models/m3e/index.html
Normal file
File diff suppressed because one or more lines are too long
69
docs/development/custom-models/marker/index.html
Normal file
69
docs/development/custom-models/marker/index.html
Normal file
File diff suppressed because one or more lines are too long
72
docs/development/custom-models/ollama/index.html
Normal file
72
docs/development/custom-models/ollama/index.html
Normal file
File diff suppressed because one or more lines are too long
95
docs/development/custom-models/xinference/index.html
Normal file
95
docs/development/custom-models/xinference/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/design/dataset/index.html
Normal file
44
docs/development/design/dataset/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/design/index.html
Normal file
44
docs/development/design/index.html
Normal file
File diff suppressed because one or more lines are too long
3
docs/development/design/index.xml
Normal file
3
docs/development/design/index.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>设计方案 on FastGPT</title><link>https://doc.tryfastgpt.ai/docs/development/design/</link><description>Recent content in 设计方案 on FastGPT</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://doc.tryfastgpt.ai/docs/development/design/index.xml" rel="self" type="application/rss+xml"/><item><title>数据集</title><link>https://doc.tryfastgpt.ai/docs/development/design/dataset/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/design/dataset/</guid><description>文件与数据的关系 link在 FastGPT 中,文件会通过 MongoDB 的 FS 存储,而具体的数据会通过 PostgreSQL 存储,PG 中的数据会有一列 file_id,关联对应的文件。考虑到旧版本的兼容,以及手动输入、标注数据等,我们给 file_id 增加了一些特殊的值,如下:
|
||||
manual: 手动输入 mark: 手动标注的数据 注意,file_id 仅在插入数据时会写入,变更时无法修改。
|
||||
文件导入流程 link 上传文件到 MongoDB 的 FS 中,获取 file_id,此时文件标记为 unused 状态 浏览器解析文件,获取对应的文本和 chunk 给每个 chunk 打上 file_id 点击上传数据:将文件的状态改为 used,并将数据推送到 mongo training 表中等待训练 由训练线程从 mongo 中取数据,并在获取向量后插入到 pg。</description></item></channel></rss>
|
||||
125
docs/development/docker/index.html
Normal file
125
docs/development/docker/index.html
Normal file
File diff suppressed because one or more lines are too long
232
docs/development/faq/index.html
Normal file
232
docs/development/faq/index.html
Normal file
File diff suppressed because one or more lines are too long
51
docs/development/index.html
Normal file
51
docs/development/index.html
Normal file
File diff suppressed because one or more lines are too long
41
docs/development/index.xml
Normal file
41
docs/development/index.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>开发与部署指南 on FastGPT</title><link>https://doc.tryfastgpt.ai/docs/development/</link><description>Recent content in 开发与部署指南 on FastGPT</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://doc.tryfastgpt.ai/docs/development/index.xml" rel="self" type="application/rss+xml"/><item><title>快速开始本地开发</title><link>https://doc.tryfastgpt.ai/docs/development/intro/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/intro/</guid><description>本文档介绍了如何设置开发环境以构建和测试 FastGPT,。
|
||||
前置依赖项 link您需要在计算机上安装和配置以下依赖项才能构建 FastGPT:
|
||||
Git Docker(构建镜像) Node.js v20.14.0(版本尽量一样,可以使用nvm管理node版本) pnpm 推荐版本 9.4.0 (目前官方的开发环境) make命令: 根据不同平台,百度安装 (官方是GNU Make 4.3) 开始本地开发 link check_circle 用户默认的时区为 Asia/Shanghai,非 linux 环境时候,获取系统时间会异常,本地开发时候,可以将用户的时区调整成 UTC(+0)。 建议先服务器装好数据库,再进行本地开发。 1. Fork 存储库 link您需要 Fork 存储库。
|
||||
2. 克隆存储库 link克隆您在 GitHub 上 Fork 的存储库:
|
||||
git clone git@github.com:&lt;github_username&gt;/FastGPT.git 目录简要说明
|
||||
projects 目录下为 FastGPT 应用代码。其中 app 为 FastGPT 核心应用。(后续可能会引入其他应用) NextJS 框架前后端放在一起,API 服务位于 src/pages/api 目录内。 packages 目录为共用代码,通过 workspace 被注入到 projects 中,已配置 monorepo 自动注入,无需额外打包。 3. 安装数据库 link第一次开发,需要先部署数据库,建议本地开发可以随便找一台 2C2G 的轻量小数据库实践,或者新建文件夹并配置相关文件用以运行docker。数据库部署教程:Docker 快速部署。部署完了,可以本地访问其数据库。</description></item><item><title>Sealos 一键部署</title><link>https://doc.tryfastgpt.ai/docs/development/sealos/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/sealos/</guid><description>部署架构图 link 多模型支持 linkFastGPT 使用了 one-api 项目来管理模型池,其可以兼容 OpenAI 、Azure 、国内主流模型和本地模型等。
|
||||
可参考:Sealos 快速部署 OneAPI
|
||||
一键部署 link使用 Sealos 服务,无需采购服务器、无需域名,支持高并发 &amp; 动态伸缩,并且数据库应用采用 kubeblocks 的数据库,在 IO 性能方面,远超于简单的 Docker 容器部署。可以根据需求,再下面两个区域选择部署。
|
||||
新加坡区 link新加披区的服务器在国外,可以直接访问 OpenAI,但国内用户需要梯子才可以正常访问新加坡区。国际区价格稍贵,点击下面按键即可部署👇
|
||||
北京区 link北京区服务提供商为火山云,国内用户可以稳定访问,但无法访问 OpenAI 等境外服务,价格约为新加坡区的 1/4。点击下面按键即可部署👇
|
||||
1. 开始部署 link由于需要部署数据库,部署完后需要等待 2~4 分钟才能正常访问。默认用了最低配置,首次访问时会有些慢。
|
||||
根据提示,输入root_password,和 openai/oneapi 的地址和密钥。
|
||||
点击部署后,会跳转到应用管理页面。可以点击fastgpt主应用右侧的详情按键(名字为 fastgpt-xxxx), 如下图所示。
|
||||
点击详情后,会跳转到 fastgpt 的部署管理页面,点击外网访问地址中的链接,即可打开 fastgpt 服务。
|
||||
如需绑定自定义域名、修改部署参数,可以点击右上角变更,根据 sealos 的指引完成。
|
||||
2. 登录 link用户名:root
|
||||
密码是刚刚一键部署时设置的root_password
|
||||
3. 配置模型 link4. 配置模型 link务必先配置至少一组模型,否则系统无法正常使用。
|
||||
点击查看模型配置教程
|
||||
收费 linkSealos 采用按量计费的方式,也就是申请了多少 cpu、内存、磁盘,就按该申请量进行计费。具体的计费标准,可以打开sealos控制面板中的费用中心进行查看。
|
||||
Sealos 使用 link简介 linkFastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据库,使用多 Api Key 时候需要安装 OneAPI(一个应用和一个数据库),总计3个应用和3个数据库。</description></item><item><title>Docker Compose 快速部署</title><link>https://doc.tryfastgpt.ai/docs/development/docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/docker/</guid><description>前置知识 link 基础的网络知识:端口,防火墙…… Docker 和 Docker Compose 基础知识 大模型相关接口和参数 RAG 相关知识:向量模型,向量数据库,向量检索 部署架构图 link 🤖
|
||||
MongoDB:用于存储除了向量外的各类数据
|
||||
PostgreSQL/Milvus:存储向量数据
|
||||
OneAPI: 聚合各类 AI API,支持多模型调用 (任何模型问题,先自行通过 OneAPI 测试校验)
|
||||
推荐配置 linkPgVector版本 link非常轻量,适合知识库索引量在 5000 万以下。
|
||||
环境 最低配置(单节点) 推荐配置 测试(可以把计算进程设置少一些) 2c4g 2c8g 100w 组向量 4c8g 50GB 4c16g 50GB 500w 组向量 8c32g 200GB 16c64g 200GB Milvus版本 link对于亿级以上向量性能更优秀。
|
||||
点击查看 Milvus 官方推荐配置
|
||||
环境 最低配置(单节点) 推荐配置 测试 2c8g 4c16g 100w 组向量 未测试 500w 组向量 zilliz cloud版本 linkZilliz Cloud 由 Milvus 原厂打造,是全托管的 SaaS 向量数据库服务,性能优于 Milvus 并提供 SLA,点击使用 Zilliz Cloud。</description></item><item><title>配置文件介绍</title><link>https://doc.tryfastgpt.ai/docs/development/configuration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/configuration/</guid><description>由于环境变量不利于配置复杂的内容,新版 FastGPT 采用了 ConfigMap 的形式挂载配置文件,你可以在 projects/app/data/config.json 看到默认的配置文件。可以参考 docker-compose 快速部署 来挂载配置文件。
|
||||
开发环境下,你需要将示例配置文件 config.json 复制成 config.local.json 文件才会生效。
|
||||
下面配置文件示例中包含了系统参数和各个模型配置:
|
||||
4.8.20+ 版本新配置文件示例 link 从4.8.20版本开始,模型在页面中进行配置。
|
||||
{ &#34;feConfigs&#34;: { &#34;lafEnv&#34;: &#34;https://laf.dev&#34; // laf环境。 https://laf.run (杭州阿里云) ,或者私有化的laf环境。如果使用 Laf openapi 功能,需要最新版的 laf 。 }, &#34;systemEnv&#34;: { &#34;vectorMaxProcess&#34;: 15, // 向量处理线程数量 &#34;qaMaxProcess&#34;: 15, // 问答拆分线程数量 &#34;vlmMaxProcess&#34;: 15, // 图片理解模型最大处理进程 &#34;tokenWorkers&#34;: 50, // Token 计算线程保持数,会持续占用内存,不能设置太大。 &#34;hnswEfSearch&#34;: 100, // 向量搜索参数,仅对 PG 和 OB 生效。越大,搜索越精确,但是速度越慢。设置为100,有99%&#43;精度。 &#34;customPdfParse&#34;: { // 4.9.0 新增配置 &#34;url&#34;: &#34;&#34;, // 自定义 PDF 解析服务地址 &#34;key&#34;: &#34;&#34;, // 自定义 PDF 解析服务密钥 &#34;doc2xKey&#34;: &#34;&#34;, // doc2x 服务密钥 &#34;price&#34;: 0 // PDF 解析服务价格 } } } 自定义 PDF 解析配置 link自定义 PDF 服务解析的优先级高于 Doc2x 服务,所以如果使用 Doc2x 服务,请勿配置自定义 PDF 服务。</description></item><item><title>私有部署常见问题</title><link>https://doc.tryfastgpt.ai/docs/development/faq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/faq/</guid><description>一、错误排查方式 link可以先找找Issue,或新提 Issue,私有部署错误,务必提供详细的操作步骤、日志、截图,否则很难排查。
|
||||
获取后端错误 link docker ps -a 查看所有容器运行状态,检查是否全部 running,如有异常,尝试docker logs 容器名查看对应日志。 容器都运行正常的,docker logs 容器名 查看报错日志 前端错误 link前端报错时,页面会出现崩溃,并提示检查控制台日志。可以打开浏览器控制台,并查看console中的 log 日志。还可以点击对应 log 的超链接,会提示到具体错误文件,可以把这些详细错误信息提供,方便排查。
|
||||
OneAPI 错误 link带有requestId的,都是 OneAPI 提示错误,大部分都是因为模型接口报错。可以参考 OneAPI 常见错误
|
||||
二、通用问题 link前端页面崩溃 link 90% 情况是模型配置不正确:确保每类模型都至少有一个启用;检查模型中一些对象参数是否异常(数组和对象),如果为空,可以尝试给个空数组或空对象。 少部分是由于浏览器兼容问题,由于项目中包含一些高阶语法,可能低版本浏览器不兼容,可以将具体操作步骤和控制台中错误信息提供 issue。 关闭浏览器翻译功能,如果浏览器开启了翻译,可能会导致页面崩溃。 通过sealos部署的话,是否没有本地部署的一些限制? link 这是索引模型的长度限制,通过任何方式部署都一样的,但不同索引模型的配置不一样,可以在后台修改参数。
|
||||
怎么挂载小程序配置文件 link将验证文件,挂载到指定位置:/app/projects/app/public/xxxx.txt
|
||||
然后重启。例如:
|
||||
数据库3306端口被占用了,启动服务失败 link 把端口映射改成 3307 之类的,例如 3307:3306。
|
||||
本地部署的限制 link具体内容参考https://fael3z0zfze.feishu.cn/wiki/OFpAw8XzAi36Guk8dfucrCKUnjg。
|
||||
能否纯本地运行 link可以。需要准备好向量模型和LLM模型。
|
||||
其他模型没法进行问题分类/内容提取 link 看日志。如果提示 JSON invalid,not support tool 之类的,说明该模型不支持工具调用或函数调用,需要设置toolChoice=false和functionCall=false,就会默认走提示词模式。目前内置提示词仅针对了商业模型API进行测试。问题分类基本可用,内容提取不太行。 如果已经配置正常,并且没有错误日志,则说明可能提示词不太适合该模型,可以通过修改customCQPrompt来自定义提示词。 页面崩溃 link 关闭翻译 检查配置文件是否正常加载,如果没有正常加载会导致缺失系统信息,在某些操作下会导致空指针。 95%情况是配置文件不对。会提示 xxx undefined 提示URI malformed,请 Issue 反馈具体操作和页面,这是由于特殊字符串编码解析报错。 某些api不兼容问题(较少) 开启内容补全后,响应速度变慢 link 问题补全需要经过一轮AI生成。 会进行3~5轮的查询,如果数据库性能不足,会有明显影响。 页面中可以正常回复,API 报错 link页面中是用 stream=true 模式,所以API也需要设置 stream=true 来进行测试。部分模型接口(国产居多)非 Stream 的兼容有点垃圾。 和上一个问题一样,curl 测试。</description></item></channel></rss>
|
||||
95
docs/development/intro/index.html
Normal file
95
docs/development/intro/index.html
Normal file
File diff suppressed because one or more lines are too long
47
docs/development/migration/docker_db/index.html
Normal file
47
docs/development/migration/docker_db/index.html
Normal file
File diff suppressed because one or more lines are too long
132
docs/development/migration/docker_mongo/index.html
Normal file
132
docs/development/migration/docker_mongo/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/migration/index.html
Normal file
44
docs/development/migration/index.html
Normal file
File diff suppressed because one or more lines are too long
15
docs/development/migration/index.xml
Normal file
15
docs/development/migration/index.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>迁移&备份 on FastGPT</title><link>https://doc.tryfastgpt.ai/docs/development/migration/</link><description>Recent content in 迁移&备份 on FastGPT</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://doc.tryfastgpt.ai/docs/development/migration/index.xml" rel="self" type="application/rss+xml"/><item><title>Docker Mongo迁移(dump模式)</title><link>https://doc.tryfastgpt.ai/docs/development/migration/docker_mongo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/migration/docker_mongo/</guid><description>作者 linkhttps://github.com/samqin123
|
||||
相关PR。有问题可打开这里与作者交流
|
||||
介绍 link如何使用Mongodump来完成从A环境到B环境的Fastgpt的mongodb迁移
|
||||
前提说明:
|
||||
A环境:我在阿里云上部署的fastgpt,现在需要迁移到B环境。 B环境:是新环境比如腾讯云新部署的fastgpt,更特殊一点的是,NAS(群晖或者QNAP)部署了fastgpt,mongo必须改成4.2或者4.4版本(其实云端更方便,支持fastgpt mongo默认版本) C环境:妥善考虑,用本地电脑作为C环境过渡,保存相关文件并分离操作
|
||||
1. 环境准备:进入 docker mongo 【A环境】 link docker exec -it mongo sh mongo -u &#39;username&#39; -p &#39;password&#39; &gt;&gt; show dbs 看到fastgpt数据库,以及其它几个,确定下导出数据库名称 准备: 检查数据库,容器和宿主机都创建一下 backup 目录 【A环境 + C环境】
|
||||
准备: link检查数据库,容器和宿主机都创建一下“数据导出导入”临时目录 ,比如data/backup 【A环境建目录 + C环境建目录用于同步到容器中】
|
||||
先在【A环境】创建文件目录,用于dump导出操作 link容器:(先进入fastgpt docker容器)
|
||||
docker exec -it fastgpt sh mkdir -p /data/backup 建好后,未来导出mongo的数据,会在A环境本地fastgpt的安装目录/Data/下看到自动同步好的目录,数据会在data\backup中,然后可以衔接后续的压缩和下载转移动作。如果没有同步到本地,也可以手动建一下,配合docker cp 把文件拷到本地用(基本不会发生)
|
||||
然后,【C环境】宿主机目录类似操作,用于把上传的文件自动同步到C环境部署的fastgpt容器里。 link到fastgpt目录,进入mongo目录,有data目录,下面建backup
|
||||
mkdir -p /fastgpt/data/backup 准备好后,后续上传
|
||||
### 新fastgpt环境【B】中也需要建一个,比如/fastgpt/mongobackup目录,注意不要在fastgpt/data目录下建立目录 mkdir -p /fastgpt/mongobackup
|
||||
###2. 正题开始,从fastgpt老环境【A】中导出数据 进入A环境,使用mongodump 导出mongo数据库。 #### 2.</description></item><item><title>Docker 数据库迁移(无脑操作)</title><link>https://doc.tryfastgpt.ai/docs/development/migration/docker_db/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/migration/docker_db/</guid><description>1. 停止服务 link docker-compose down 2. Copy文件夹 linkDocker 部署数据库都会通过 volume 挂载本地的目录进入容器,如果要迁移,直接复制这些目录即可。
|
||||
PG 数据: pg/data Mongo 数据: mongo/data
|
||||
直接把pg 和 mongo目录全部复制走即可。</description></item></channel></rss>
|
||||
55
docs/development/modelconfig/ai-proxy/index.html
Normal file
55
docs/development/modelconfig/ai-proxy/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/modelconfig/index.html
Normal file
44
docs/development/modelconfig/index.html
Normal file
File diff suppressed because one or more lines are too long
51
docs/development/modelconfig/index.xml
Normal file
51
docs/development/modelconfig/index.xml
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>模型配置方案 on FastGPT</title><link>https://doc.tryfastgpt.ai/docs/development/modelconfig/</link><description>Recent content in 模型配置方案 on FastGPT</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://doc.tryfastgpt.ai/docs/development/modelconfig/index.xml" rel="self" type="application/rss+xml"/><item><title>FastGPT 模型配置说明</title><link>https://doc.tryfastgpt.ai/docs/development/modelconfig/intro/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/modelconfig/intro/</guid><description>在 4.8.20 版本以前,FastGPT 模型配置在 config.json 文件中声明,你可以在 https://github.com/labring/FastGPT/blob/main/projects/app/data/model.json 中找到旧版的配置文件示例。
|
||||
从 4.8.20 版本开始,你可以直接在 FastGPT 页面中进行模型配置,并且系统内置了大量模型,无需从 0 开始配置。下面介绍模型配置的基本流程:
|
||||
配置模型 link1. 对接模型提供商 linkAI Proxy link从 4.8.23 版本开始, FastGPT 支持在页面上配置模型提供商,即使用 AI Proxy 接入教程 来进行模型聚合,从而可以对接更多模型提供商。
|
||||
One API link也可以使用 OneAPI 接入教程。你需要先在各服务商申请好 API 接入 OneAPI 后,才能在 FastGPT 中使用这些模型。示例流程如下:
|
||||
除了各模型官方的服务外,还有一些第三方服务商提供模型接入服务,当然你也可以用 Ollama 等来部署本地模型,最终都需要接入 OneAPI,下面是一些第三方服务商:
|
||||
SiliconCloud(硅基流动): 提供开源模型调用的平台。
|
||||
Sealos AIProxy: 提供国内各家模型代理,无需逐一申请 api。
|
||||
在 OneAPI 配置好模型后,你就可以打开 FastGPT 页面,启用对应模型了。
|
||||
2. 配置介绍 link 🤖
|
||||
注意:
|
||||
目前语音识别模型和重排模型仅会生效一个,所以配置时候,只需要配置一个即可。 系统至少需要一个语言模型和一个索引模型才能正常使用。 核心配置 link 模型 ID:接口请求时候,Body 中model字段的值,全局唯一。 自定义请求地址/Key:如果需要绕过OneAPI,可以设置自定义请求地址和 Token。一般情况下不需要,如果 OneAPI 不支持某些模型,可以使用该特性。 模型类型 link 语言模型 - 进行文本对话,多模态模型支持图片识别。 索引模型 - 对文本块进行索引,用于相关文本检索。 重排模型 - 对检索结果进行重排,用于优化检索排名。 语音合成 - 将文本转换为语音。 语音识别 - 将语音转换为文本。 启用模型 link系统内置了目前主流厂商的模型,如果你不熟悉配置,直接点击启用即可,需要注意的是,模型 ID需要和 OneAPI 中渠道的模型一致。</description></item><item><title>通过 AI Proxy 接入模型</title><link>https://doc.tryfastgpt.ai/docs/development/modelconfig/ai-proxy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/modelconfig/ai-proxy/</guid><description>从 FastGPT 4.8.23 版本开始,引入 AI Proxy 来进一步方便模型的配置。
|
||||
AI Proxy 与 One API 类似,也是作为一个 OpenAI 接口管理 &amp; 分发系统,可以通过标准的 OpenAI API 格式访问所有的大模型,开箱即用。
|
||||
部署 linkDocker 版本 linkdocker-compose.yml 文件已加入了 AI Proxy 配置,可直接使用。点击查看最新的 yml 配置
|
||||
从旧版升级的用户,可以复制 yml 里,ai proxy 的配置,加入到旧的 yml 文件中。
|
||||
运行原理 linkAI proxy 核心模块:
|
||||
渠道管理:管理各家模型提供商的 API Key 和可用模型列表。 模型调用:根据请求的模型,选中对应的渠道;根据渠道的 API 格式,构造请求体,发送请求;格式化响应体成标准格式返回。 调用日志:详细记录模型调用的日志,并在错误时候可以记录其入参和报错信息,方便排查。 运行流程:
|
||||
在 FastGPT 中使用 linkAI proxy 相关功能,可以在账号-模型提供商页面找到。
|
||||
1. 创建渠道 link在模型提供商的配置页面,点击模型渠道,进入渠道配置页面
|
||||
点击右上角的“新增渠道”,即可进入渠道配置页面
|
||||
以阿里云的模型为例,进行如下配置
|
||||
渠道名:展示在外部的渠道名称,仅作标识; 厂商:模型对应的厂商,不同厂商对应不同的默认地址和 API 密钥格式; 模型:当前渠道具体可以使用的模型,系统内置了主流的一些模型,如果下拉框中没有想要的选项,可以点击“新增模型”,增加自定义模型; 模型映射:将 FastGPT 请求的模型,映射到具体提供的模型上。例如: { &#34;gpt-4o-test&#34;: &#34;gpt-4o&#34;, } FatGPT 中的模型为 gpt-4o-test,向 AI Proxy 发起请求时也是 gpt-4o-test。AI proxy 在向上游发送请求时,实际的model为 gpt-4o。</description></item><item><title>通过 OneAPI 接入模型</title><link>https://doc.tryfastgpt.ai/docs/development/modelconfig/one-api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/modelconfig/one-api/</guid><description>FastGPT 目前采用模型分离的部署方案,FastGPT 中只兼容 OpenAI 的模型规范(OpenAI 不存在的模型采用一个较为通用的规范),并通过 One API 来实现对不同模型接口的统一。
|
||||
One API 是一个 OpenAI 接口管理 &amp; 分发系统,可以通过标准的 OpenAI API 格式访问所有的大模型,开箱即用。
|
||||
FastGPT 与 One API 关系 link可以把 One API 当做一个网关,FastGPT 与 One API 关系:
|
||||
部署 linkSealos 版本 link 北京区: 点击部署 OneAPI 新加坡区(可用 GPT) 点击部署 OneAPI 部署完后,可以打开 OneAPI 访问链接,进行下一步操作。
|
||||
OneAPI 基础教程 link概念 link 渠道: OneApi 中一个渠道对应一个 Api Key,这个 Api Key 可以是GPT、微软、ChatGLM、文心一言的。一个Api Key通常可以调用同一个厂商的多个模型。 One API 会根据请求传入的模型来决定使用哪一个渠道,如果一个模型对应了多个渠道,则会随机调用。 令牌:访问 One API 所需的凭证,只需要这1个凭证即可访问One API上配置的模型。因此FastGPT中,只需要配置One API的baseurl和令牌即可。令牌不要设置任何的模型范围权限,否则容易报错。 大致工作流程 link 客户端请求 One API 根据请求中的 model 参数,匹配对应的渠道(根据渠道里的模型进行匹配,必须完全一致)。如果匹配到多个渠道,则随机选择一个(同优先级)。 One API 向真正的地址发出请求。 One API 将结果返回给客户端。 1.</description></item><item><title>通过 SiliconCloud 体验开源模型</title><link>https://doc.tryfastgpt.ai/docs/development/modelconfig/siliconcloud/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/modelconfig/siliconcloud/</guid><description>SiliconCloud(硅基流动) 是一个以提供开源模型调用为主的平台,并拥有自己的加速引擎。帮助用户低成本、快速的进行开源模型的测试和使用。实际体验下来,他们家模型的速度和稳定性都非常不错,并且种类丰富,覆盖语言、向量、重排、TTS、STT、绘图、视频生成模型,可以满足 FastGPT 中所有模型需求。
|
||||
如果你想部分模型使用 SiliconCloud 的模型,可额外参考OneAPI接入硅基流动。
|
||||
本文会介绍完全使用 SiliconCloud 模型来部署 FastGPT 的方案。
|
||||
1. 注册 SiliconCloud 账号 link 点击注册硅基流动账号 进入控制台,获取 API key: https://cloud.siliconflow.cn/account/ak 2. 修改 FastGPT 环境变量 link OPENAI_BASE_URL=https://api.siliconflow.cn/v1 # 填写 SiliconCloud 控制台提供的 Api Key CHAT_API_KEY=sk-xxxxxx 3. 修改 FastGPT 模型配置 link系统内置了几个硅基流动的模型进行体验,如果需要其他模型,可以手动添加。
|
||||
这里启动了 Qwen2.5 72b 的纯语言和视觉模型;选择 bge-m3 作为向量模型;选择 bge-reranker-v2-m3 作为重排模型。选择 fish-speech-1.5 作为语音模型;选择 SenseVoiceSmall 作为语音输入模型。
|
||||
4. 体验测试 link测试对话和图片识别 link随便新建一个简易应用,选择对应模型,并开启图片上传后进行测试:
|
||||
可以看到,72B 的模型,性能还是非常快的,这要是本地没几个 4090,不说配置环境,输出怕都要 30s 了。
|
||||
测试知识库导入和知识库问答 link新建一个知识库(由于只配置了一个向量模型,页面上不会展示向量模型选择)
|
||||
导入本地文件,直接选择文件,然后一路下一步即可。79 个索引,大概花了 20s 的时间就完成了。现在我们去测试一下知识库问答。
|
||||
首先回到我们刚创建的应用,选择知识库,调整一下参数后即可开始对话:
|
||||
对话完成后,点击底部的引用,可以查看引用详情,同时可以看到具体的检索和重排得分:
|
||||
测试语音播放 link继续在刚刚的应用中,左侧配置中找到语音播放,点击后可以从弹窗中选择语音模型,并进行试听:</description></item><item><title>通过 PPIO LLM API 接入模型</title><link>https://doc.tryfastgpt.ai/docs/development/modelconfig/ppio/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/modelconfig/ppio/</guid><description>FastGPT 还可以通过 PPIO LLM API 接入模型。
|
||||
warning 以下内容搬运自 FastGPT 接入 PPIO LLM API,可能会有更新不及时的情况。
|
||||
FastGPT 是一个将 AI 开发、部署和使用全流程简化为可视化操作的平台。它使开发者不需要深入研究算法, 用户也不需要掌握复杂技术,通过一站式服务将人工智能技术变成易于使用的工具。
|
||||
PPIO 派欧云提供简单易用的 API 接口,让开发者能够轻松调用 DeepSeek 等模型。
|
||||
对开发者:无需重构架构,3 个接口完成从文本生成到决策推理的全场景接入,像搭积木一样设计 AI 工作流; 对生态:自动适配从中小应用到企业级系统的资源需求,让智能随业务自然生长。 下方教程提供完整接入方案(含密钥配置),帮助您快速将 FastGPT 与 PPIO API 连接起来。
|
||||
1. 配置前置条件 link(1) 获取 API 接口地址
|
||||
固定为: https://api.ppinfra.com/v3/openai/chat/completions。
|
||||
(2) 获取 【API 密钥】
|
||||
登录派欧云控制台 API 秘钥管理 页面,点击创建按钮。 注册账号填写邀请码【VOJL20】得 50 代金券
|
||||
(3) 生成并保存 【API 密钥】
|
||||
warning 秘钥在服务端是加密存储,请在生成时保存好秘钥;若遗失可以在控制台上删除并创建一个新的秘钥。
|
||||
(4) 获取需要使用的模型 ID
|
||||
deepseek 系列:
|
||||
DeepSeek R1:deepseek/deepseek-r1/community
|
||||
DeepSeek V3:deepseek/deepseek-v3/community
|
||||
其他模型 ID、最大上下文及价格可参考:模型列表</description></item></channel></rss>
|
||||
308
docs/development/modelconfig/intro/index.html
Normal file
308
docs/development/modelconfig/intro/index.html
Normal file
File diff suppressed because one or more lines are too long
49
docs/development/modelconfig/one-api/index.html
Normal file
49
docs/development/modelconfig/one-api/index.html
Normal file
File diff suppressed because one or more lines are too long
56
docs/development/modelconfig/ppio/index.html
Normal file
56
docs/development/modelconfig/ppio/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/modelconfig/siliconcloud/index.html
Normal file
48
docs/development/modelconfig/siliconcloud/index.html
Normal file
File diff suppressed because one or more lines are too long
908
docs/development/openapi/chat/index.html
Normal file
908
docs/development/openapi/chat/index.html
Normal file
File diff suppressed because one or more lines are too long
743
docs/development/openapi/dataset/index.html
Normal file
743
docs/development/openapi/dataset/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/openapi/index.html
Normal file
44
docs/development/openapi/index.html
Normal file
File diff suppressed because one or more lines are too long
28
docs/development/openapi/index.xml
Normal file
28
docs/development/openapi/index.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>OpenAPI 接口文档 on FastGPT</title><link>https://doc.tryfastgpt.ai/docs/development/openapi/</link><description>Recent content in OpenAPI 接口文档 on FastGPT</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://doc.tryfastgpt.ai/docs/development/openapi/index.xml" rel="self" type="application/rss+xml"/><item><title>OpenAPI 介绍</title><link>https://doc.tryfastgpt.ai/docs/development/openapi/intro/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/openapi/intro/</guid><description>使用说明 linkFasGPT OpenAPI 接口允许你使用 Api Key 进行鉴权,从而操作 FastGPT 上的相关服务和资源,例如:调用应用对话接口、上传知识库数据、搜索测试等等。出于兼容性和安全考虑,并不是所有的接口都允许通过 Api Key 访问。
|
||||
如何查看 BaseURL link注意:BaseURL 不是接口地址,而是所有接口的根地址,直接请求 BaseURL 是没有用的。
|
||||
如何获取 Api Key linkFastGPT 的 API Key 有 2 类,一类是全局通用的 key (无法直接调用应用对话);一类是携带了 AppId 也就是有应用标记的 key (可直接调用应用对话)。
|
||||
我们建议,仅操作应用或者对话的相关接口使用 应用特定key,其他接口使用 通用key。
|
||||
通用key 应用特定 key 基本配置 linkOpenAPI 中,所有的接口都通过 Header.Authorization 进行鉴权。
|
||||
baseUrl: &#34;https://api.fastgpt.in/api&#34; headers: { Authorization: &#34;Bearer {{apikey}}&#34; } 发起应用对话示例
|
||||
curl --location --request POST &#39;https://api.fastgpt.in/api/v1/chat/completions&#39; \ --header &#39;Authorization: Bearer fastgpt-xxxxxx&#39; \ --header &#39;Content-Type: application/json&#39; \ --data-raw &#39;{ &#34;chatId&#34;: &#34;111&#34;, &#34;stream&#34;: false, &#34;detail&#34;: false, &#34;messages&#34;: [ { &#34;content&#34;: &#34;导演是谁&#34;, &#34;role&#34;: &#34;user&#34; } ] }&#39; 自定义用户 ID linkv4.</description></item><item><title>对话接口</title><link>https://doc.tryfastgpt.ai/docs/development/openapi/chat/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/openapi/chat/</guid><description>如何获取 AppId link可在应用详情的路径里获取 AppId。
|
||||
发起对话 link 🤖
|
||||
该接口的 API Key 需使用应用特定的 key,否则会报错。 有些包调用时,BaseUrl需要添加v1路径,有些不需要,如果出现404情况,可补充v1重试。
|
||||
请求简易应用和工作流 linkv1对话接口兼容GPT的接口!如果你的项目使用的是标准的GPT官方接口,可以直接通过修改BaseUrl和 Authorization来访问 FastGpt 应用,不过需要注意下面几个规则:
|
||||
🤖
|
||||
传入的model,temperature等参数字段均无效,这些字段由编排决定,不会根据 API 参数改变。
|
||||
不会返回实际消耗Token值,如果需要,可以设置detail=true,并手动计算 responseData 里的tokens值。
|
||||
请求 link detail=false,stream=false 响应 detail=false,stream=true 响应 detail=true,stream=false 响应 detail=true,stream=true 响应 event值 { &#34;id&#34;: &#34;adsfasf&#34;, &#34;model&#34;: &#34;&#34;, &#34;usage&#34;: { &#34;prompt_tokens&#34;: 1, &#34;completion_tokens&#34;: 1, &#34;total_tokens&#34;: 1 }, &#34;choices&#34;: [ { &#34;message&#34;: { &#34;role&#34;: &#34;assistant&#34;, &#34;content&#34;: &#34;电影《铃芽之旅》的导演是新海诚。&#34; }, &#34;finish_reason&#34;: &#34;stop&#34;, &#34;index&#34;: 0 } ] } data: {&#34;id&#34;:&#34;&#34;,&#34;object&#34;:&#34;&#34;,&#34;created&#34;:0,&#34;choices&#34;:[{&#34;delta&#34;:{&#34;content&#34;:&#34;&#34;},&#34;index&#34;:0,&#34;finish_reason&#34;:null}]} data: {&#34;id&#34;:&#34;&#34;,&#34;object&#34;:&#34;&#34;,&#34;created&#34;:0,&#34;choices&#34;:[{&#34;delta&#34;:{&#34;content&#34;:&#34;电&#34;},&#34;index&#34;:0,&#34;finish_reason&#34;:null}]} data: {&#34;id&#34;:&#34;&#34;,&#34;object&#34;:&#34;&#34;,&#34;created&#34;:0,&#34;choices&#34;:[{&#34;delta&#34;:{&#34;content&#34;:&#34;影&#34;},&#34;index&#34;:0,&#34;finish_reason&#34;:null}]} data: {&#34;id&#34;:&#34;&#34;,&#34;object&#34;:&#34;&#34;,&#34;created&#34;:0,&#34;choices&#34;:[{&#34;delta&#34;:{&#34;content&#34;:&#34;《&#34;},&#34;index&#34;:0,&#34;finish_reason&#34;:null}]} { &#34;responseData&#34;: [ // 不同模块的响应值, 不同版本具体值可能有差异,可先 log 自行查看最新值。 { &#34;moduleName&#34;: &#34;Dataset Search&#34;, &#34;price&#34;: 1.</description></item><item><title>知识库接口</title><link>https://doc.tryfastgpt.ai/docs/development/openapi/dataset/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/openapi/dataset/</guid><description>如何获取知识库ID(datasetId) 如何获取文件集合ID(collection_id) 创建训练订单 link 请求示例 响应示例 新例子
|
||||
curl --location --request POST &#39;http://localhost:3000/api/support/wallet/usage/createTrainingUsage&#39; \ --header &#39;Authorization: Bearer {{apikey}}&#39; \ --header &#39;Content-Type: application/json&#39; \ --data-raw &#39;{ &#34;datasetId&#34;: &#34;知识库 ID&#34;, &#34;name&#34;: &#34;可选,自定义订单名称,例如:文档训练-fastgpt.docx&#34; }&#39; data 为 billId,可用于添加知识库数据时进行账单聚合。
|
||||
{ &#34;code&#34;: 200, &#34;statusText&#34;: &#34;&#34;, &#34;message&#34;: &#34;&#34;, &#34;data&#34;: &#34;65112ab717c32018f4156361&#34; } 知识库 link创建一个知识库 link 请求示例 参数说明 响应示例 curl --location --request POST &#39;http://localhost:3000/api/core/dataset/create&#39; \ --header &#39;Authorization: Bearer {{authorization}}&#39; \ --header &#39;Content-Type: application/json&#39; \ --data-raw &#39;{ &#34;parentId&#34;: null, &#34;type&#34;: &#34;dataset&#34;, &#34;name&#34;:&#34;测试&#34;, &#34;intro&#34;:&#34;介绍&#34;, &#34;avatar&#34;: &#34;&#34;, &#34;vectorModel&#34;: &#34;text-embedding-ada-002&#34;, &#34;agentModel&#34;: &#34;gpt-3.</description></item><item><title>分享链接身份鉴权</title><link>https://doc.tryfastgpt.ai/docs/development/openapi/share/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/openapi/share/</guid><description>介绍 link在 FastGPT V4.6.4 中,我们修改了分享链接的数据读取方式,为每个用户生成一个 localId,用于标识用户,从云端拉取对话记录。但是这种方式仅能保障用户在同一设备同一浏览器中使用,如果切换设备或者清空浏览器缓存则会丢失这些记录。这种方式存在一定的风险,因此我们仅允许用户拉取近30天的20条记录。
|
||||
分享链接身份鉴权设计的目的在于,将 FastGPT 的对话框快速、安全的接入到你现有的系统中,仅需 2 个接口即可实现。该功能目前只在商业版中提供。
|
||||
使用说明 link免登录链接配置中,你可以选择填写身份验证栏。这是一个POST请求的根地址。在填写该地址后,分享链接的初始化、开始对话以及对话结束都会向该地址的特定接口发送一条请求。下面以host来表示凭身份验证根地址。服务器接口仅需返回是否校验成功即可,不需要返回其他数据,格式如下:
|
||||
接口统一响应格式 link { &#34;success&#34;: true, &#34;message&#34;: &#34;错误提示&#34;, &#34;msg&#34;: &#34;同message, 错误提示&#34;, &#34;data&#34;: { &#34;uid&#34;: &#34;用户唯一凭证&#34; } } FastGPT 将会判断success是否为true决定是允许用户继续操作。message与msg是等同的,你可以选择返回其中一个,当success不为true时,将会提示这个错误。
|
||||
uid是用户的唯一凭证,将会用于拉取对话记录以及保存对话记录。可参考下方实践案例。
|
||||
触发流程 link 配置教程 link1. 配置身份校验地址 link 配置校验地址后,在每次分享链接使用时,都会向对应的地址发起校验和上报请求。
|
||||
🤖
|
||||
这里仅需配置根地址,无需具体到完整请求路径。
|
||||
2. 分享链接中增加额外 query link在分享链接的地址中,增加一个额外的参数: authToken。例如:
|
||||
原始的链接:https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192
|
||||
完整链接: https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192&amp;authToken=userid12345
|
||||
这个authToken通常是你系统生成的用户唯一凭证(Token之类的)。FastGPT 会在鉴权接口的body中携带 token={{authToken}} 的参数。
|
||||
3. 编写聊天初始化校验接口 link 请求示例 鉴权成功 鉴权失败 curl --location --request POST &#39;{{host}}/shareAuth/init&#39; \ --header &#39;Content-Type: application/json&#39; \ --data-raw &#39;{ &#34;token&#34;: &#34;{{authToken}}&#34; }&#39; { &#34;success&#34;: true, &#34;data&#34;: { &#34;uid&#34;: &#34;用户唯一凭证&#34; } } 系统会拉取该分享链接下,uid 为 username123 的对话记录。</description></item></channel></rss>
|
||||
80
docs/development/openapi/intro/index.html
Normal file
80
docs/development/openapi/intro/index.html
Normal file
File diff suppressed because one or more lines are too long
258
docs/development/openapi/share/index.html
Normal file
258
docs/development/openapi/share/index.html
Normal file
File diff suppressed because one or more lines are too long
78
docs/development/proxy/cloudflare/index.html
Normal file
78
docs/development/proxy/cloudflare/index.html
Normal file
File diff suppressed because one or more lines are too long
70
docs/development/proxy/http_proxy/index.html
Normal file
70
docs/development/proxy/http_proxy/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/proxy/index.html
Normal file
44
docs/development/proxy/index.html
Normal file
File diff suppressed because one or more lines are too long
10
docs/development/proxy/index.xml
Normal file
10
docs/development/proxy/index.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>代理方案 on FastGPT</title><link>https://doc.tryfastgpt.ai/docs/development/proxy/</link><description>Recent content in 代理方案 on FastGPT</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://doc.tryfastgpt.ai/docs/development/proxy/index.xml" rel="self" type="application/rss+xml"/><item><title>Nginx 中转</title><link>https://doc.tryfastgpt.ai/docs/development/proxy/nginx/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/proxy/nginx/</guid><description>登录 Sealos linkSealos
|
||||
创建应用 link打开 「应用管理」,点击「新建应用」:
|
||||
填写基本配置 link务必开启外网访问,复制外网访问提供的地址。
|
||||
添加配置文件 link 复制下面这段配置文件,注意 server_name 后面的内容替换成第二步的外网访问地址。
|
||||
user nginx; worker_processes auto; worker_rlimit_nofile 51200; events { worker_connections 1024; } http { resolver 8.8.8.8; proxy_ssl_server_name on; access_log off; server_names_hash_bucket_size 512; client_header_buffer_size 64k; large_client_header_buffers 4 64k; client_max_body_size 50M; proxy_connect_timeout 240s; proxy_read_timeout 240s; proxy_buffer_size 128k; proxy_buffers 4 256k; server { listen 80; server_name tgohwtdlrmer.cloud.sealos.io; # 这个地方替换成 Sealos 提供的外网地址 location ~ /openai/(.*) { proxy_pass https://api.openai.com/$1$is_args$args; proxy_set_header Host api.openai.com; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 如果响应是流式的 proxy_set_header Connection &#39;&#39;; proxy_http_version 1.</description></item><item><title>HTTP 代理中转</title><link>https://doc.tryfastgpt.ai/docs/development/proxy/http_proxy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/proxy/http_proxy/</guid><description>如果你有代理工具(例如 Clash 或者 sing-box),也可以使用 HTTP 代理来访问 OpenAI。只需要添加以下两个环境变量即可:
|
||||
AXIOS_PROXY_HOST= AXIOS_PROXY_PORT= 以 Clash 为例,建议指定 api.openai.com 走代理,其他请求都直连。示例配置如下:
|
||||
mixed-port: 7890 allow-lan: false bind-address: &#39;*&#39; mode: rule log-level: warning dns: enable: true ipv6: false nameserver: - 8.8.8.8 - 8.8.4.4 cache-size: 400 proxies: - proxy-groups: - { name: &#39;♻️ 自动选择&#39;, type: url-test, proxies: [香港V01×1.5], url: &#39;https://api.openai.com&#39;, interval: 3600} rules: - &#39;DOMAIN-SUFFIX,api.openai.com,♻️ 自动选择&#39; - &#39;MATCH,DIRECT&#39; 然后给 FastGPT 添加两个环境变量:
|
||||
AXIOS_PROXY_HOST=127.0.0.1 AXIOS_PROXY_PORT=7890</description></item><item><title>Cloudflare Worker 中转</title><link>https://doc.tryfastgpt.ai/docs/development/proxy/cloudflare/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/proxy/cloudflare/</guid><description>参考 &ldquo;不做了睡觉&rdquo; 的教程
|
||||
workers 配置文件
|
||||
const TELEGRAPH_URL = &#39;https://api.openai.com&#39;; addEventListener(&#39;fetch&#39;, (event) =&gt; { event.respondWith(handleRequest(event.request)); }); async function handleRequest(request) { // 安全校验 if (request.headers.get(&#39;auth&#39;) !== &#39;auth_code&#39;) { return new Response(&#39;UnAuthorization&#39;, { status: 403 }); } const url = new URL(request.url); url.host = TELEGRAPH_URL.replace(/^https?:\/\//, &#39;&#39;); const modifiedRequest = new Request(url.toString(), { headers: request.headers, method: request.method, body: request.body, redirect: &#39;follow&#39; }); const response = await fetch(modifiedRequest); const modifiedResponse = new Response(response.body, response); // 添加允许跨域访问的响应头 modifiedResponse.</description></item></channel></rss>
|
||||
92
docs/development/proxy/nginx/index.html
Normal file
92
docs/development/proxy/nginx/index.html
Normal file
File diff suppressed because one or more lines are too long
57
docs/development/sealos/index.html
Normal file
57
docs/development/sealos/index.html
Normal file
File diff suppressed because one or more lines are too long
74
docs/development/upgrading/40/index.html
Normal file
74
docs/development/upgrading/40/index.html
Normal file
File diff suppressed because one or more lines are too long
49
docs/development/upgrading/41/index.html
Normal file
49
docs/development/upgrading/41/index.html
Normal file
File diff suppressed because one or more lines are too long
51
docs/development/upgrading/42/index.html
Normal file
51
docs/development/upgrading/42/index.html
Normal file
File diff suppressed because one or more lines are too long
54
docs/development/upgrading/421/index.html
Normal file
54
docs/development/upgrading/421/index.html
Normal file
File diff suppressed because one or more lines are too long
50
docs/development/upgrading/43/index.html
Normal file
50
docs/development/upgrading/43/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/44/index.html
Normal file
48
docs/development/upgrading/44/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/441/index.html
Normal file
48
docs/development/upgrading/441/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/442/index.html
Normal file
48
docs/development/upgrading/442/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/445/index.html
Normal file
48
docs/development/upgrading/445/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/upgrading/446/index.html
Normal file
44
docs/development/upgrading/446/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/447/index.html
Normal file
48
docs/development/upgrading/447/index.html
Normal file
File diff suppressed because one or more lines are too long
79
docs/development/upgrading/45/index.html
Normal file
79
docs/development/upgrading/45/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/451/index.html
Normal file
48
docs/development/upgrading/451/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/upgrading/452/index.html
Normal file
44
docs/development/upgrading/452/index.html
Normal file
File diff suppressed because one or more lines are too long
60
docs/development/upgrading/46/index.html
Normal file
60
docs/development/upgrading/46/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/upgrading/461/index.html
Normal file
44
docs/development/upgrading/461/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/462/index.html
Normal file
48
docs/development/upgrading/462/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/463/index.html
Normal file
48
docs/development/upgrading/463/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/464/index.html
Normal file
48
docs/development/upgrading/464/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/upgrading/465/index.html
Normal file
44
docs/development/upgrading/465/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/upgrading/466/index.html
Normal file
44
docs/development/upgrading/466/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/467/index.html
Normal file
48
docs/development/upgrading/467/index.html
Normal file
File diff suppressed because one or more lines are too long
98
docs/development/upgrading/468/index.html
Normal file
98
docs/development/upgrading/468/index.html
Normal file
File diff suppressed because one or more lines are too long
51
docs/development/upgrading/469/index.html
Normal file
51
docs/development/upgrading/469/index.html
Normal file
File diff suppressed because one or more lines are too long
59
docs/development/upgrading/47/index.html
Normal file
59
docs/development/upgrading/47/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/471/index.html
Normal file
48
docs/development/upgrading/471/index.html
Normal file
File diff suppressed because one or more lines are too long
45
docs/development/upgrading/48/index.html
Normal file
45
docs/development/upgrading/48/index.html
Normal file
File diff suppressed because one or more lines are too long
53
docs/development/upgrading/481/index.html
Normal file
53
docs/development/upgrading/481/index.html
Normal file
File diff suppressed because one or more lines are too long
51
docs/development/upgrading/4810/index.html
Normal file
51
docs/development/upgrading/4810/index.html
Normal file
File diff suppressed because one or more lines are too long
97
docs/development/upgrading/4811/index.html
Normal file
97
docs/development/upgrading/4811/index.html
Normal file
File diff suppressed because one or more lines are too long
52
docs/development/upgrading/4812/index.html
Normal file
52
docs/development/upgrading/4812/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/upgrading/4813/index.html
Normal file
44
docs/development/upgrading/4813/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/upgrading/4814/index.html
Normal file
44
docs/development/upgrading/4814/index.html
Normal file
File diff suppressed because one or more lines are too long
52
docs/development/upgrading/4815/index.html
Normal file
52
docs/development/upgrading/4815/index.html
Normal file
File diff suppressed because one or more lines are too long
69
docs/development/upgrading/4816/index.html
Normal file
69
docs/development/upgrading/4816/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/4817/index.html
Normal file
48
docs/development/upgrading/4817/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/4818/index.html
Normal file
48
docs/development/upgrading/4818/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/4819/index.html
Normal file
48
docs/development/upgrading/4819/index.html
Normal file
File diff suppressed because one or more lines are too long
46
docs/development/upgrading/482/index.html
Normal file
46
docs/development/upgrading/482/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/4820/index.html
Normal file
48
docs/development/upgrading/4820/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/upgrading/4821/index.html
Normal file
44
docs/development/upgrading/4821/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/4822/index.html
Normal file
48
docs/development/upgrading/4822/index.html
Normal file
File diff suppressed because one or more lines are too long
48
docs/development/upgrading/4823/index.html
Normal file
48
docs/development/upgrading/4823/index.html
Normal file
File diff suppressed because one or more lines are too long
44
docs/development/upgrading/483/index.html
Normal file
44
docs/development/upgrading/483/index.html
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user