Skip to content

Commit fe9eba5

Browse files
authored
Merge pull request #94 from 0xi4o/feature/multimodal
Feature: Add Multi Modal Capabilities
2 parents 639fdaa + bbbc344 commit fe9eba5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1368
-184
lines changed

dist/components/Badge.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

dist/components/Bot.d.ts

+24-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,35 @@
11
import { BotMessageTheme, TextInputTheme, UserMessageTheme } from '@/features/bubble/types';
2+
export type FileEvent<T = EventTarget> = {
3+
target: T;
4+
};
5+
type ImageUploadConstraits = {
6+
fileTypes: string[];
7+
maxUploadSize: number;
8+
};
9+
export type UploadsConfig = {
10+
imgUploadSizeAndTypes: ImageUploadConstraits[];
11+
isImageUploadAllowed: boolean;
12+
isSpeechToTextEnabled: boolean;
13+
};
14+
type FilePreviewData = string | ArrayBuffer;
15+
type FilePreview = {
16+
data: FilePreviewData;
17+
mime: string;
18+
name: string;
19+
preview: string;
20+
type: string;
21+
};
222
type messageType = 'apiMessage' | 'userMessage' | 'usermessagewaiting';
3-
type observerConfigType = (accessor: string | boolean | object | MessageType[]) => void;
4-
export type observersConfigType = Record<'observeUserInput' | 'observeLoading' | 'observeMessages', observerConfigType>;
23+
export type FileUpload = Omit<FilePreview, 'preview'>;
524
export type MessageType = {
625
message: string;
726
type: messageType;
827
sourceDocuments?: any;
928
fileAnnotations?: any;
29+
fileUploads?: Partial<FileUpload>[];
1030
};
31+
type observerConfigType = (accessor: string | boolean | object | MessageType[]) => void;
32+
export type observersConfigType = Record<'observeUserInput' | 'observeLoading' | 'observeMessages', observerConfigType>;
1133
export type BotProps = {
1234
chatflowid: string;
1335
apiHost?: string;

dist/components/Bot.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
type ImageUploadButtonProps = {
3+
buttonColor?: string;
4+
isDisabled?: boolean;
5+
isLoading?: boolean;
6+
disableIcon?: boolean;
7+
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
8+
export declare const ImageUploadButton: (props: ImageUploadButtonProps) => JSX.Element;
9+
export declare const Spinner: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
10+
export {};
11+
//# sourceMappingURL=ImageUploadButton.d.ts.map

dist/components/ImageUploadButton.d.ts.map

+1
Original file line numberDiff line numberDiff line change
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
type RecordAudioButtonProps = {
3+
buttonColor?: string;
4+
isDisabled?: boolean;
5+
isLoading?: boolean;
6+
disableIcon?: boolean;
7+
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
8+
export declare const RecordAudioButton: (props: RecordAudioButtonProps) => JSX.Element;
9+
export declare const Spinner: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
10+
export {};
11+
//# sourceMappingURL=RecordAudioButton.d.ts.map

dist/components/RecordAudioButton.d.ts.map

+1
Original file line numberDiff line numberDiff line change

dist/components/bubbles/BotBubble.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

dist/components/bubbles/GuestBubble.d.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
import { MessageType } from '../Bot';
12
type Props = {
2-
message: string;
3+
message: MessageType;
4+
apiHost?: string;
5+
chatflowid: string;
6+
chatId: string;
37
showAvatar?: boolean;
48
avatarSrc?: string;
59
backgroundColor?: string;

dist/components/bubbles/GuestBubble.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
type CancelButtonProps = {
3+
buttonColor?: string;
4+
isDisabled?: boolean;
5+
isLoading?: boolean;
6+
disableIcon?: boolean;
7+
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
8+
export declare const CancelButton: (props: CancelButtonProps) => JSX.Element;
9+
export {};
10+
//# sourceMappingURL=CancelButton.d.ts.map

dist/components/buttons/CancelButton.d.ts.map

+1
Original file line numberDiff line numberDiff line change
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
type ImageUploadButtonProps = {
3+
buttonColor?: string;
4+
isDisabled?: boolean;
5+
isLoading?: boolean;
6+
disableIcon?: boolean;
7+
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
8+
export declare const ImageUploadButton: (props: ImageUploadButtonProps) => JSX.Element;
9+
export declare const Spinner: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
10+
export {};
11+
//# sourceMappingURL=ImageUploadButton.d.ts.map

dist/components/buttons/ImageUploadButton.d.ts.map

+1
Original file line numberDiff line numberDiff line change
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
type RecordAudioButtonProps = {
3+
buttonColor?: string;
4+
isDisabled?: boolean;
5+
isLoading?: boolean;
6+
disableIcon?: boolean;
7+
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
8+
export declare const RecordAudioButton: (props: RecordAudioButtonProps) => JSX.Element;
9+
export declare const Spinner: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
10+
export {};
11+
//# sourceMappingURL=RecordAudioButton.d.ts.map

dist/components/buttons/RecordAudioButton.d.ts.map

+1
Original file line numberDiff line numberDiff line change
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
type SendButtonProps = {
3+
sendButtonColor?: string;
4+
isDisabled?: boolean;
5+
isLoading?: boolean;
6+
disableIcon?: boolean;
7+
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
8+
export declare const SendButton: (props: SendButtonProps) => JSX.Element;
9+
export declare const DeleteButton: (props: SendButtonProps) => JSX.Element;
10+
export declare const Spinner: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
11+
export {};
12+
//# sourceMappingURL=SendButton.d.ts.map

dist/components/buttons/SendButton.d.ts.map

+1
Original file line numberDiff line numberDiff line change
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
export declare const AddImageIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
3+
//# sourceMappingURL=AddImageIcon.d.ts.map

dist/components/icons/AddImageIcon.d.ts.map

+1
Original file line numberDiff line numberDiff line change
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
export declare const CircleDotIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
3+
//# sourceMappingURL=CircleDotIcon.d.ts.map

dist/components/icons/CircleDotIcon.d.ts.map

+1
Original file line numberDiff line numberDiff line change

dist/components/icons/RecordIcon.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
export declare const RecordIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
3+
//# sourceMappingURL=RecordIcon.d.ts.map

dist/components/icons/RecordIcon.d.ts.map

+1
Original file line numberDiff line numberDiff line change

dist/components/icons/TrashIcon.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
export declare const TrashIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
3+
//# sourceMappingURL=TrashIcon.d.ts.map

dist/components/icons/TrashIcon.d.ts.map

+1
Original file line numberDiff line numberDiff line change

dist/components/icons/XIcon.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { JSX } from 'solid-js/jsx-runtime';
2+
export declare const XIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
3+
//# sourceMappingURL=XIcon.d.ts.map

dist/components/icons/XIcon.d.ts.map

+1
Original file line numberDiff line numberDiff line change

dist/components/icons/index.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
export * from './AddImageIcon';
2+
export * from './CircleDotIcon';
3+
export * from './DeleteIcon';
4+
export * from './RecordIcon';
15
export * from './SendIcon';
6+
export * from './TrashIcon';
7+
export * from './XIcon';
28
//# sourceMappingURL=index.d.ts.map

dist/components/icons/index.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

dist/components/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * from './SendButton';
1+
export * from './buttons/SendButton';
22
export * from './TypingBubble';
33
//# sourceMappingURL=index.d.ts.map

dist/components/index.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

dist/components/inputs/textInput/components/TextInput.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Setter } from 'solid-js';
2+
import { FileEvent, UploadsConfig } from '@/components/Bot';
13
type Props = {
24
placeholder?: string;
35
backgroundColor?: string;
@@ -7,6 +9,10 @@ type Props = {
79
fontSize?: number;
810
disabled?: boolean;
911
onSubmit: (value: string) => void;
12+
uploadsConfig?: Partial<UploadsConfig>;
13+
setPreviews: Setter<unknown[]>;
14+
onMicrophoneClicked: () => void;
15+
handleFileChange: (event: FileEvent<HTMLInputElement>) => void;
1016
};
1117
export declare const TextInput: (props: Props) => import("solid-js").JSX.Element;
1218
export {};

dist/components/inputs/textInput/components/TextInput.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

dist/queries/sendMessageQuery.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { MessageType } from '@/components/Bot';
1+
import { FileUpload, MessageType } from '@/components/Bot';
22
export type IncomingInput = {
33
question: string;
44
history: MessageType[];
5+
uploads?: FileUpload[];
56
overrideConfig?: Record<string, unknown>;
67
socketIOClientId?: string;
78
chatId?: string;

0 commit comments

Comments
 (0)