Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
45382426
authored
Sep 15, 2023
by
Carson Yang
Committed by
GitHub
Sep 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: fix typo (#307)
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>
parent
a8fdffc3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
30 deletions
+32
-30
docSite/assets/docs/scss/custom/pages/_custom.scss
+1
-1
docSite/content/docs/use-cases/feishu.md
+19
-20
docSite/content/docs/use-cases/onwechat.md
+8
-8
docSite/resources/_gen/assets/scss/docs/scss/style.scss_b97bf3f19a5ec64d7a7c5d60f7e31818.content
+4
-1
No files found.
docSite/assets/docs/scss/custom/pages/_custom.scss
View file @
45382426
.docs-content
.main-content
img
,
.docs-content
.main-content
svg
:not
(
.gitinfo
svg
)
{
.docs-content
.main-content
img
,
.docs-content
.main-content
svg
:not
(
.gitinfo
svg
)
:not
(
a
svg
)
{
max-width
:
80%
!
important
;
height
:
auto
;
display
:
block
!
important
;
...
...
docSite/content/docs/use-cases/feishu.md
View file @
45382426
---
title
:
"
对接
飞书
"
description
:
"
FastGPT
对接
飞书
"
title
:
"
接入飞书
"
description
:
"
FastGPT
接入飞书机器人
"
icon
:
"
chat"
draft
:
false
toc
:
true
weight
:
32
0
weight
:
32
2
---
# FastGPT一分钟接入飞书
# FastGPT
一分钟接入飞书
[
Feishu
-GPT
GitHub 地址
](
https://github.com/ConnectAI-E/Feishu-OpenAI
)
[
Feishu
OpenAI
GitHub 地址
](
https://github.com/ConnectAI-E/Feishu-OpenAI
)
由于 FastGPT 的
OpenAPI 功能和 GPT 的规范一直,可以很方便接入第三方系统。
由于 FastGPT 的
API 接口和 OpenAI 的规范一致,可以无需变更第三方应用即可使用 FastGPT 上编排好的应用。API 使用可参考
[
这篇文章
](
/docs/use-cases/openai/
)
。编排示例,可参考
[
高级编排介绍
](
/docs/workflow/intro
)
## 1. 获取 FastGPT
的
OpenAPI 秘钥
## 1. 获取 FastGPT
的
OpenAPI 秘钥
依次选择应用 -> 「API访问」,然后点击「API 密钥」来创建密钥。
[
参考这篇文章
](
/docs/use-cases/openai/
)
依次选择应用 -> 「API
访问」,然后点击「API 密钥」来创建密钥。
[
参考这篇文章
](
/docs/use-cases/openai/
)
!
[
](/imgs/fastgpt-api.png)
...
...
@@ -23,17 +23,15 @@ weight: 320
## 2. 部署飞书服务
推荐使用
Railway
一键部署
推荐使用
Railway
一键部署
[

](https://railway.app/template/10D-TF?referralCode=oMcVS2)
参考环境变量配置:
!
[
](/imgs/feishu-env.png)
FastGPT集成
**重点参数:**
FastGPT
集成
**重点参数:**
```
bash
#上一步FastGPT的OpenAPI 秘钥
...
...
@@ -44,29 +42,29 @@ API_URL=https://fastgpt.run/api/openapi
## 3. 创建飞书机器人
1.
前往
[
开发者平台
](
https://open.feishu.cn/app?lang=zh-CN
)
创建应用,
并获取到 APPID 和 Secret
1.
前往
[
开发者平台
](
https://open.feishu.cn/app?lang=zh-CN
)
创建应用 ,
并获取到 APPID 和 Secret
2.
前往
`应用功能-机器人`
, 创建机器人
3.
从 cpolar、serverless 或 Railway 获得公网地址,在飞书机器人后台的
`事件订阅`
板块填写。例如,
-
`http://xxxx.r6.cpolar.top`
为 cpolar 暴露的公网地址
-
`/webhook/event`
为统一的应用路由
-
`http://xxxx.r6.cpolar.top`
为 cpolar 暴露的公网地址
-
`/webhook/event`
为统一的应用路由
-
最终的回调地址为
`http://xxxx.r6.cpolar.top/webhook/event`
4.
在飞书机器人后台的
`机器人`
板块,填写消息卡片请求网址。例如,
-
`http://xxxx.r6.cpolar.top`
为 cpolar 暴露的公网地址
-
`/webhook/card`
为统一的应用路由
-
`http://xxxx.r6.cpolar.top`
为 cpolar 暴露的公网地址
-
`/webhook/card`
为统一的应用路由
-
最终的消息卡片请求网址为
`http://xxxx.r6.cpolar.top/webhook/card`
5.
在事件订阅板块,搜索三个词
`机器人进群`
、
`接收消息`
、
`消息已读`
, 把他们后面所有的权限全部勾选。 进入权限管理界面,搜索
`图片`
, 勾选
`获取与上传图片或文件资源`
。 最终会添加下列回调事件
-
im:resource(获取与上传图片或文件资源)
-
im:message
-
im:message.group_at_msg(获取群组中所有消息)
-
im:message.group_at_msg:readonly(接收群聊中
@
机器人消息事件)
-
im:message.group_at_msg:readonly(接收群聊中
@
机器人消息事件)
-
im:message.p2p_msg(获取用户发给机器人的单聊消息)
-
im:message.p2p_msg:readonly(读取用户发给机器人的单聊消息)
-
im:message:send_as_bot(获取用户在群组中
@
机器人的消息)
-
im:message:send_as_bot(获取用户在群组中
@
机器人的消息)
-
im:chat:readonly(获取群组信息)
-
im:chat(获取与更新群组信息)
## 4. 测试飞书机器人
私聊机器人,或者群里艾特它,就可以基于
FastGPT
的应用进行回答啦
私聊机器人,或者群里艾特它,就可以基于
FastGPT
的应用进行回答啦
!
[
](/imgs/feishu-res.png)
\ No newline at end of file
docSite/content/docs/use-cases/onwechat.md
View file @
45382426
---
title
:
"
对接
OnWeC
hat"
description
:
"
FastGPT
对接
OnWeC
hat"
title
:
"
对接
chatgpt-on-wec
hat"
description
:
"
FastGPT
对接
chatgpt-on-wec
hat"
icon
:
"
chat"
draft
:
false
toc
:
true
weight
:
320
---
# 1 分钟对接
OnWeC
hat
# 1 分钟对接
chatgpt-on-wec
hat
[
OnWeC
hat GitHub 地址
](
https://github.com/zhayujie/chatgpt-on-wechat
)
[
chatgpt-on-wec
hat GitHub 地址
](
https://github.com/zhayujie/chatgpt-on-wechat
)
由于 FastGPT 的
OpenAPI 功能和 GPT 的对齐,可以无需变更原来的应用即可使用 FastGPT 上编排好的应用。API 使用,可
[
参考
这篇文章
](
/docs/use-cases/openai/
)
。编排示例,可参考
[
高级编排介绍
](
/docs/workflow/intro
)
由于 FastGPT 的
API 接口和 OpenAI 的规范一致,可以无需变更原来的应用即可使用 FastGPT 上编排好的应用。API 使用可参考
[
这篇文章
](
/docs/use-cases/openai/
)
。编排示例,可参考
[
高级编排介绍
](
/docs/workflow/intro
)
## 1. 获取 OpenAPI 秘钥
...
...
@@ -29,7 +29,7 @@ weight: 320
这个秘钥将会调用指定的应用。
## 3. 创建
OnWeChat
docker-compose.yml 文件
## 3. 创建 docker-compose.yml 文件
只需要修改
`OPEN_AI_API_KEY`
和
`OPEN_AI_API_BASE`
两个环境变量即可。其中
`OPEN_AI_API_KEY`
为第二步的组合秘钥,
`OPEN_AI_API_BASE`
为 FastGPT 的 OpenAPI 地址,例如:
`https://fastgpt.run/api/openapi/v1`
。
...
...
@@ -67,9 +67,9 @@ services:
```
## 4. 运行
OnWeC
hat
## 4. 运行
chatgpt-on-wec
hat
```
bas
e
```
bas
h
docker-compose pull
docker-compose up
-d
```
...
...
docSite/resources/_gen/assets/scss/docs/scss/style.scss_b97bf3f19a5ec64d7a7c5d60f7e31818.content
View file @
45382426
...
...
@@ -11921,7 +11921,7 @@ div.code-toolbar > .toolbar > .toolbar-item > span:focus {
width: 20.1rem;
padding-left: 1rem; } }
.docs-content .main-content img, .docs-content .main-content svg:not(.gitinfo svg) {
.docs-content .main-content img, .docs-content .main-content svg:not(.gitinfo svg)
:not(a svg)
{
max-width: 80% !important;
height: auto;
display: block !important;
...
...
@@ -11947,6 +11947,9 @@ li p {
margin-top: 1rem !important;
margin-bottom: 1rem; }
footer {
height: 118px !important; }
/*
footer a:hover {
text-decoration: none !important;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment