@coherenceplatform/sdk
Version:
Coherence SDK for embedding AI-powered chat into your applications
116 lines • 3.46 kB
TypeScript
export class ChatBridgeImageAttachmentAdapter extends SimpleImageAttachmentAdapter {
constructor(config: any);
config: any;
baseAdapter: ChatBridgeAttachmentAdapter;
add(state: any): Promise<{
file: any;
status: string;
_needsParentUpload: boolean;
id: string;
type: "image" | "document" | "file";
name: string;
contentType: string;
content?: import("@assistant-ui/react").ThreadUserContentPart[];
} | {
url: any;
_backendData: any;
id: string;
type: "image" | "document" | "file";
name: string;
contentType: string;
file: File;
content?: import("@assistant-ui/react").ThreadUserContentPart[];
status: import("@assistant-ui/react/dist/types/AttachmentTypes").PendingAttachmentStatus;
} | {
status: {
type: string;
reason: string;
error: any;
};
id: string;
type: "image" | "document" | "file";
name: string;
contentType: string;
file: File;
content?: import("@assistant-ui/react").ThreadUserContentPart[];
}>;
}
export class ChatBridgeCompositeAttachmentAdapter {
constructor(config: any);
config: any;
adapters: ChatBridgeImageAttachmentAdapter[];
accept: string;
add(props: any): Promise<{
file: any;
status: string;
_needsParentUpload: boolean;
id: string;
type: "image" | "document" | "file";
name: string;
contentType: string;
content?: import("@assistant-ui/react").ThreadUserContentPart[];
} | {
url: any;
_backendData: any;
id: string;
type: "image" | "document" | "file";
name: string;
contentType: string;
file: File;
content?: import("@assistant-ui/react").ThreadUserContentPart[];
status: import("@assistant-ui/react/dist/types/AttachmentTypes").PendingAttachmentStatus;
} | {
status: {
type: string;
reason: string;
error: any;
};
id: string;
type: "image" | "document" | "file";
name: string;
contentType: string;
file: File;
content?: import("@assistant-ui/react").ThreadUserContentPart[];
} | {
id: string;
type: string;
name: any;
size: any;
contentType: any;
file: any;
status: {
type: string;
};
}>;
send(props: any): Promise<any>;
fileMatchesAccept(file: any, accept: any): any;
addGenericFile({ file }: {
file: any;
}): {
id: string;
type: string;
name: any;
size: any;
contentType: any;
file: any;
status: {
type: string;
};
};
sendGenericFile({ attachment, ...props }: {
[x: string]: any;
attachment: any;
}): Promise<any>;
}
export default ChatBridgeCompositeAttachmentAdapter;
import { SimpleImageAttachmentAdapter } from "@assistant-ui/react";
declare class ChatBridgeAttachmentAdapter {
constructor(config: any);
config: any;
supportedTypes: Set<string>;
upload(files: any, options?: {}): Promise<any>;
generateAttachmentId(attachment: any): any;
remove(attachment: any): Promise<void>;
validate(file: any): boolean;
}
//# sourceMappingURL=attachmentAdapter.d.ts.map