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
c8a35822
authored
Mar 06, 2025
by
Archer
Committed by
GitHub
Mar 06, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: doc (#4005)
* perf: doc * doc
parent
d05259de
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
29 deletions
+34
-29
.github/workflows/docs-deploy-kubeconfig.yml
+0
-2
.github/workflows/docs-deploy-vercel.yml
+0
-2
.github/workflows/docs-preview.yml
+0
-2
README.md
+1
-2
docSite/content/zh-cn/docs/development/custom-models/marker.md
+18
-3
plugins/model/pdf-marker/Readme.md
+15
-18
No files found.
.github/workflows/docs-deploy-kubeconfig.yml
View file @
c8a35822
...
@@ -6,8 +6,6 @@ on:
...
@@ -6,8 +6,6 @@ on:
-
'
docSite/**'
-
'
docSite/**'
branches
:
branches
:
-
'
main'
-
'
main'
tags
:
-
'
v*.*.*'
jobs
:
jobs
:
build-fastgpt-docs-images
:
build-fastgpt-docs-images
:
...
...
.github/workflows/docs-deploy-vercel.yml
View file @
c8a35822
...
@@ -7,8 +7,6 @@ on:
...
@@ -7,8 +7,6 @@ on:
-
'
docSite/**'
-
'
docSite/**'
branches
:
branches
:
-
'
main'
-
'
main'
tags
:
-
'
v*.*.*'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs
:
jobs
:
...
...
.github/workflows/docs-preview.yml
View file @
c8a35822
...
@@ -4,8 +4,6 @@ on:
...
@@ -4,8 +4,6 @@ on:
pull_request_target
:
pull_request_target
:
paths
:
paths
:
-
'
docSite/**'
-
'
docSite/**'
branches
:
-
'
main'
workflow_dispatch
:
workflow_dispatch
:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
...
...
README.md
View file @
c8a35822
...
@@ -107,7 +107,6 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
...
@@ -107,7 +107,6 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
*
[
系统配置文件说明
](
https://doc.tryfastgpt.ai/docs/development/configuration/
)
*
[
系统配置文件说明
](
https://doc.tryfastgpt.ai/docs/development/configuration/
)
*
[
多模型配置方案
](
https://doc.tryfastgpt.ai/docs/development/modelconfig/one-api/
)
*
[
多模型配置方案
](
https://doc.tryfastgpt.ai/docs/development/modelconfig/one-api/
)
*
[
版本更新/升级介绍
](
https://doc.tryfastgpt.ai/docs/development/upgrading/
)
*
[
版本更新/升级介绍
](
https://doc.tryfastgpt.ai/docs/development/upgrading/
)
*
[
AI Proxy API调用地址
](
https://sealos.run/aiproxy/?k=fastgpt-github/
)
*
[
OpenAPI API 文档
](
https://doc.tryfastgpt.ai/docs/development/openapi/
)
*
[
OpenAPI API 文档
](
https://doc.tryfastgpt.ai/docs/development/openapi/
)
*
[
知识库结构详解
](
https://doc.tryfastgpt.ai/docs/guide/knowledge_base/rag/
)
*
[
知识库结构详解
](
https://doc.tryfastgpt.ai/docs/guide/knowledge_base/rag/
)
...
@@ -123,7 +122,6 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
...
@@ -123,7 +122,6 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
-
[
Laf:3 分钟快速接入三方应用
](
https://github.com/labring/laf
)
-
[
Laf:3 分钟快速接入三方应用
](
https://github.com/labring/laf
)
-
[
Sealos:快速部署集群应用
](
https://github.com/labring/sealos
)
-
[
Sealos:快速部署集群应用
](
https://github.com/labring/sealos
)
-
[
AI Proxy API调用地址
](
https://sealos.run/aiproxy/?k=fastgpt-github/
)
-
[
One API:多模型管理,支持 Azure、文心一言等
](
https://github.com/songquanpeng/one-api
)
-
[
One API:多模型管理,支持 Azure、文心一言等
](
https://github.com/songquanpeng/one-api
)
<a
href=
"#readme"
>
<a
href=
"#readme"
>
...
@@ -132,6 +130,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
...
@@ -132,6 +130,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
## 🌿 第三方生态
## 🌿 第三方生态
-
[
AI Proxy: 国内模型聚合服务
](
https://sealos.run/aiproxy/?k=fastgpt-github/
)
-
[
SiliconCloud (硅基流动) —— 开源模型在线体验平台
](
https://cloud.siliconflow.cn/i/TR9Ym0c4
)
-
[
SiliconCloud (硅基流动) —— 开源模型在线体验平台
](
https://cloud.siliconflow.cn/i/TR9Ym0c4
)
-
[
COW 个人微信/企微机器人
](
https://doc.tryfastgpt.ai/docs/use-cases/external-integration/onwechat/
)
-
[
COW 个人微信/企微机器人
](
https://doc.tryfastgpt.ai/docs/use-cases/external-integration/onwechat/
)
...
...
docSite/content/zh-cn/docs/development/custom-models/marker.md
View file @
c8a35822
...
@@ -22,6 +22,7 @@ PDF 是一个相对复杂的文件格式,在 FastGPT 内置的 pdf 解析器
...
@@ -22,6 +22,7 @@ PDF 是一个相对复杂的文件格式,在 FastGPT 内置的 pdf 解析器
参考文档
[
Marker 安装教程
](
https://github.com/labring/FastGPT/tree/main/plugins/model/pdf-marker
)
,安装 Marker 模型。封装的 API 已经适配了 FastGPT 自定义解析服务。
参考文档
[
Marker 安装教程
](
https://github.com/labring/FastGPT/tree/main/plugins/model/pdf-marker
)
,安装 Marker 模型。封装的 API 已经适配了 FastGPT 自定义解析服务。
这里介绍快速 Docker 安装的方法:
这里介绍快速 Docker 安装的方法:
```
dockerfile
```
dockerfile
docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.2
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="2" 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="2" crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.2
...
@@ -79,10 +80,24 @@ docker run --gpus all -itd -p 7231:7232 --name model_pdf_v2 -e PROCESSES_PER_GPU
...
@@ -79,10 +80,24 @@ docker run --gpus all -itd -p 7231:7232 --name model_pdf_v2 -e PROCESSES_PER_GPU
上图是分块后的结果,下图是 pdf 原文。整体图片、公式、表格都可以提取出来,效果还是杠杠的。
上图是分块后的结果,下图是 pdf 原文。整体图片、公式、表格都可以提取出来,效果还是杠杠的。
不过要注意的是,
[
Marker
](
https://github.com/VikParuchuri/marker
)
的协议是
`GPL-3.0 license`
,请在遵守协议的前提下使用。
不过要注意的是,
[
Marker
](
https://github.com/VikParuchuri/marker
)
的协议是
`GPL-3.0 license`
,请在遵守协议的前提下使用。
## 旧版 Marker 使用方法
## 旧版 Marker 使用方法
如需使用旧版Marker可以使用以下命令:
FastGPT V4.9.0 版本之前,可以用以下方式,试用 Marker 解析服务。
安装和运行 Marker 服务:
```
dockerfile
```
dockerfile
docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.1
docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.1
docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 -e PROCESSES_PER_GPU="2" crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.1
docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 -e PROCESSES_PER_GPU="2" crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.1
```
```
并将 FastGPT 文件配置中的url改为 "http://xxxx.com/v1/parse/file"
\ No newline at end of file
并修改 FastGPT 环境变量:
```
CUSTOM_READ_FILE_URL=http://xxxx.com/v1/parse/file
CUSTOM_READ_FILE_EXTENSION=pdf
```
*
CUSTOM_READ_FILE_URL - 自定义解析服务的地址, host改成解析服务的访问地址,path 不能变动。
*
CUSTOM_READ_FILE_EXTENSION - 支持的文件后缀,多个文件类型,可用逗号隔开。
\ No newline at end of file
plugins/model/pdf-marker/Readme.md
View file @
c8a35822
...
@@ -83,19 +83,14 @@ export PROCESSES_PER_GPU="1"
...
@@ -83,19 +83,14 @@ export PROCESSES_PER_GPU="1"
```bash
```bash
sudo docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 -e PROCESSES_PER_GPU="2" model_pdf
sudo docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 -e PROCESSES_PER_GPU="2" model_pdf
```
```
## 快速构建镜像(推荐)
## 快速构建镜像(推荐)
### marker v0.1
```
dockerfile
docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.1
docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 -e PROCESSES_PER_GPU="2" crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.1
```
*注意*:参数PROCESSES_PER_GPU设置每张显卡上文件处理的并行数量,24G的显卡可以设置为2。在多显卡的环境中会自动切换显卡来运行多文件的并行处理。
### marker v0.2
```
dockerfile
```
dockerfile
docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.2
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="2" 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="2" crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.2
```
```
# 访问示例
# 访问示例
marker v0.1:用Post方法访问端口为 `7321 ` 的 `v1/parse/file` 服务
marker v0.1:用Post方法访问端口为 `7321 ` 的 `v1/parse/file` 服务
...
@@ -106,19 +101,21 @@ marker v0.2:用Post方法访问端口为 `7321 ` 的 `v2/parse/file` 服务
...
@@ -106,19 +101,21 @@ marker v0.2:用Post方法访问端口为 `7321 ` 的 `v2/parse/file` 服务
- 访问方法
- 访问方法
- v0.2
```
curl --location --request POST "http://localhost:7231/v2/parse/file"
\
--header "Authorization: Bearer your_access_token"
\
--form "file=@./file/chinese_test.pdf"
```
- v0.1
- v0.1
```
curl --location --request POST "http://localhost:7231/v1/parse/file"
\
--header "Authorization: Bearer your_access_token"
\
--form "file=@./file/chinese_test.pdf"
```
参数:file-->本地文件的地址
- v0.2
```
```
curl --location --request POST "http://localhost:7231/v2/parse/file"
\
curl --location --request POST "http://localhost:7231/v1/parse/file"
\
--header "Authorization: Bearer your_access_token"
\
--header "Authorization: Bearer your_access_token"
\
--form "file=@./file/chinese_test.pdf"
--form "file=@./file/chinese_test.pdf"
```
```
参数:file-->本地文件的地址
- 多文件测试数据
- 多文件测试数据
运行 `test` 文件下的 `test.py` 文件,修改里面的 `file_paths` 为自己仓库的 `url` 即可
运行 `test` 文件下的 `test.py` 文件,修改里面的 `file_paths` 为自己仓库的 `url` 即可
...
...
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