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
4f0bd677
authored
May 27, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs
parent
741381ec
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
21 deletions
+6
-21
docs/deploy/fastgpt/docker-compose.yml
+4
-1
docs/deploy/fastgpt/pg/init.sql
+1
-3
docs/dev/README.md
+1
-1
src/service/events/generateQA.ts
+0
-8
src/service/events/generateVector.ts
+0
-8
No files found.
docs/deploy/fastgpt/docker-compose.yml
View file @
4f0bd677
...
@@ -17,7 +17,7 @@ services:
...
@@ -17,7 +17,7 @@ services:
-
/root/fastgpt/pg/data:/var/lib/postgresql/data
-
/root/fastgpt/pg/data:/var/lib/postgresql/data
-
/etc/localtime:/etc/localtime:ro
-
/etc/localtime:/etc/localtime:ro
mongodb
:
mongodb
:
image
:
mongo:
6.0.4
image
:
mongo:
5.0.18
container_name
:
mongo
container_name
:
mongo
restart
:
always
restart
:
always
ports
:
ports
:
...
@@ -47,6 +47,9 @@ services:
...
@@ -47,6 +47,9 @@ services:
-
aliAccessKeySecret=xxxx
-
aliAccessKeySecret=xxxx
-
aliSignName=xxxxx
-
aliSignName=xxxxx
-
aliTemplateCode=SMS_xxxx
-
aliTemplateCode=SMS_xxxx
# QA和向量生成最大进程数
-
QA_MAX_PROCESS=10
-
VECTOR_MAX_PROCESS=10
# token加密凭证(随便填,作为登录凭证)
# token加密凭证(随便填,作为登录凭证)
-
TOKEN_KEY=xxxx
-
TOKEN_KEY=xxxx
# root key, 最高权限,可以内部接口互相调用
# root key, 最高权限,可以内部接口互相调用
...
...
docs/deploy/fastgpt/pg/init.sql
View file @
4f0bd677
...
@@ -5,10 +5,9 @@ CREATE EXTENSION IF NOT EXISTS vector;
...
@@ -5,10 +5,9 @@ CREATE EXTENSION IF NOT EXISTS vector;
-- init table
-- init table
CREATE
TABLE
IF
NOT
EXISTS
modelData
(
CREATE
TABLE
IF
NOT
EXISTS
modelData
(
id
BIGSERIAL
PRIMARY
KEY
,
id
BIGSERIAL
PRIMARY
KEY
,
vector
VECTOR
(
1536
),
vector
VECTOR
(
1536
)
NOT
NULL
,
status
VARCHAR
(
50
)
NOT
NULL
,
status
VARCHAR
(
50
)
NOT
NULL
,
user_id
VARCHAR
(
50
)
NOT
NULL
,
user_id
VARCHAR
(
50
)
NOT
NULL
,
model_id
VARCHAR
(
50
),
kb_id
VARCHAR
(
50
),
kb_id
VARCHAR
(
50
),
q
TEXT
NOT
NULL
,
q
TEXT
NOT
NULL
,
a
TEXT
NOT
NULL
a
TEXT
NOT
NULL
...
@@ -16,6 +15,5 @@ CREATE TABLE IF NOT EXISTS modelData (
...
@@ -16,6 +15,5 @@ CREATE TABLE IF NOT EXISTS modelData (
-- create index
-- create index
CREATE
INDEX
IF
NOT
EXISTS
modelData_status_index
ON
modelData
USING
HASH
(
status
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_status_index
ON
modelData
USING
HASH
(
status
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_userId_index
ON
modelData
USING
HASH
(
user_id
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_userId_index
ON
modelData
USING
HASH
(
user_id
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_modelId_index
ON
modelData
USING
HASH
(
model_id
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_kbId_index
ON
modelData
USING
HASH
(
kb_id
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_kbId_index
ON
modelData
USING
HASH
(
kb_id
);
EOSQL
EOSQL
docs/dev/README.md
View file @
4f0bd677
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
第一次开发,请先
[
部署教程
](
../deploy/docker.md
)
,需要部署数据库.
第一次开发,请先
[
部署教程
](
../deploy/docker.md
)
,需要部署数据库.
## 环境变量配置
## 环境变量配置
(可能更新不及时,以 docker-compose 里的变量为准)
复制.env.template 文件,生成一个.env.local 环境变量文件夹,修改.env.local 里内容。
复制.env.template 文件,生成一个.env.local 环境变量文件夹,修改.env.local 里内容。
...
...
src/service/events/generateQA.ts
View file @
4f0bd677
...
@@ -149,14 +149,6 @@ A2:
...
@@ -149,14 +149,6 @@ A2:
lockTime
:
new
Date
(
'2000/1/1'
)
lockTime
:
new
Date
(
'2000/1/1'
)
});
});
// 频率限制
if
(
err
?.
response
?.
statusText
===
'Too Many Requests'
)
{
console
.
log
(
'生成向量次数限制,20s后尝试'
);
return
setTimeout
(()
=>
{
generateQA
();
},
20000
);
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
generateQA
();
generateQA
();
},
1000
);
},
1000
);
...
...
src/service/events/generateVector.ts
View file @
4f0bd677
...
@@ -130,14 +130,6 @@ export async function generateVector(): Promise<any> {
...
@@ -130,14 +130,6 @@ export async function generateVector(): Promise<any> {
lockTime
:
new
Date
(
'2000/1/1'
)
lockTime
:
new
Date
(
'2000/1/1'
)
});
});
// 频率限制
if
(
err
?.
response
?.
statusText
===
'Too Many Requests'
)
{
console
.
log
(
'生成向量次数限制,20s后尝试'
);
return
setTimeout
(()
=>
{
generateVector
();
},
20000
);
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
generateVector
();
generateVector
();
},
1000
);
},
1000
);
...
...
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