@compassdigital/sdk.typescript 4.450.0 → 4.451.0
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.
package/lib/interface/ai.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface MessageDTO {
|
|
|
9
9
|
export interface GenerateTextRequest {
|
|
10
10
|
options?: OptionsDTO;
|
|
11
11
|
messages: MessageDTO[];
|
|
12
|
+
systemInstruction?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface GenerateTextResponse {
|
|
14
15
|
messages: MessageDTO[];
|
|
@@ -28,6 +29,11 @@ export interface Error {
|
|
|
28
29
|
message: string;
|
|
29
30
|
data: ErrorData;
|
|
30
31
|
}
|
|
32
|
+
export interface ImageOptionsDTO {
|
|
33
|
+
aspect_ratio: string;
|
|
34
|
+
background_color: string;
|
|
35
|
+
presentation: string;
|
|
36
|
+
}
|
|
31
37
|
export interface GenerateImageRequest {
|
|
32
38
|
prompt: string;
|
|
33
39
|
number_of_images?: number;
|
|
@@ -52,11 +58,6 @@ export interface TranslateResponse {
|
|
|
52
58
|
targetLanguage: string;
|
|
53
59
|
translations: Record<string, string>;
|
|
54
60
|
}
|
|
55
|
-
export interface ImageOptionsDTO {
|
|
56
|
-
aspect_ratio: '16:9' | '1:1';
|
|
57
|
-
background_color: 'white' | 'beige' | 'warm grey';
|
|
58
|
-
presentation?: 'item only' | 'plated';
|
|
59
|
-
}
|
|
60
61
|
export type PostAiLanguageGenerateBody = GenerateTextRequest;
|
|
61
62
|
export type PostAiLanguageGenerateResponse = GenerateTextResponse;
|
|
62
63
|
export type PostAiImageGenerateBody = GenerateImageRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/interface/ai.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;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,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,WAAW,QAAQ;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACrC,MAAM,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,kBAAkB,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAID,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;AAE7D,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,CAAC;AAIlE,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE3D,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AAIhE,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEnD,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC"}
|
package/package.json
CHANGED
package/src/interface/ai.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface MessageDTO {
|
|
|
16
16
|
export interface GenerateTextRequest {
|
|
17
17
|
options?: OptionsDTO;
|
|
18
18
|
messages: MessageDTO[];
|
|
19
|
+
// Optional system instruction for the model
|
|
20
|
+
systemInstruction?: string;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
export interface GenerateTextResponse {
|
|
@@ -48,6 +50,12 @@ export interface Error {
|
|
|
48
50
|
data: ErrorData;
|
|
49
51
|
}
|
|
50
52
|
|
|
53
|
+
export interface ImageOptionsDTO {
|
|
54
|
+
aspect_ratio: string;
|
|
55
|
+
background_color: string;
|
|
56
|
+
presentation: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
51
59
|
export interface GenerateImageRequest {
|
|
52
60
|
prompt: string;
|
|
53
61
|
number_of_images?: number;
|
|
@@ -78,12 +86,6 @@ export interface TranslateResponse {
|
|
|
78
86
|
translations: Record<string, string>;
|
|
79
87
|
}
|
|
80
88
|
|
|
81
|
-
export interface ImageOptionsDTO {
|
|
82
|
-
aspect_ratio: '16:9' | '1:1';
|
|
83
|
-
background_color: 'white' | 'beige' | 'warm grey';
|
|
84
|
-
presentation?: 'item only' | 'plated';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
89
|
// POST /ai/language/generate - Generate text from a given prompt
|
|
88
90
|
|
|
89
91
|
export type PostAiLanguageGenerateBody = GenerateTextRequest;
|