(
res: Response,
id: string,
created: number,
model: string,
reasoningContent: string,
)
| 584 | } |
| 585 | |
| 586 | function writeOpenAIReasoningDelta( |
| 587 | res: Response, |
| 588 | id: string, |
| 589 | created: number, |
| 590 | model: string, |
| 591 | reasoningContent: string, |
| 592 | ): void { |
| 593 | if (!reasoningContent) return; |
| 594 | writeOpenAISSE(res, { |
| 595 | id, |
| 596 | object: 'chat.completion.chunk', |
| 597 | created, |
| 598 | model, |
| 599 | choices: [{ |
| 600 | index: 0, |
| 601 | delta: { reasoning_content: reasoningContent } as Record<string, unknown>, |
| 602 | finish_reason: null, |
| 603 | }], |
| 604 | }); |
| 605 | } |
| 606 | |
| 607 | async function handleOpenAIIncrementalTextStream( |
| 608 | res: Response, |
no test coverage detected