### Start Vapi Call with Assistant Object Source: https://github.com/vapiai/client-sdk-python/blob/main/README.rst Initiates a new Vapi call by invoking the `start` method and providing a detailed assistant configuration object. This allows for dynamic setup of the call's behavior, including initial messages, context, model, voice, and custom functions with their parameters. ```python assistant = { 'firstMessage': 'Hey, how are you?', 'context': 'You are a shopping assistant...', 'model': 'gpt-3.5-turbo', 'voice': 'jennifer-playht', "recordingEnabled": True, "interruptionsEnabled": False, "functions": [ { "name": "setColor", "description": "Used to set the color", "parameters": { "type": "object", "properties": { "color": { "type": "string" } } } } ] } vapi.start(assistant=assistant) ``` -------------------------------- ### Install Vapi Python SDK Source: https://github.com/vapiai/client-sdk-python/blob/main/README.rst Instructions to install the Vapi Python SDK using pip, the standard Python package installer. This command fetches the latest version of the SDK from PyPI. ```bash pip install vapi_python ``` -------------------------------- ### Start Vapi Call with Assistant ID Source: https://github.com/vapiai/client-sdk-python/blob/main/README.rst Initiates a new Vapi call by invoking the `start` method and providing an existing `assistant_id`. This method is suitable when you have pre-configured assistants on the Vapi platform. ```python vapi.start(assistant_id='your-assistant-id') ``` -------------------------------- ### Initialize Vapi Client Source: https://github.com/vapiai/client-sdk-python/blob/main/README.rst Demonstrates how to create a new instance of the Vapi class. Your Vapi API Key must be passed as a parameter to the constructor for authentication and authorization. ```python vapi = Vapi(api_key='your-api-key') ``` -------------------------------- ### Import Vapi Class Source: https://github.com/vapiai/client-sdk-python/blob/main/README.rst Shows how to import the Vapi class from the `vapi_python` package. This is the first step required to interact with the Vapi API using the SDK. ```python from vapi_python import Vapi ``` -------------------------------- ### Override Assistant Parameters for Vapi Call Source: https://github.com/vapiai/client-sdk-python/blob/main/README.rst Demonstrates how to modify existing assistant parameters or set variable values for a Vapi call using the `assistant_overrides` parameter. This allows for dynamic adjustments to assistant behavior, such as disabling recording or injecting custom data like a user's name. ```python assistant_overrides = { "recordingEnabled": False, "variableValues": { "name": "John" } } vapi.start(assistant_id='your-assistant-id', assistant_overrides=assistant_overrides) ``` -------------------------------- ### Stop Active Vapi Session Source: https://github.com/vapiai/client-sdk-python/blob/main/README.rst Terminates the current Vapi session. Calling this method will stop any ongoing recording and close the connection, ending the active call. ```python vapi.stop() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.