@builder.io/ai-utils 0.0.71 → 0.0.72
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/package.json +1 -1
- package/src/messages.d.ts +8 -1
- package/src/settings.js +2 -2
package/package.json
CHANGED
package/src/messages.d.ts
CHANGED
|
@@ -115,7 +115,14 @@ export interface AssistantActionMessage {
|
|
|
115
115
|
export type Message = SystemMessage | UserMessage | AssistantMessage;
|
|
116
116
|
export type GeneratingMessage = null | Partial<AssistantActionMessage | AssistantMessage>;
|
|
117
117
|
export declare function getContentText(message: string | ContentMessage): string;
|
|
118
|
-
export type Attachment = Template;
|
|
118
|
+
export type Attachment = FileUpload | Template;
|
|
119
|
+
export interface FileUpload {
|
|
120
|
+
type: string;
|
|
121
|
+
name: string;
|
|
122
|
+
dataUrl: string;
|
|
123
|
+
size: number;
|
|
124
|
+
id: number;
|
|
125
|
+
}
|
|
119
126
|
export interface Template {
|
|
120
127
|
type: "template";
|
|
121
128
|
name: string;
|
package/src/settings.js
CHANGED
|
@@ -7,8 +7,8 @@ const urlParamSettings = [
|
|
|
7
7
|
"viewId",
|
|
8
8
|
];
|
|
9
9
|
export function getAssistantUrl(opts = {}) {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
var _a;
|
|
11
|
+
const url = new URL((_a = opts.baseUrl) !== null && _a !== void 0 ? _a : (opts.local ? "http://localhost:7242" : "https://assistant.builder.io"));
|
|
12
12
|
urlParamSettings.forEach((key) => {
|
|
13
13
|
const value = opts[key];
|
|
14
14
|
if (typeof value === "string" || typeof value === "boolean") {
|