October 7, 2024
-
Add Structured Outputs for OpenAI Functions in Assistant Tools: You can use OpenAI Structured Outputs by specifying a new parameter called
strict
as true or false when creating or usingOpenAIFunction
s inassistant.model.tools[type=function]
. Set thename
, provide adescription
(up to 1000 characters), and specifyparameters
as a JSON Schema object. See the OpenAI guide for examples. -
Secure Incoming SIP Phone Calls to Vapi Provided SIP Numbers: You can now specify a
username
,password
, and optionalrealm
in SIP Invite AuthZ header, through digest authentication. Create this secure SIP number by specifying an “authentication” object with the username and password fields insidePOST /phone-number
request body. Example:
-
Use Updated
handoff
,callback
Steps in Blocks: You can now useassistant.model.steps[type=handoff]
andassistant.model.steps[type=callback]
to control conversation flow in your assistant. UseHandoffStep
to move to the next step linearly without returning to the previous step, ideal for sequential tasks like forms. UseCallbackStep
to spawn a new conversation thread and return to the previous step once done, good for handling interruptions or sub-tasks within a conversation. -
Use Step Destinations and Assignment Mutation in Blocks: Specify destination nodes for each step with
assistant.model.steps[type=handoff].destinations[type=step]
to direct the workflow to specific steps based on certain conditions. Update context variables in each callback step withmutations[type=assignment]
, for example:assistant.model.steps[type=callback].mutations[type=assignment]