mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-24 06:05:40 +00:00
fix: support async iterator for AI chat streaming mode in types
This commit is contained in:
Vendored
+10
-5
@@ -32,11 +32,11 @@ declare class Puter {
|
||||
|
||||
// AI Module
|
||||
interface AI {
|
||||
chat(prompt: string, options?: ChatOptions): Promise<ChatResponse>;
|
||||
chat(prompt: string, testMode?: boolean, options?: ChatOptions): Promise<ChatResponse>;
|
||||
chat(prompt: string, imageURL?: string, testMode?: boolean, options?: ChatOptions): Promise<ChatResponse>;
|
||||
chat(prompt: string, imageURLArray?: string[], testMode?: boolean, options?: ChatOptions): Promise<ChatResponse>;
|
||||
chat(messages: ChatMessage[], testMode?: boolean, options?: ChatOptions): Promise<ChatResponse>;
|
||||
chat(prompt: string, options?: ChatOptions): Promise<ChatResponse> | AsyncIterable<ChatResponseChunk>;
|
||||
chat(prompt: string, testMode?: boolean, options?: ChatOptions): Promise<ChatResponse> | AsyncIterable<ChatResponseChunk>;
|
||||
chat(prompt: string, imageURL?: string, testMode?: boolean, options?: ChatOptions): Promise<ChatResponse> | AsyncIterable<ChatResponseChunk>;
|
||||
chat(prompt: string, imageURLArray?: string[], testMode?: boolean, options?: ChatOptions): Promise<ChatResponse> | AsyncIterable<ChatResponseChunk>;
|
||||
chat(messages: ChatMessage[], testMode?: boolean, options?: ChatOptions): Promise<ChatResponse> | AsyncIterable<ChatResponseChunk>;
|
||||
|
||||
img2txt(image: string | File | Blob, testMode?: boolean): Promise<string>;
|
||||
|
||||
@@ -109,6 +109,11 @@ interface Txt2SpeechOptions {
|
||||
engine?: 'standard' | 'neural' | 'generative';
|
||||
}
|
||||
|
||||
interface ChatResponseChunk {
|
||||
text?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
// Apps Module
|
||||
interface Apps {
|
||||
create(name: string, indexURL: string): Promise<App>;
|
||||
|
||||
Reference in New Issue
Block a user