Commit 16e12c24 authored by nanahira's avatar nanahira

fix

parent 54cbd172
Pipeline #20237 passed with stages
in 22 seconds
......@@ -30,9 +30,6 @@ export class ChatgptService extends ConsoleLogger {
previousConversation?.account,
failedAccounts,
);
const isNewConversation =
!previousConversation ||
account.getEmail() !== previousConversation.account;
if (!account) {
/*throw new BlankReturnMessageDto(
500,
......@@ -46,6 +43,9 @@ export class ChatgptService extends ConsoleLogger {
dto.text = davinciResponse.text.replace(/^<!--(.*)-->$/gm, '');
return dto;
}
const isNewConversation =
!previousConversation ||
account.getEmail() !== previousConversation.account;
this.log(`Processing chat for ${session} with ${account.getEmail()}`);
const result = await account.sendMessage(question.text, {
...(isNewConversation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment