@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.cjs
CHANGED
|
@@ -784,7 +784,11 @@ var createVoiceSession = async (request, ctx) => {
|
|
|
784
784
|
const body = requireBodyObject(request.body);
|
|
785
785
|
const agentId = requireStringField(body, "agentId");
|
|
786
786
|
const threadId = typeof body.threadId === "string" && body.threadId ? body.threadId : void 0;
|
|
787
|
-
const
|
|
787
|
+
const contextOverride = typeof body.contextOverride === "string" && body.contextOverride ? body.contextOverride : void 0;
|
|
788
|
+
const ticket = await ctx.client.voice.createSession(agentId, {
|
|
789
|
+
...threadId ? { threadId } : {},
|
|
790
|
+
...contextOverride ? { contextOverride } : {}
|
|
791
|
+
});
|
|
788
792
|
await ctx.hooks?.onVoiceSessionCreate?.({
|
|
789
793
|
userId: request.userId,
|
|
790
794
|
agentId,
|