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
87d35042
authored
Apr 06, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 阈值
parent
77dc961a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/service/events/generateQA.ts
+1
-3
src/service/events/generateVector.ts
+3
-2
No files found.
src/service/events/generateQA.ts
View file @
87d35042
...
...
@@ -79,10 +79,8 @@ export async function generateQA(next = false): Promise<any> {
.
createChatCompletion
(
{
model
:
ChatModelNameEnum
.
GPT35
,
temperature
:
0.
7
,
temperature
:
0.
8
,
n
:
1
,
frequency_penalty
:
1
,
// 越大,重复内容越少
presence_penalty
:
-
1
,
// 越大,越容易出现新内容
messages
:
[
systemPrompt
,
{
...
...
src/service/events/generateVector.ts
View file @
87d35042
...
...
@@ -47,7 +47,8 @@ export async function generateVector(next = false): Promise<any> {
}
catch
(
error
:
any
)
{
if
(
error
?.
code
===
501
)
{
await
redis
.
del
(
dataItem
.
id
);
throw
new
Error
(
error
?.
message
);
generateVector
(
true
);
return
;
}
throw
new
Error
(
'获取 openai key 失败'
);
...
...
@@ -102,6 +103,6 @@ export async function generateVector(next = false): Promise<any> {
}
setTimeout
(()
=>
{
generateVector
(
true
);
},
4
000
);
},
2
000
);
}
}
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