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
2b93ae2d
authored
Jun 17, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: time conf
parent
00c93a63
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
client/src/pages/api/chat/chat.ts
+2
-2
client/src/service/utils/chat/index.ts
+1
-1
docs/deploy/fastgpt/docker-compose.yml
+0
-2
No files found.
client/src/pages/api/chat/chat.ts
View file @
2b93ae2d
...
@@ -32,8 +32,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
...
@@ -32,8 +32,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
chatId
?:
string
;
chatId
?:
string
;
};
};
if
(
!
modelId
||
!
prompt
)
{
if
(
!
modelId
||
!
prompt
||
prompt
.
length
!==
2
)
{
throw
new
Error
(
'缺少参数'
);
throw
new
Error
(
'
Chat
缺少参数'
);
}
}
await
connectToDatabase
();
await
connectToDatabase
();
...
...
client/src/service/utils/chat/index.ts
View file @
2b93ae2d
...
@@ -82,7 +82,7 @@ export const modelServiceToolMap: Record<
...
@@ -82,7 +82,7 @@ export const modelServiceToolMap: Record<
};
};
/* delete invalid symbol */
/* delete invalid symbol */
const
simplifyStr
=
(
str
:
string
)
=>
const
simplifyStr
=
(
str
=
''
)
=>
str
str
.
replace
(
/
\n
+/g
,
'\n'
)
// 连续空行
.
replace
(
/
\n
+/g
,
'\n'
)
// 连续空行
.
replace
(
/
[^\S\r\n]
+/g
,
' '
)
// 连续空白内容
.
replace
(
/
[^\S\r\n]
+/g
,
' '
)
// 连续空白内容
...
...
docs/deploy/fastgpt/docker-compose.yml
View file @
2b93ae2d
...
@@ -16,7 +16,6 @@ services:
...
@@ -16,7 +16,6 @@ services:
# 刚创建的文件
# 刚创建的文件
-
/root/fastgpt/pg/init.sql:/docker-entrypoint-initdb.d/init.sh
-
/root/fastgpt/pg/init.sql:/docker-entrypoint-initdb.d/init.sh
-
/root/fastgpt/pg/data:/var/lib/postgresql/data
-
/root/fastgpt/pg/data:/var/lib/postgresql/data
-
/etc/localtime:/etc/localtime:ro
mongodb
:
mongodb
:
image
:
mongo:5.0.18
image
:
mongo:5.0.18
# image : registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
# image : registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
...
@@ -31,7 +30,6 @@ services:
...
@@ -31,7 +30,6 @@ services:
volumes
:
volumes
:
-
/root/fastgpt/mongo/data:/data/db
-
/root/fastgpt/mongo/data:/data/db
-
/root/fastgpt/mongo/logs:/var/log/mongodb
-
/root/fastgpt/mongo/logs:/var/log/mongodb
-
/etc/localtime:/etc/localtime:ro
fastgpt
:
fastgpt
:
image
:
ghcr.io/c121914yu/fastgpt:latest
# github
image
:
ghcr.io/c121914yu/fastgpt:latest
# github
# image: c121914yu/fast-gpt:latest # docker hub
# image: c121914yu/fast-gpt:latest # docker hub
...
...
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