@builder.io/ai-utils 0.0.76 → 0.1.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.
- package/README.md +3 -0
- package/package.json +1 -1
- package/src/codegen.ts +380 -0
- package/src/completion.ts +174 -0
- package/src/events.ts +444 -0
- package/src/mapping.ts +98 -0
- package/src/messages.ts +238 -0
- package/src/settings.ts +59 -0
- package/src/codegen.d.ts +0 -92
- package/src/codegen.js +0 -1
- package/src/completion.d.ts +0 -153
- package/src/completion.js +0 -1
- package/src/events.d.ts +0 -369
- package/src/events.js +0 -1
- package/src/index.js +0 -6
- package/src/mapping.d.ts +0 -86
- package/src/mapping.js +0 -1
- package/src/messages.d.ts +0 -144
- package/src/messages.js +0 -16
- package/src/settings.d.ts +0 -23
- package/src/settings.js +0 -31
- /package/src/{index.d.ts → index.ts} +0 -0
package/src/messages.ts
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import type { ContentUpdatePatch } from "./events.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Message param does not know the id of the message.
|
|
5
|
+
* This is an input message.
|
|
6
|
+
*/
|
|
7
|
+
export type MessageParam =
|
|
8
|
+
| SystemMessageParam
|
|
9
|
+
| UserMessageParam
|
|
10
|
+
| AssistantMessageParam;
|
|
11
|
+
|
|
12
|
+
export interface ContentMessageItemText {
|
|
13
|
+
type: "text";
|
|
14
|
+
text: string;
|
|
15
|
+
cache?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ContentMessageItemImage {
|
|
19
|
+
type: "image";
|
|
20
|
+
source: ImageBase64Source | ImageUrlSource;
|
|
21
|
+
cache?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ContentMessageItemDocument {
|
|
25
|
+
type: "document";
|
|
26
|
+
source: DocumentBase64Source | DocumentUrlSource;
|
|
27
|
+
cache?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface DocumentBase64Source {
|
|
31
|
+
type: "base64";
|
|
32
|
+
media_type: "application/pdf";
|
|
33
|
+
data: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface DocumentUrlSource {
|
|
37
|
+
type: "url";
|
|
38
|
+
url: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ContentMessageItemToolResult {
|
|
42
|
+
type: "tool_result";
|
|
43
|
+
tool_use_id: string;
|
|
44
|
+
tool_name?: string;
|
|
45
|
+
tool_input?: string;
|
|
46
|
+
title?: string;
|
|
47
|
+
content: string;
|
|
48
|
+
is_error: boolean;
|
|
49
|
+
cache?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface ImageBase64Source {
|
|
53
|
+
type: "base64";
|
|
54
|
+
media_type: "image/webp" | "image/png" | "image/jpeg";
|
|
55
|
+
data: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ImageUrlSource {
|
|
59
|
+
type: "url";
|
|
60
|
+
url: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ContentMessageItemThinking {
|
|
64
|
+
type: "thinking";
|
|
65
|
+
thinking: string;
|
|
66
|
+
signature: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface ContentMessageItemRedactedThinking {
|
|
70
|
+
type: "redacted_thinking";
|
|
71
|
+
data: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface ContentMessageItemToolUse {
|
|
75
|
+
type: "tool_use";
|
|
76
|
+
id: string;
|
|
77
|
+
input: unknown;
|
|
78
|
+
completion?: string;
|
|
79
|
+
name: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type ContentMessageItem =
|
|
83
|
+
| ContentMessageItemText
|
|
84
|
+
| ContentMessageItemImage
|
|
85
|
+
| ContentMessageItemDocument
|
|
86
|
+
| ContentMessageItemThinking
|
|
87
|
+
| ContentMessageItemRedactedThinking
|
|
88
|
+
| ContentMessageItemToolUse
|
|
89
|
+
| ContentMessageItemToolResult;
|
|
90
|
+
|
|
91
|
+
export type ContentMessage = ContentMessageItem[];
|
|
92
|
+
|
|
93
|
+
export interface SystemMessageParam {
|
|
94
|
+
/**
|
|
95
|
+
* The contents of the system message.
|
|
96
|
+
*/
|
|
97
|
+
content: string | ContentMessageItemText[];
|
|
98
|
+
|
|
99
|
+
// an id to track messages across a response including multiple retries
|
|
100
|
+
responseId?: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The role of the messages author, in this case `system`.
|
|
104
|
+
*/
|
|
105
|
+
role: "system";
|
|
106
|
+
|
|
107
|
+
id?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface UserMessageParam {
|
|
111
|
+
/**
|
|
112
|
+
* The contents of the user message.
|
|
113
|
+
*/
|
|
114
|
+
content:
|
|
115
|
+
| string
|
|
116
|
+
| (
|
|
117
|
+
| ContentMessageItemText
|
|
118
|
+
| ContentMessageItemImage
|
|
119
|
+
| ContentMessageItemDocument
|
|
120
|
+
| ContentMessageItemToolResult
|
|
121
|
+
)[];
|
|
122
|
+
|
|
123
|
+
// an id to track messages across a response including multiple retries
|
|
124
|
+
responseId?: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The role of the messages author, in this case `user`.
|
|
128
|
+
*/
|
|
129
|
+
role: "user";
|
|
130
|
+
id?: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface AssistantMessageParam {
|
|
134
|
+
/**
|
|
135
|
+
* The contents of the assistant message.
|
|
136
|
+
*/
|
|
137
|
+
content: string | ContentMessageItem[];
|
|
138
|
+
/**
|
|
139
|
+
* The role of the messages author, in this case `assistant`.
|
|
140
|
+
*/
|
|
141
|
+
role: "assistant";
|
|
142
|
+
|
|
143
|
+
// an id to track messages across a response including multiple retries
|
|
144
|
+
responseId?: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The function call name and arguments
|
|
148
|
+
*/
|
|
149
|
+
action?: {
|
|
150
|
+
/**
|
|
151
|
+
* The specific function name
|
|
152
|
+
*/
|
|
153
|
+
name: string;
|
|
154
|
+
/** This is arbitrary JSON */
|
|
155
|
+
arguments: any;
|
|
156
|
+
};
|
|
157
|
+
id?: string;
|
|
158
|
+
skipDelta?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* A summary of the patches which the assistant has made.
|
|
161
|
+
* Useful for genai.
|
|
162
|
+
*/
|
|
163
|
+
patches?: ContentUpdatePatch[];
|
|
164
|
+
state?: "error";
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface SystemMessage extends SystemMessageParam {
|
|
168
|
+
id: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface UserMessage extends UserMessageParam {
|
|
172
|
+
id: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface AssistantMessage extends AssistantMessageParam {
|
|
176
|
+
id: string;
|
|
177
|
+
status?: "accepted" | "rejected" | "aborted";
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface AssistantActionMessage {
|
|
181
|
+
/**
|
|
182
|
+
* The role of the messages author, in this case `assistant`.
|
|
183
|
+
*/
|
|
184
|
+
role: "assistant";
|
|
185
|
+
|
|
186
|
+
id: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Message DOES know the id of the message.
|
|
191
|
+
* This message is after an id has been assigned
|
|
192
|
+
* and is the output message.
|
|
193
|
+
*/
|
|
194
|
+
export type Message = SystemMessage | UserMessage | AssistantMessage;
|
|
195
|
+
|
|
196
|
+
export type GeneratingMessage = null | Partial<
|
|
197
|
+
AssistantActionMessage | AssistantMessage
|
|
198
|
+
>;
|
|
199
|
+
|
|
200
|
+
export function getContentText(message: string | ContentMessage) {
|
|
201
|
+
if (typeof message === "string") {
|
|
202
|
+
return message;
|
|
203
|
+
}
|
|
204
|
+
return message
|
|
205
|
+
.map((item) => (item.type === "text" ? item.text : ""))
|
|
206
|
+
.join("");
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function getContentAttachments(message: string | ContentMessage) {
|
|
210
|
+
if (typeof message === "string") {
|
|
211
|
+
return [];
|
|
212
|
+
}
|
|
213
|
+
return message
|
|
214
|
+
.filter((item) => item.type === "image")
|
|
215
|
+
.map((item) => item.source);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export type Attachment = FileUpload | Template | URL;
|
|
219
|
+
|
|
220
|
+
export interface URL {
|
|
221
|
+
type: "url";
|
|
222
|
+
value: string;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface FileUpload {
|
|
226
|
+
type: "upload";
|
|
227
|
+
contentType: string;
|
|
228
|
+
name: string;
|
|
229
|
+
dataUrl: string;
|
|
230
|
+
size: number;
|
|
231
|
+
id: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface Template {
|
|
235
|
+
type: "template";
|
|
236
|
+
name: string;
|
|
237
|
+
id: number;
|
|
238
|
+
}
|
package/src/settings.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface AssistantSettings {
|
|
2
|
+
assistantType?: string;
|
|
3
|
+
viewId?: string;
|
|
4
|
+
theme?: "dark" | "light";
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface IframeSettings extends Partial<AssistantSettings> {
|
|
8
|
+
local?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The URL of the assistant.
|
|
11
|
+
*/
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type AssistantSettingsKeys = keyof AssistantSettings;
|
|
16
|
+
|
|
17
|
+
const urlParamSettings: AssistantSettingsKeys[] = [
|
|
18
|
+
"assistantType",
|
|
19
|
+
"theme",
|
|
20
|
+
"viewId",
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
export function getAssistantUrl(opts: IframeSettings = {}) {
|
|
24
|
+
const url = new URL(
|
|
25
|
+
opts.baseUrl ??
|
|
26
|
+
(opts.local ? "http://localhost:7242" : "https://assistant.builder.io"),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
urlParamSettings.forEach((key) => {
|
|
30
|
+
const value = opts[key];
|
|
31
|
+
if (typeof value === "string" || typeof value === "boolean") {
|
|
32
|
+
url.searchParams.set(key, String(value));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return url.href;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function parseAssistantUrlSettings(url: string) {
|
|
40
|
+
const parsed = new URL(url);
|
|
41
|
+
const settings: Record<string, string | boolean> = {};
|
|
42
|
+
|
|
43
|
+
urlParamSettings.forEach((key) => {
|
|
44
|
+
const value = parsed.searchParams.get(key);
|
|
45
|
+
if (value === "true" || value === "false") {
|
|
46
|
+
settings[key] = value === "true";
|
|
47
|
+
} else if (value) {
|
|
48
|
+
settings[key] = value;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return settings as Partial<AssistantSettings>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface BuilderEditorAuth {
|
|
56
|
+
spaceId: string;
|
|
57
|
+
userId: string;
|
|
58
|
+
authToken: string;
|
|
59
|
+
}
|
package/src/codegen.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type { ContentMessageItemToolResult, UserMessageParam } from "./messages";
|
|
2
|
-
import type { BuilderContent } from "./completion";
|
|
3
|
-
import type { Options as PrettierOptions } from "prettier";
|
|
4
|
-
import type { UserContext } from "./mapping";
|
|
5
|
-
import type { AssistantMessageParam } from "./messages";
|
|
6
|
-
export type ImportType = "named" | "default";
|
|
7
|
-
export interface ESMImport {
|
|
8
|
-
importName: string;
|
|
9
|
-
importPath: string;
|
|
10
|
-
importType: ImportType;
|
|
11
|
-
}
|
|
12
|
-
export interface ProjectFile {
|
|
13
|
-
filePath: string;
|
|
14
|
-
content?: string;
|
|
15
|
-
importance?: number;
|
|
16
|
-
dropReason?: string;
|
|
17
|
-
wasIncluded?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface CustomInstruction {
|
|
20
|
-
id: string;
|
|
21
|
-
name: string;
|
|
22
|
-
content: string;
|
|
23
|
-
}
|
|
24
|
-
export type CodeGenFramework = "react" | "html" | "mitosis" | "react-native" | "angular" | "vue" | "svelte" | "qwik" | "solid" | "marko" | "swiftui" | "jetpack-compose" | "flutter";
|
|
25
|
-
export type CodeGenStyleLibrary = "tailwind" | "tailwind-precise" | "emotion" | "styled-components" | "styled-jsx" | "react-native" | undefined;
|
|
26
|
-
export type CompletionStopReason = "max_tokens" | "stop_sequence" | "tool_use" | "end_turn" | "content_filter" | null;
|
|
27
|
-
export type CodeGenStopReason = "error" | "limit" | CompletionStopReason;
|
|
28
|
-
export type CodeGenTools = "view_file_content";
|
|
29
|
-
export type CodeGenMode = "exact" | "precise" | "precise_vision" | "creative" | "creative_vision" | "creative_only_vision";
|
|
30
|
-
export interface CodeGenInputOptions {
|
|
31
|
-
position: string;
|
|
32
|
-
eventName?: string;
|
|
33
|
-
sessionId: string;
|
|
34
|
-
codeGenMode?: "fast" | "quality-v2" | "agent";
|
|
35
|
-
url?: string;
|
|
36
|
-
diffActions?: boolean;
|
|
37
|
-
planningPrompt?: boolean;
|
|
38
|
-
customInstructions?: CustomInstruction[];
|
|
39
|
-
userPrompt?: string;
|
|
40
|
-
files?: ProjectFile[];
|
|
41
|
-
rerankFiles?: number;
|
|
42
|
-
toolResults?: ContentMessageItemToolResult[];
|
|
43
|
-
builderContent?: BuilderContent;
|
|
44
|
-
framework?: CodeGenFramework;
|
|
45
|
-
styleLibrary?: CodeGenStyleLibrary;
|
|
46
|
-
typescript?: boolean;
|
|
47
|
-
userContext?: UserContext;
|
|
48
|
-
enabledTools?: CodeGenTools[];
|
|
49
|
-
maxTokens?: number;
|
|
50
|
-
maxPages?: number;
|
|
51
|
-
autoContinue?: number;
|
|
52
|
-
promptCaching?: boolean;
|
|
53
|
-
isAutoContinue?: boolean;
|
|
54
|
-
llmSuggestions?: boolean;
|
|
55
|
-
conclusionText?: boolean;
|
|
56
|
-
searchResponse?: any | null;
|
|
57
|
-
prettierConfig?: PrettierOptions;
|
|
58
|
-
/** @deprecated */
|
|
59
|
-
history?: (UserMessageParam | AssistantMessageParam)[];
|
|
60
|
-
/** @deprecated */
|
|
61
|
-
prevId?: string;
|
|
62
|
-
/** @deprecated */
|
|
63
|
-
nextPage?: boolean;
|
|
64
|
-
/** @deprecated */
|
|
65
|
-
vcpId?: string;
|
|
66
|
-
}
|
|
67
|
-
export type Feature = "component-mapping";
|
|
68
|
-
export interface CodegenUsage {
|
|
69
|
-
total: number;
|
|
70
|
-
fast: number;
|
|
71
|
-
quality: number;
|
|
72
|
-
features: Feature[];
|
|
73
|
-
limits: {
|
|
74
|
-
aiGeneration: number;
|
|
75
|
-
aiGenerationContextWindow: number;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
export interface ActionItem {
|
|
79
|
-
type: "file" | "text" | "delta" | "done" | "diff" | "thinking" | "user" | "tool" | "suggestion" | "continue";
|
|
80
|
-
id?: string;
|
|
81
|
-
content: string;
|
|
82
|
-
filePath?: string;
|
|
83
|
-
artifactTitle?: string;
|
|
84
|
-
actionTitle?: string;
|
|
85
|
-
synthetic?: boolean;
|
|
86
|
-
incomplete?: boolean;
|
|
87
|
-
nextUrl?: string;
|
|
88
|
-
actions?: ActionItem[];
|
|
89
|
-
stopReason?: CodeGenStopReason;
|
|
90
|
-
usage?: CodegenUsage;
|
|
91
|
-
errors?: string[];
|
|
92
|
-
}
|
package/src/codegen.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/completion.d.ts
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import type { BuilderContent, BuilderElement, Component } from "@builder.io/sdk";
|
|
2
|
-
import type { Message, MessageParam, Attachment } from "./messages.js";
|
|
3
|
-
import type { BuilderModel } from "./events.js";
|
|
4
|
-
export type { BuilderContent, BuilderElement, Component };
|
|
5
|
-
export interface CompletionOptions {
|
|
6
|
-
/**
|
|
7
|
-
* How this assistant is being used. For example, "content-editor"
|
|
8
|
-
* is used when the assistant is being used in the Builder.io content editor.
|
|
9
|
-
*/
|
|
10
|
-
assistantType?: string;
|
|
11
|
-
/**
|
|
12
|
-
* LLM Model identifier to lookup which sdk and model to use.
|
|
13
|
-
* If not provided the default model will be used.
|
|
14
|
-
* Note: This is not the Builder.io data model.
|
|
15
|
-
*/
|
|
16
|
-
modelId?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The unique LOCAL identifier of the thread to submit the user message to.
|
|
19
|
-
* This is used to identify the thread with our own id (openai assistant id is different)
|
|
20
|
-
*/
|
|
21
|
-
id: string;
|
|
22
|
-
/**
|
|
23
|
-
* The unique OPENAI assistant id of the thread to submit the user message to.
|
|
24
|
-
* If the assistantThreadId is not provided, a new thread will be created.
|
|
25
|
-
*/
|
|
26
|
-
assistantThreadId?: string;
|
|
27
|
-
/**
|
|
28
|
-
* The message history of the conversation, user prompt then assistant response.
|
|
29
|
-
* The messages are ordered from oldest to newest. The last message in the array
|
|
30
|
-
* is the message that the user has just sent.
|
|
31
|
-
*/
|
|
32
|
-
messages: (MessageParam | Message)[];
|
|
33
|
-
/**
|
|
34
|
-
* Which platform (framework) the the user has choosen to get help with.
|
|
35
|
-
*/
|
|
36
|
-
platformId?: string;
|
|
37
|
-
/**
|
|
38
|
-
* The user id of the user sending the message.
|
|
39
|
-
* This is used to track the user's progress in the conversation.
|
|
40
|
-
* User id is stored in localStorage for this domain, its not the builder user id.
|
|
41
|
-
*/
|
|
42
|
-
userId: string;
|
|
43
|
-
/**
|
|
44
|
-
* The state of the builder editor.
|
|
45
|
-
*/
|
|
46
|
-
builderState?: BuilderEditorState;
|
|
47
|
-
/**
|
|
48
|
-
* Additional console logs
|
|
49
|
-
*/
|
|
50
|
-
debug?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Date.now() timestamp of when the assistant was started.
|
|
53
|
-
* This is used to calculate the time taken between all events.
|
|
54
|
-
*/
|
|
55
|
-
startMs?: number;
|
|
56
|
-
/**
|
|
57
|
-
* If events should be streamed back throughout the process.
|
|
58
|
-
*
|
|
59
|
-
* Setting to `false` will skip any intermediate processing and emitting
|
|
60
|
-
* events while collecting LLM deltas, but will only emit the final result.
|
|
61
|
-
*
|
|
62
|
-
* Defaults to `true`.
|
|
63
|
-
*/
|
|
64
|
-
stream?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Provide a system prompt id to lookup a pre-defined system prompt
|
|
67
|
-
* text sent to the LLM. Must be a pre-defined system prompt id!
|
|
68
|
-
*/
|
|
69
|
-
systemPromptIds?: {
|
|
70
|
-
"content-edit"?: string;
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Option on how this call should handle the conversation thread.
|
|
74
|
-
*
|
|
75
|
-
* `persist`:
|
|
76
|
-
* - When there is no CompletionOptions `id`, it'll create a new thread id
|
|
77
|
-
* - When given an existing `id`, it'll look up the past thread messages and prefix the messages
|
|
78
|
-
*
|
|
79
|
-
* `ephemeral`:
|
|
80
|
-
* - Creates a new conversation each time, ignoring any existing thread history
|
|
81
|
-
* - Will not save the conversation for future use
|
|
82
|
-
*
|
|
83
|
-
* Defaults to `persist`
|
|
84
|
-
*/
|
|
85
|
-
thread?: "persist" | "ephemeral";
|
|
86
|
-
attachments?: Attachment[];
|
|
87
|
-
}
|
|
88
|
-
export interface BuilderEditorState {
|
|
89
|
-
/**
|
|
90
|
-
* The active locale of the builder editor.
|
|
91
|
-
*/
|
|
92
|
-
activeLocale?: string;
|
|
93
|
-
/**
|
|
94
|
-
* The locale of the provided builder content.
|
|
95
|
-
*/
|
|
96
|
-
contentLocale?: string;
|
|
97
|
-
/**
|
|
98
|
-
* Top level Builder content. The data.blocks array contains the BuilderElement.
|
|
99
|
-
*/
|
|
100
|
-
content?: BuilderContent;
|
|
101
|
-
/**
|
|
102
|
-
* Builder custom components.
|
|
103
|
-
*/
|
|
104
|
-
components?: Component[];
|
|
105
|
-
/**
|
|
106
|
-
* Builder design tokens.
|
|
107
|
-
*/
|
|
108
|
-
designTokens?: Record<string, string>;
|
|
109
|
-
/**
|
|
110
|
-
* Builder model. (not the LLM model)
|
|
111
|
-
*/
|
|
112
|
-
model?: BuilderModel;
|
|
113
|
-
/**
|
|
114
|
-
* Other models in the Builder account
|
|
115
|
-
*/
|
|
116
|
-
otherModels?: BuilderModel[];
|
|
117
|
-
/**
|
|
118
|
-
* The URL that the Builder content preview is pointing to.
|
|
119
|
-
*/
|
|
120
|
-
previewUrl?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Selected ids in the builder.
|
|
123
|
-
*/
|
|
124
|
-
selectedIds?: string[];
|
|
125
|
-
/**
|
|
126
|
-
* Builder space id.
|
|
127
|
-
*/
|
|
128
|
-
spaceId?: string;
|
|
129
|
-
/**
|
|
130
|
-
* Builder user id.
|
|
131
|
-
*/
|
|
132
|
-
userId?: string;
|
|
133
|
-
/**
|
|
134
|
-
* Email of the user in the builder.
|
|
135
|
-
*/
|
|
136
|
-
userEmail?: string;
|
|
137
|
-
/**
|
|
138
|
-
* User's jobs
|
|
139
|
-
*/
|
|
140
|
-
userJobs?: string[];
|
|
141
|
-
/**
|
|
142
|
-
* Builder session id.
|
|
143
|
-
*/
|
|
144
|
-
sessionId?: string;
|
|
145
|
-
/**
|
|
146
|
-
* Custom instructions that could be add into the prompt.
|
|
147
|
-
*/
|
|
148
|
-
customInstructions?: Record<string, string>;
|
|
149
|
-
/**
|
|
150
|
-
* All targeting attributes of the content.
|
|
151
|
-
*/
|
|
152
|
-
allTargetingAttributes?: Record<string, any>;
|
|
153
|
-
}
|
package/src/completion.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|