Skip to content

Instantly share code, notes, and snippets.

View CoffeeVampir3's full-sized avatar

Z CoffeeVampir3

View GitHub Profile
@CoffeeVampir3
CoffeeVampir3 / sadadjnsauhd897uashd98sahd9a897udshq.ts
Created April 29, 2025 03:45
wefjuejwuiofwjeuifchwie9ofh8i0923hf89023hf892h89fh298fh289f3h892hf.ts
import { StreamingWebSocket, CancellationError } from "./streamingWebSocket.ts";
/**
* Example of client-side streaming inference implementation
* Following the exact flow described in the specification
*/
async function streamInference(
socket: StreamingWebSocket,
onContent: (content: string) => void
): Promise<void> {