| 27 | } from '../types'; |
| 28 | |
| 29 | export interface LobeRuntimeAI { |
| 30 | baseURL?: string; |
| 31 | chat?: (payload: ChatStreamPayload, options?: ChatMethodOptions) => Promise<Response>; |
| 32 | createImage?: ( |
| 33 | payload: CreateImagePayload, |
| 34 | options?: CreateImageMethodOptions, |
| 35 | ) => Promise<CreateImageResponse>; |
| 36 | |
| 37 | createVideo?: ( |
| 38 | payload: CreateVideoPayload, |
| 39 | options?: CreateVideoMethodOptions, |
| 40 | ) => Promise<CreateVideoResponse>; |
| 41 | |
| 42 | embeddings?: (payload: EmbeddingsPayload, options?: EmbeddingsOptions) => Promise<Embeddings[]>; |
| 43 | |
| 44 | generateObject?: ( |
| 45 | payload: GenerateObjectPayload, |
| 46 | options?: GenerateObjectOptions, |
| 47 | ) => Promise<any>; |
| 48 | |
| 49 | handleCreateVideoWebhook?: ( |
| 50 | payload: HandleCreateVideoWebhookPayload, |
| 51 | ) => Promise<HandleCreateVideoWebhookResult>; |
| 52 | |
| 53 | handlePollVideoStatus?: ( |
| 54 | inferenceId: string, |
| 55 | ) => Promise< |
| 56 | | { status: 'success'; videoUrl: string } |
| 57 | | { status: 'failed'; error: string } |
| 58 | | { status: 'pending' } |
| 59 | >; |
| 60 | |
| 61 | models?: () => Promise<any>; |
| 62 | |
| 63 | // Model management related interface |
| 64 | pullModel?: (params: PullModelParams, options?: ModelRequestOptions) => Promise<Response>; |
| 65 | |
| 66 | textToSpeech?: ( |
| 67 | payload: TextToSpeechPayload, |
| 68 | options?: TextToSpeechOptions, |
| 69 | ) => Promise<ArrayBuffer>; |
| 70 | |
| 71 | transcribe?: (payload: ASRPayload, options?: ASROptions) => Promise<ASRResponse>; |
| 72 | } |
| 73 | /* eslint-enabled */ |
| 74 | |
| 75 | export abstract class LobeOpenAICompatibleRuntime { |
nothing calls this directly
no outgoing calls
no test coverage detected