UNPKG

neura-sdk

Version:

TypeScript SDK for interacting with the Neura AI API

18 lines (17 loc) 610 B
import React from 'react'; import { CompletionsRequestOptions, StreamChunk, ProcessingError } from '../types'; interface NeuraStreamProps { options: CompletionsRequestOptions; onChunk?: (chunk: StreamChunk) => void; onComplete?: (fullText: string) => void; onError?: (error: Error | ProcessingError) => void; children: (state: { chunks: StreamChunk[]; fullText: string; loading: boolean; error: Error | ProcessingError | null; restart: () => void; }) => React.ReactNode; } export declare const NeuraStream: React.FC<NeuraStreamProps>; export {};