| interface User { | interface User { | ||||
| } | } | ||||
| interface DifyFileBase { | |||||
| type: "image" | |||||
| } | |||||
| export interface DifyRemoteFile extends DifyFileBase { | |||||
| transfer_method: "remote_url" | |||||
| url: string | |||||
| } | |||||
| export interface DifyLocalFile extends DifyFileBase { | |||||
| transfer_method: "local_file" | |||||
| upload_file_id: string | |||||
| } | |||||
| export type DifyFile = DifyRemoteFile | DifyLocalFile; | |||||
| export declare class DifyClient { | export declare class DifyClient { | ||||
| constructor(apiKey: string, baseUrl?: string); | constructor(apiKey: string, baseUrl?: string); | ||||
| inputs: any, | inputs: any, | ||||
| user: User, | user: User, | ||||
| stream?: boolean, | stream?: boolean, | ||||
| files?: File[] | null | |||||
| files?: DifyFile[] | null | |||||
| ): Promise<any>; | ): Promise<any>; | ||||
| } | } | ||||
| user: User, | user: User, | ||||
| stream?: boolean, | stream?: boolean, | ||||
| conversation_id?: string | null, | conversation_id?: string | null, | ||||
| files?: File[] | null | |||||
| files?: DifyFile[] | null | |||||
| ): Promise<any>; | ): Promise<any>; | ||||
| getSuggested(message_id: string, user: User): Promise<any>; | getSuggested(message_id: string, user: User): Promise<any>; |