mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-09 05:05:52 +08:00
@@ -255,6 +255,9 @@ export class OpenAIProvider
|
|||||||
);
|
);
|
||||||
|
|
||||||
for await (const message of result) {
|
for await (const message of result) {
|
||||||
|
if (!Array.isArray(message.choices) || !message.choices.length) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const content = message.choices[0].delta.content;
|
const content = message.choices[0].delta.content;
|
||||||
if (content) {
|
if (content) {
|
||||||
yield content;
|
yield content;
|
||||||
|
|||||||
Reference in New Issue
Block a user