-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add feishu & yuque dataset (#3379) * feat: add feishu & yuque dataset * fix ts * fix ts * move type position * fix * fix: merge interface * fix * feat: dingtalk sso support (#3408) * fix: optional sso state * feat: dingtalk bot * feat: dingtalk sso login * chore: move i18n to user namespace * feat: dingtalk bot integration (#3415) * feat: dingtalk bot integration * docs: config dingtalk bot * feat:sear XNG服务 (#3413) * feat:sear XNG服务 * 补充了courseUrl * 添加了官方文档 * 错误时返回情况修正了一下 * Tracks (#3420) * feat: node intro * feat: add domain track * dingding sso login * perf: api dataset code and add doc * feat: tracks * feat: searXNG plugins * fix: ts * feat: delete node tracks (#3423) * fix: dingtalk bot GET verification (#3424) * 4.8.16 test: fix: plugin inputs render;fix: ui offset (#3426) * fix: ui offset * perf: dingding talk * fix: plugin inputs render * feat: menu all folder (#3429) * fix: recall code --------- Co-authored-by: heheer <[email protected]> Co-authored-by: a.e. <[email protected]> Co-authored-by: Jiangween <[email protected]>
- Loading branch information
1 parent
82871be
commit bd79e77
Showing
154 changed files
with
2,519 additions
and
300 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
weight: 490 | ||
title: '商业版后台' | ||
description: '商业版后台使用教程' | ||
icon: 'chat_bubble' | ||
draft: false | ||
images: [] | ||
--- | ||
<!-- 470 ~ 500 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
weight: 490 | ||
title: '钉钉 SSO 配置' | ||
description: '钉钉 SSO 登录' | ||
icon: 'chat_bubble' | ||
draft: false | ||
images: [] | ||
--- | ||
|
||
## 1. 注册钉钉应用 | ||
|
||
登录 [钉钉开放平台](https://open-dev.dingtalk.com/fe/app?hash=%23%2Fcorp%2Fapp#/corp/app),创建一个应用。 | ||
|
||
![alt text](/imgs/image-25.png) | ||
|
||
## 2. 配置钉钉应用安全设置 | ||
|
||
点击进入创建好的应用后,点开`安全设置`,配置出口 IP(服务器 IP),和重定向 URL。重定向 URL 填写逻辑: | ||
|
||
`{{fastgpt 域名}}/login/provider` | ||
|
||
![alt text](/imgs/image-26.png) | ||
|
||
## 3. 设置钉钉应用权限 | ||
|
||
点击进入创建好的应用后,点开`权限设置`,开放两个权限: `个人手机号信息`和`通讯录个人信息读权限` | ||
|
||
![alt text](/imgs/image-27.png) | ||
|
||
## 4. 发布应用 | ||
|
||
点击进入创建好的应用后,点开`版本管理与发布`,随便创建一个新版本即可。 | ||
|
||
## 5. 在 FastGPT Admin 配置钉钉应用 id | ||
|
||
名字都是对应上,直接填写即可。 | ||
|
||
| | | | ||
| --- | --- | | ||
| ![alt text](/imgs/image-28.png)| ![alt text](/imgs/image-29.png) | | ||
|
||
## 6. 测试 | ||
|
||
![alt text](/imgs/image-30.png) |
59 changes: 59 additions & 0 deletions
59
docSite/content/zh-cn/docs/guide/knowledge_base/lark_dataset.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
title: '飞书知识库' | ||
description: 'FastGPT 飞书知识库功能介绍和使用方式' | ||
icon: 'language' | ||
draft: false | ||
toc: true | ||
weight: 405 | ||
--- | ||
|
||
| | | | ||
| --- | --- | | ||
| ![alt text](/imgs/image-39.png) | ![alt text](/imgs/image-40.png) | | ||
|
||
FastGPT v4.8.16 版本开始,商业版用户支持飞书知识库导入,用户可以通过配置飞书应用的 appId 和 appSecret,并选中一个**文档空间的顶层文件夹**来导入飞书知识库。目前处于测试阶段,部分交互有待优化。 | ||
|
||
由于飞书限制,无法直接获取所有文档内容,目前仅可以获取共享空间下文件目录的内容,无法获取个人空间和知识库里的内容。 | ||
|
||
|
||
## 1. 创建飞书应用 | ||
|
||
打开 [飞书开放平台](https://open.feishu.cn/?lang=zh-CN),点击**创建应用**,选择**自建应用**,然后填写应用名称。 | ||
|
||
## 2. 配置应用权限 | ||
|
||
创建应用后,进入应用可以配置相关权限,这里需要增加两个权限: | ||
|
||
1. 获取云空间文件夹下的云文档清单 | ||
2. 查看新版文档 | ||
|
||
![alt text](/imgs/image-41.png) | ||
|
||
## 3. 获取 appId 和 appSecret | ||
|
||
![alt text](/imgs/image-42.png) | ||
|
||
## 4. 给 Folder 增加权限 | ||
|
||
可参考飞书教程: https://open.feishu.cn/document/server-docs/docs/drive-v1/faq#b02e5bfb | ||
|
||
大致总结为: | ||
|
||
1. 把刚刚创建的应用拉入一个群里 | ||
2. 给这个群增加目录权限 | ||
|
||
如果你的目录已经给全员组增加权限了,则可以跳过上面步骤,直接获取 Folder Token。 | ||
|
||
![alt text](/imgs/image-43.png) | ||
|
||
## 5. 获取 Folder Token | ||
|
||
可以页面路径上获取 Folder Token,注意不要把问号复制进来。 | ||
|
||
![alt text](/imgs/image-44.png) | ||
|
||
## 6. 创建知识库 | ||
|
||
根据 3 和 5 获取到的 3 个参数,创建知识库,选择飞书文件库类型,然后填入对应的参数,点击创建。 | ||
|
||
![alt text](/imgs/image-39.png) |
42 changes: 42 additions & 0 deletions
42
docSite/content/zh-cn/docs/guide/knowledge_base/yuque_dataset.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: '语雀文件库' | ||
description: 'FastGPT 语雀文件库功能介绍和使用方式' | ||
icon: 'language' | ||
draft: false | ||
toc: true | ||
weight: 405 | ||
--- | ||
|
||
| | | | ||
| --- | --- | | ||
| ![alt text](/imgs/image-31.png) | ![alt text](/imgs/image-32.png) | | ||
|
||
FastGPT v4.8.16 版本开始,商业版用户支持语雀文件库导入,用户可以通过配置语雀的 token 和 uid 来导入语雀文档库。目前处于测试阶段,部分交互有待优化。 | ||
|
||
## 1. 获取语雀的 token 和 uid | ||
|
||
在语雀首页 - 个人头像 - 设置,可找到对应参数。 | ||
|
||
![alt text](/imgs/image-36.png) | ||
|
||
参考下图获取 Token 和 User ID,注意给 Token 赋值权限: | ||
|
||
| 获取 Token | 增加权限 | 获取 User ID | | ||
| --- | --- | --- | | ||
| ![alt text](/imgs/image-33.png) | ![alt text](/imgs/image-34.png) | ![alt text](/imgs/image-35.png) | | ||
|
||
## 2. 创建知识库 | ||
|
||
使用上一步获取的 token 和 uid,创建知识库,选择语雀文件库类型,然后填入对应的参数,点击创建。 | ||
|
||
![alt text](/imgs/image-37.png) | ||
|
||
![alt text](/imgs/image-31.png) | ||
|
||
## 3. 导入文档 | ||
|
||
创建完知识库后,点击`添加文件`即可导入语雀的文档库,跟随引导即可。 | ||
|
||
语雀知识库支持定时同步功能,每天会不定时的扫描一次,如果文档有更新,则会进行同步,也可以进行手动同步。 | ||
|
||
![alt text](/imgs/image-38.png) |
178 changes: 178 additions & 0 deletions
178
docSite/content/zh-cn/docs/guide/plugins/searxng_plugin_guide.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
--- | ||
title: "SearXNG 搜索插件配置与使用说明" | ||
description: "FastGPT SearXNG 搜索插件配置指南" | ||
icon: "search" | ||
draft: false | ||
toc: true | ||
weight: 303 | ||
--- | ||
|
||
[SearXNG](https://github.com/searxng/searxng)是一款免费的互联网元搜索引擎,它汇总了来自各种搜索服务和数据库的结果。它不会跟踪或分析用户。用户可以自行部署它进行使用。本文介绍 Searxng 的部署以及接入 FastGPT 插件。 | ||
|
||
|
||
## 1. 部署应用 | ||
|
||
这里介绍在 Sealos 中部署 SearXNG 的方法。Docker 部署,可以直接参考 [SearXNG 官方教程](https://github.com/searxng/searxng)。 | ||
|
||
点击打开 [Sealos 北京区](https://bja.sealos.run/),点击应用部署,并新建一个应用: | ||
|
||
| 打开应用部署 | 点击新建应用 | | ||
| --- | --- | | ||
| ![](/imgs/searxng_plugin_guide1.png) | ![alt text](/imgs/image-45.png) | | ||
|
||
## 2. 部署配置 | ||
|
||
把下面参数,填入配置中: | ||
|
||
* 镜像名: searxng/searxng:latest | ||
* CPU: 0.2 | ||
* 内存: 512M | ||
* 容器暴露端口: 8080 | ||
* 开启公网访问 | ||
* 点击高级配置,填写环境变量和配置文件 | ||
|
||
![alt text](/imgs/image-50.png) | ||
|
||
**环境变量** | ||
|
||
填下面两个内容,主要是为了减小并发,不然内存占用非常大。 | ||
|
||
``` | ||
UWSGI_WORKERS=4 | ||
UWSGI_THREADS=4 | ||
``` | ||
|
||
**配置文件** | ||
|
||
新增一个配置文件,文件名:`/etc/searx/settings.yml` | ||
文件内容: | ||
|
||
```txt | ||
general: | ||
debug: false | ||
instance_name: "searxng" | ||
privacypolicy_url: false | ||
donation_url: false | ||
contact_url: false | ||
enable_metrics: true | ||
open_metrics: '' | ||
brand: | ||
new_issue_url: https://github.com/searxng/searxng/issues/new | ||
docs_url: https://docs.searxng.org/ | ||
public_instances: https://searx.space | ||
wiki_url: https://github.com/searxng/searxng/wiki | ||
issue_url: https://github.com/searxng/searxng/issues | ||
search: | ||
safe_search: 0 | ||
autocomplete: "" | ||
autocomplete_min: 4 | ||
default_lang: "auto" | ||
ban_time_on_fail: 5 | ||
max_ban_time_on_fail: 120 | ||
formats: | ||
- html | ||
server: | ||
port: 8080 | ||
bind_address: "0.0.0.0" | ||
base_url: false | ||
limiter: false | ||
public_instance: false | ||
secret_key: "example" | ||
image_proxy: false | ||
http_protocol_version: "1.0" | ||
method: "POST" | ||
default_http_headers: | ||
X-Content-Type-Options: nosniff | ||
X-Download-Options: noopen | ||
X-Robots-Tag: noindex, nofollow | ||
Referrer-Policy: no-referrer | ||
redis: | ||
url: false | ||
ui: | ||
static_path: "" | ||
static_use_hash: false | ||
templates_path: "" | ||
default_theme: simple | ||
default_locale: "" | ||
query_in_title: false | ||
infinite_scroll: false | ||
center_alignment: false | ||
theme_args: | ||
simple_style: auto | ||
outgoing: | ||
request_timeout: 30.0 | ||
max_request_timeout: 40.0 | ||
pool_connections: 200 | ||
pool_maxsize: 50 | ||
enable_http2: false | ||
retries: 5 | ||
engines: | ||
- name: bing | ||
engine: bing | ||
shortcut: bi | ||
doi_resolvers: | ||
oadoi.org: 'https://oadoi.org/' | ||
doi.org: 'https://doi.org/' | ||
doai.io: 'https://dissem.in/' | ||
sci-hub.se: 'https://sci-hub.se/' | ||
sci-hub.st: 'https://sci-hub.st/' | ||
sci-hub.ru: 'https://sci-hub.ru/' | ||
default_doi_resolver: 'oadoi.org' | ||
``` | ||
|
||
国内目前只有 Bing 引擎可以正常用,所以上面的配置只配置了 bing 引擎。如果在海外部署,可以使用[Sealos 新加坡可用区](https://cloud.sealos.io/),并配置其他搜索引擎,可以参考[SearXNG 默认配置文件](https://github.com/searxng/searxng/blob/master/searx/settings.yml), 从里面复制一些 engine 配置。例如: | ||
|
||
``` | ||
- name: duckduckgo | ||
engine: duckduckgo | ||
shortcut: ddg | ||
- name: google | ||
engine: google | ||
shortcut: go | ||
``` | ||
|
||
## 3. FastGPT 使用 | ||
|
||
复制 Sealos 部署后提供的公网地址,填入 FastGPT 的 SearXNG 插件的 URL 中。 | ||
|
||
| 复制公网地址| 填入 URL | | ||
| --- | --- | | ||
| ![alt text](/imgs/image-48.png) | ![alt text](/imgs/image-49.png) | | ||
|
||
## 返回格式 | ||
|
||
* 成功时返回搜索结果数组: | ||
|
||
```Bash | ||
{ | ||
"result": "[{\"title\":\"标题1\",\"link\":\"链接1\",\"snippet\":\"摘要1\"}, ...]" | ||
} | ||
``` | ||
|
||
* 失败时通过 Promise.reject 可能返回错误信息: | ||
|
||
```Bash | ||
- "缺少查询参数" | ||
- "缺少url" | ||
- "Failed to fetch data from Search XNG" | ||
``` | ||
|
||
一般问题来源于参数缺失与服务部署,如有更多问题可在用户群提问。 | ||
|
||
## FAQ | ||
|
||
### 无搜索结果 | ||
|
||
1. 先直接打开外网地址,测试是否可以正常搜索。 | ||
2. 检查是否有超时的搜索引擎,通过 API 调用时不会返回结果。 |
Oops, something went wrong.