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
242b2126
authored
May 19, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imgs
parent
2843178e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
README.md
+1
-1
src/pages/api/openapi/chat/chat.ts
+2
-2
No files found.
README.md
View file @
242b2126
...
...
@@ -31,7 +31,7 @@ Fast GPT 允许你使用自己的 openai API KEY 来快速的调用 openai 接
## 🏘️ 交流群
添加 wx 进入:


## 👀 其他
...
...
src/pages/api/openapi/chat/chat.ts
View file @
242b2126
...
...
@@ -76,11 +76,11 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
if
(
code
===
201
)
{
return
res
.
send
(
searchPrompts
[
0
]?.
value
);
}
prompts
.
splice
(
prompts
.
length
-
1
,
0
,
...
searchPrompts
);
prompts
.
splice
(
prompts
.
length
-
3
,
0
,
...
searchPrompts
);
}
else
{
// 没有用知识库搜索,仅用系统提示词
model
.
chat
.
systemPrompt
&&
prompts
.
splice
(
prompts
.
length
-
1
,
0
,
{
prompts
.
splice
(
prompts
.
length
-
3
,
0
,
{
obj
:
ChatRoleEnum
.
System
,
value
:
model
.
chat
.
systemPrompt
});
...
...
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