fix(openai): use chat completion choice delta type

This commit is contained in:
Peter Steinberger
2026-05-10 05:23:44 +01:00
parent 808d268634
commit 2fb99143a4

View File

@@ -1520,7 +1520,8 @@ async function processOpenAICompletionsStream(
}
}
const choiceDelta =
choice.delta ?? (choice as unknown as { message?: ChatCompletionChunk["delta"] }).message;
choice.delta ??
(choice as unknown as { message?: ChatCompletionChunk["choices"][number]["delta"] }).message;
if (!choiceDelta) {
continue;
}