@personaai/runtime 0.7.0 → 0.7.1
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/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -747,10 +747,12 @@ var resetThread = async (_request, ctx) => {
|
|
|
747
747
|
var createVoiceSession = async (request, ctx) => {
|
|
748
748
|
const body = requireBodyObject(request.body);
|
|
749
749
|
const agentId = requireStringField(body, "agentId");
|
|
750
|
-
const
|
|
750
|
+
const threadId = typeof body.threadId === "string" && body.threadId ? body.threadId : void 0;
|
|
751
|
+
const ticket = await ctx.client.voice.createSession(agentId, threadId ? { threadId } : {});
|
|
751
752
|
await ctx.hooks?.onVoiceSessionCreate?.({
|
|
752
753
|
userId: request.userId,
|
|
753
|
-
agentId
|
|
754
|
+
agentId,
|
|
755
|
+
threadId
|
|
754
756
|
});
|
|
755
757
|
return json(201, ticket);
|
|
756
758
|
};
|