( vllmStream: AsyncIterable<ChatCompletionChunk>, onComplete?: (content: string, usage: CompletionUsage) => void )
| 7 | * Uses the shared OpenAI-compatible streaming utility. |
| 8 | */ |
| 9 | export function createReadableStreamFromVLLMStream( |
| 10 | vllmStream: AsyncIterable<ChatCompletionChunk>, |
| 11 | onComplete?: (content: string, usage: CompletionUsage) => void |
| 12 | ): ReadableStream<Uint8Array> { |
| 13 | return createOpenAICompatibleStream(vllmStream, 'vLLM', onComplete) |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Checks if a forced tool was used in a vLLM response. |
no test coverage detected