This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> { |
OlderNewer