@builder.io/ai-utils 0.0.32 → 0.0.34

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.
@@ -26,7 +26,9 @@ export interface CompletionOptions {
26
26
  */
27
27
  assistantThreadId?: string;
28
28
  /**
29
- * The user message to submit to the assistant.
29
+ * The message history of the conversation, user prompt then assistant response.
30
+ * The messages are ordered from oldest to newest. The last message in the array
31
+ * is the message that the user has just sent.
30
32
  */
31
33
  messages: MessageParam[];
32
34
  /**
package/dist/events.d.ts CHANGED
@@ -97,7 +97,7 @@ export interface ContentUpdateEvent {
97
97
  type: "assistant.content.update";
98
98
  data: ContentUpdatePatch[];
99
99
  }
100
- export type ContentUpdatePatch = ContentInsertBeforePatch | ContentInsertAfterPatch | ContentPropsUpdatePatch | ContentSetChildrenPatch | ContentStyleUpdatePatch | ContentDeletePatch | ContentSetStorePatch;
100
+ export type ContentUpdatePatch = ContentInsertBeforePatch | ContentInsertAfterPatch | ContentPropsUpdatePatch | ContentSetChildrenPatch | ContentStyleUpdatePatch | ContentDeletePatch | ContentSetStorePatch | ContentSetMountPatch;
101
101
  export interface NodeData {
102
102
  /**
103
103
  * When dealing with column nodes we need to store the column index so
@@ -141,6 +141,9 @@ export interface ContentDeletePatch extends ContentPatchBase {
141
141
  export interface ContentSetStorePatch extends ContentPatchBase {
142
142
  type: "store";
143
143
  }
144
+ export interface ContentSetMountPatch extends ContentPatchBase {
145
+ type: "mount";
146
+ }
144
147
  export interface ContentCompleteEvent {
145
148
  type: "assistant.content.complete";
146
149
  data: ContentComplete;
@@ -60,6 +60,15 @@ export interface AssistantMessageParam {
60
60
  arguments: any;
61
61
  };
62
62
  id?: string;
63
+ /**
64
+ * A summary of the patches which the assistant has made.
65
+ * Useful for genai.
66
+ */
67
+ patches?: AssistantPatch[];
68
+ }
69
+ export interface AssistantPatch {
70
+ id: string;
71
+ type: string;
63
72
  }
64
73
  export interface SystemMessage extends SystemMessageParam {
65
74
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",