feat: 发送token 排除系统消息

pull/629/head
Jake 2023-11-09 00:25:40 +08:00
rodzic ff79d8bd13
commit ff34ff6ffc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: BB676DBDCF031D7C
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
{
"name": "@catalystclan/chatgpt-api",
"version": "5.2.4-beta.0",
"version": "5.2.4-beta.1",
"description": "Node.js client for the official ChatGPT API.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"repository": "transitive-bullshit/chatgpt-api",

Wyświetl plik

@ -396,6 +396,7 @@ export class ChatGPTAPI {
.reduce((prompt, message) => {
switch (message.role) {
case 'system':
return prompt
// return prompt.concat([`Instructions:\n${message.content}`])
case 'user':
return prompt.concat([`${userLabel}:\n${message.content}`])