Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Administrator
/
chatgpt.ai-pro.org
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
3
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
3e99a7b9
authored
2023-02-28 10:58:48 +0800
by
RSA
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
13d695fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
7 deletions
index.js
index.js
View file @
3e99a7b
...
...
@@ -42,13 +42,6 @@ app.post('/api', async (req, res) => {
}
let
query_prompt
=
`
${
greetingPrompt
}
\n
${
message
}
`
;
let
greetingPrompt
=
'Hello, how can I assist you?'
const
greetings
=
[
'hi'
,
'hello'
,
'hey'
]
if
(
greetings
.
some
((
greeting
)
=>
message
.
toLowerCase
().
includes
(
greeting
)))
{
greetingPrompt
=
'Hello, how can I help you today?'
}
let
query_prompt
=
`
${
greetingPrompt
}
\n
${
message
}
`
;
str_length
=
req
.
body
.
message
.
split
(
' '
).
length
;
if
(
str_length
>=
800
){
arr_body
=
req
.
body
.
message
.
split
(
"\n"
);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment