@builder.io/ai-utils
Advanced tools
Comparing version 0.0.62 to 0.0.63
@@ -62,2 +62,11 @@ import type { BuilderContent, BuilderElement, Component } from "@builder.io/sdk"; | ||
startMs?: number; | ||
/** | ||
* If events should be streamed back throughout the process. | ||
* | ||
* Setting to `false` will skip any intermediate processing and emitting | ||
* events while collecting LLM deltas, but will only emit the final result. | ||
* | ||
* Defaults to `true`. | ||
*/ | ||
stream?: boolean; | ||
} | ||
@@ -64,0 +73,0 @@ export interface BuilderEditorState { |
@@ -6,3 +6,10 @@ import type { BuilderContent, BuilderElement } from "@builder.io/sdk"; | ||
export type BuilderAssistantEventHandler = (ev: BuilderAssistantEvent) => void; | ||
export type BuilderAssistantEvent = AssistantErrorEvent | AssistantStreamErrorEvent | AppCloseEvent | AppMessagesClickEvent | AppMessagesGenerationEvent | AppMessageEditCustomInstructionsEvent | AppPromptAbortEvent | AppPromptFocusEvent | AppPromptTextEvent | AppReadyEvent | AppSettingsResetEvent | AppSettingsSetEvent | AppThreadNewEvent | AssistantStatsEvent | BuilderEditorAuthEvent | BuilderEditorStateEvent | ContentUpdateEvent | ContentApplySnapshotEvent | ModelCreateEvent | ModelUpdateEvent | ModelUndoEvent | ModelRedoEvent | ResultEvent | ThreadCreatedEvent | ThreadMessageCompletedEvent | ThreadMessageCreatedEvent | ThreadMessageDeltaEvent | ThreadMessageFeedbackEvent | ThreadRunRequiresActionEvent | ThreadRunStepCreatedEvent | ThreadRunStepDeltaEvent | AppAcceptChangeEvent | AppAcceptRejectEvent | AssistantTrackEvent; | ||
export type BuilderAssistantEvent = AssistantCompletionResultEvent | AssistantErrorEvent | AssistantStreamErrorEvent | AppCloseEvent | AppMessagesClickEvent | AppMessagesGenerationEvent | AppMessageEditCustomInstructionsEvent | AppPromptAbortEvent | AppPromptFocusEvent | AppPromptTextEvent | AppReadyEvent | AppSettingsResetEvent | AppSettingsSetEvent | AppThreadNewEvent | AssistantStatsEvent | BuilderEditorAuthEvent | BuilderEditorStateEvent | ContentUpdateEvent | ContentApplySnapshotEvent | ModelCreateEvent | ModelUpdateEvent | ModelUndoEvent | ModelRedoEvent | ResultEvent | ThreadCreatedEvent | ThreadMessageCompletedEvent | ThreadMessageCreatedEvent | ThreadMessageDeltaEvent | ThreadMessageFeedbackEvent | ThreadRunRequiresActionEvent | ThreadRunStepCreatedEvent | ThreadRunStepDeltaEvent | AppAcceptChangeEvent | AppAcceptRejectEvent | AssistantTrackEvent; | ||
export interface AssistantCompletionResultEvent { | ||
type: "assistant.result"; | ||
data: { | ||
content?: BuilderContent; | ||
stats?: AssistantStats; | ||
}; | ||
} | ||
export interface AssistantError { | ||
@@ -9,0 +16,0 @@ message: string; |
{ | ||
"name": "@builder.io/ai-utils", | ||
"version": "0.0.62", | ||
"version": "0.0.63", | ||
"description": "Builder.io AI utils", | ||
@@ -5,0 +5,0 @@ "type": "module", |
27883
916