Server sdk python
# support
a
Please provide an example of a non persistent assistant created on the go and connecting a web call to it via server sdk python, because only this library worked for me everything else (python based) didn't work for me
v
You can continue this conversation by mentioning me in the message.
@Ahmed Raza Ur Rehman Certainly! To create a non-persistent assistant on the go and connect a web call to it using the Server SDK in Python, you would typically follow these steps: 1. Install the Server SDK for Python if you haven't already. 2. Write a Python script that initializes the SDK with your credentials. 3. Create a non-persistent assistant with the desired configuration. 4. Start a web call and connect it to the non-persistent assistant. Here's an example code snippet that demonstrates these steps:
Copy code
python
from your_voice_api_sdk import VoiceAPIClient  # Replace with the actual import from the SDK

# Initialize the Voice API client with your credentials
client = VoiceAPIClient(api_key='your_api_key')

# Define the configuration for the non-persistent assistant
assistant_config = {
    'first_message': 'Hello, how can I assist you today?',
    # Add other configuration settings as needed
}

# Create a non-persistent assistant on the go
assistant = client.create_assistant(config=assistant_config, persistent=False)

# Start a web call and connect it to the non-persistent assistant
web_call = client.start_web_call(assistant_id=assistant.id)

# Output the web call details
print(f"Web call started with ID: {web_call.id}")
Please replace
'your_voice_api_key'
with your actual API key and
your_voice_api_sdk
with the correct import path for the Server SDK you are using. The
create_assistant
and
start_web_call
functions are placeholders for the actual functions provided by the SDK, which you would need to replace with the correct function calls based on the SDK's documentation. If you need more specific details or if you encounter any issues, please let me know, and I'll be happy to assist further!
s
Hey @Ahmed Raza Ur Rehman can you help me with issue your facing making calls and steps to reproduce it?
4 Views