@examplary/ui 1.53.0 → 1.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,20 +5,26 @@ type Answer = {
|
|
|
5
5
|
completed?: boolean;
|
|
6
6
|
context?: any;
|
|
7
7
|
};
|
|
8
|
-
type
|
|
8
|
+
type AIMessage = {
|
|
9
|
+
role: "user" | "assistant" | "system";
|
|
10
|
+
content: string;
|
|
11
|
+
} & Record<string, any>;
|
|
12
|
+
type AIGenerateInput = {
|
|
13
|
+
/** The messages to send to the AI model */
|
|
14
|
+
messages: AIMessage[];
|
|
15
|
+
/** An optional JSON schema to validate the AI response against */
|
|
16
|
+
schema?: any;
|
|
17
|
+
};
|
|
18
|
+
type OrgApiInstance = AxiosInstance & {
|
|
19
|
+
uploadFile: (accept?: string) => Promise<any>;
|
|
20
|
+
uploadPickedFile: (file: File) => Promise<any>;
|
|
21
|
+
};
|
|
22
|
+
type PublicApiInstance = AxiosInstance & {
|
|
9
23
|
uploadFile: (accept?: string) => Promise<any>;
|
|
10
24
|
ai: {
|
|
11
|
-
generate: (
|
|
12
|
-
/** The messages to send to the AI model */
|
|
13
|
-
messages: any[],
|
|
14
|
-
/** An optional JSON schema to validate the AI response against */
|
|
15
|
-
schema?: any) => Promise<any>;
|
|
25
|
+
generate: (input: AIGenerateInput) => Promise<any>;
|
|
16
26
|
};
|
|
17
27
|
};
|
|
18
|
-
type OrgApiInstance = SharedApiInstance & {
|
|
19
|
-
uploadPickedFile: (file: File) => Promise<any>;
|
|
20
|
-
};
|
|
21
|
-
type PublicApiInstance = SharedApiInstance;
|
|
22
28
|
export type FrontendComponentEnvironment = "exam" | "practice-space";
|
|
23
29
|
export type FrontendBaseComponentProps = {
|
|
24
30
|
t: (key: string | string[], options?: any) => string;
|