Skip to content

Commit 634c9c9

Browse files
committed
fix: under chatgpt web mode, due to API changes, stored responses became undefined
1 parent 96a0361 commit 634c9c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/apis/chatgpt-web.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ export async function generateAnswersWithChatgptWebApi(port, question, session,
139139
if (data.conversation_id) session.conversationId = data.conversation_id
140140
if (data.message?.id) session.parentMessageId = data.message.id
141141

142-
answer = data.message?.content?.parts?.[0]
142+
const respAns = data.message?.content?.parts?.[0]
143+
if (respAns) answer = respAns
143144
if (answer) {
144145
port.postMessage({ answer: answer, done: false, session: null })
145146
}

0 commit comments

Comments
 (0)