raise Exception(f"Failed to start conversation: {r...
# support
a
this is my code...
Copy code
import asyncio
from vapi_python.vapi_python import Vapi

async def main():
    # Initialize VAPI with your API key
    vapi = Vapi(api_key='abc')
    
    # Configure the pizza shop assistant
    assistant = {
        'firstMessage': 'Thank you for calling Vappys Pizza! How can I help you today?',
        'context': '''You are an employee at a pizza shop.
        
        Menu:
        Pizzas:
        - Margherita ($10)
        - Pepperoni ($12)
        - Veggie Supreme ($13)
        
        Sides:
        - Garlic Bread ($4)
        - Chicken Wings ($8)
        
        Drinks:
        - Soda ($2)
        - Water ($1)
        
        Be friendly, confirm orders clearly, and ask for delivery address if needed.
        Estimate 30-40 minutes for delivery, 15-20 for pickup.''',
        'model': 'gpt-4',
        'voice': 'jennifer-playht',
        'recordingEnabled': True,
        'interruptionsEnabled': True
    }
    
    print(":pizza: Starting Pizza Shop Assistant...")
    print("Press Ctrl+C to end the conversation")
    
    try:
        # Start the conversation
        await vapi.start(assistant=assistant)
        
        # Keep the conversation going until Ctrl+C is pressed
        while True:
            await asyncio.sleep(1)
            
    except KeyboardInterrupt:
        print("\n:wave: Ending conversation...")
        await vapi.stop()

if __name__ == "__main__":
    asyncio.run(main())
help me with this issue
k
What's your issue?
a
I am working on implementing a voice AI bot using VAPI that can assist users with questions about pizza based on a predefined menu. My goal is to create a system that accepts web calls and provides responses to users in a friendly and informative manner. However, I am currently facing some challenges with the implementation. In my code, I initialize the VAPI with my API key and configure the assistant with a welcoming message and a detailed context that includes the pizza menu and other offerings. Despite my efforts, I encounter an error when trying to start the conversation, which states: "Failed to start conversation." This error prevents the assistant from functioning as intended. I have structured my code to handle the conversation using asynchronous programming, allowing it to run continuously until interrupted. However, I am unsure why the conversation fails to start, and I would appreciate any guidance or troubleshooting tips to resolve this issue. Also,**I'm looking for Python code that can accept a web call and provide responses. I'm feeling a bit lost with the implementation details. If there is a simple python code which can help me test this functionality using existing assistant id/api key ** @masondoberstein0