MCPcopy Index your code
hub / github.com/simstudioai/sim / createReadableStreamFromVLLMStream

Function createReadableStreamFromVLLMStream

apps/sim/providers/vllm/utils.ts:9–14  ·  view source on GitHub ↗
(
  vllmStream: AsyncIterable<ChatCompletionChunk>,
  onComplete?: (content: string, usage: CompletionUsage) => void
)

Source from the content-addressed store, hash-verified

7 * Uses the shared OpenAI-compatible streaming utility.
8 */
9export 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.

Callers 1

index.tsFile · 0.90

Calls 1

Tested by

no test coverage detected