@personaai/runtime 0.9.0 → 0.9.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 +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -756,7 +756,11 @@ var createVoiceSession = async (request, ctx) => {
|
|
|
756
756
|
const body = requireBodyObject(request.body);
|
|
757
757
|
const agentId = requireStringField(body, "agentId");
|
|
758
758
|
const threadId = typeof body.threadId === "string" && body.threadId ? body.threadId : void 0;
|
|
759
|
-
const
|
|
759
|
+
const contextOverride = typeof body.contextOverride === "string" && body.contextOverride ? body.contextOverride : void 0;
|
|
760
|
+
const ticket = await ctx.client.voice.createSession(agentId, {
|
|
761
|
+
...threadId ? { threadId } : {},
|
|
762
|
+
...contextOverride ? { contextOverride } : {}
|
|
763
|
+
});
|
|
760
764
|
await ctx.hooks?.onVoiceSessionCreate?.({
|
|
761
765
|
userId: request.userId,
|
|
762
766
|
agentId,
|