@builder.io/ai-utils
Advanced tools
Comparing version 0.0.1 to 0.0.2
import type { BuilderElement, Component } from "@builder.io/sdk"; | ||
import type { MessageParam } from "./messages"; | ||
import type { BuilderModel } from "./events"; | ||
export type { BuilderElement, Component }; | ||
@@ -52,2 +53,6 @@ export interface CompletionOptions { | ||
/** | ||
* Builder model. | ||
*/ | ||
builderModel?: BuilderModel; | ||
/** | ||
* Selected ids in the builder. | ||
@@ -65,2 +70,2 @@ */ | ||
} | ||
export type ToolName = "editContent" | "editModel" | "createModel"; | ||
export type ToolName = "createModel" | "updateModel"; |
@@ -61,2 +61,3 @@ import type { BuilderElement, Component } from "@builder.io/sdk"; | ||
element?: BuilderElement | undefined; | ||
model?: BuilderModel | undefined; | ||
selectedIds?: string[]; | ||
@@ -104,3 +105,3 @@ spaceId?: string | undefined; | ||
type: "assistant.model.create"; | ||
data: DeepPartial<ModelInfo>; | ||
data: BuilderModel; | ||
} | ||
@@ -114,11 +115,13 @@ export interface ModelUpdateEvent { | ||
} | ||
export type ModelInfo = { | ||
name: string; | ||
description: string; | ||
type: string; | ||
fields: { | ||
name: string; | ||
type: string; | ||
}[]; | ||
}; | ||
export interface BuilderModel { | ||
name?: string; | ||
description?: string; | ||
type?: string; | ||
fields?: BuilderModelField[]; | ||
} | ||
export interface BuilderModelField { | ||
name?: string; | ||
type?: string; | ||
description?: string; | ||
} | ||
export type ModelPatch = { | ||
@@ -125,0 +128,0 @@ op: "add" | "remove" | "replace"; |
{ | ||
"name": "@builder.io/ai-utils", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Builder.io AI utils", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
15001
500