File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1313- Adds a /test entrypoint to make adding tests with the agent easier.
1414- Simplifies the types for generating object & text to more closely match the AI
1515 SDK.
16+ - Allows passing a ` promptMessageId ` to ` saveMessage ` to match ` saveMessages ` .
1617
1718## 0.2.10
1819
Original file line number Diff line number Diff line change @@ -798,6 +798,7 @@ export class Agent<
798798 : [ args . message ] ,
799799 metadata : args . metadata ? [ args . metadata ] : undefined ,
800800 skipEmbeddings : args . skipEmbeddings ,
801+ promptMessageId : args . promptMessageId ,
801802 pendingMessageId : args . pendingMessageId ,
802803 } ) ;
803804 const message = messages . at ( - 1 ) ! ;
Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ export async function saveMessages(
160160export type SaveMessageArgs = {
161161 threadId : string ;
162162 userId ?: string | null ;
163+ /**
164+ * The message that these messages are in response to. They will be
165+ * the same "order" as this message, at increasing stepOrder(s).
166+ */
167+ promptMessageId ?: string ;
163168 /**
164169 * Metadata to save with the messages. Each element corresponds to the
165170 * message at the same index.
@@ -218,6 +223,7 @@ export async function saveMessage(
218223 threadId : args . threadId ,
219224 userId : args . userId ?? undefined ,
220225 agentName : args . agentName ,
226+ promptMessageId : args . promptMessageId ,
221227 pendingMessageId : args . pendingMessageId ,
222228 messages :
223229 args . prompt !== undefined
You can’t perform that action at this time.
0 commit comments