mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-13 10:44:54 +03:00
parent
935771c8a8
commit
41f9149be6
@ -255,6 +255,9 @@ export class OpenAIProvider
|
||||
);
|
||||
|
||||
for await (const message of result) {
|
||||
if (!Array.isArray(message.choices) || !message.choices.length) {
|
||||
continue;
|
||||
}
|
||||
const content = message.choices[0].delta.content;
|
||||
if (content) {
|
||||
yield content;
|
||||
|
Loading…
Reference in New Issue
Block a user