VapiAI / server-sdk-python

The official Python SDK for accessing Vapi's API
6 stars 2 forks source link

clients.calls.list not working #1

Open pintotomas opened 1 week ago

pintotomas commented 1 week ago

Hello. I am trying to list calls, but it's breaking at some point within the list(). The steps I'm taking are:

`import os

from vapi import Vapi

vapi_access_token = os.environ.get("VAPI_ACCESS_TOKEN") if not vapi_access_token: raise ValueError("Please set VAPI_ACCESS_TOKEN environment variable.")

client = Vapi( token=vapi_access_token ) calls = client.calls.list( limit=1000 ) print(len(calls))`

then by executing python3 download_vapi_call_recordings.py, after a while i see this error:

error while listing calls 288 validation errors for list[Call] I'm seeing infinite messages like this:

Field required [type=missing, input_value={'name': 'verifyAddressAn...nds_from_start': 112.64}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/missing 216.messages.20.SystemMessage.message Field required [type=missing, input_value={'name': 'verifyAddressAn...nds_from_start': 112.64}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/missing 216.messages.20.BotMessage.message Field required [type=missing, input_value={'name': 'verifyAddressAn...nds_from_start': 112.64}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/missing 216.messages.20.BotMessage.end_time Field required [type=missing, input_value={'name': 'verifyAddressAn...nds_from_start': 112.64}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/missing 216.messages.20.ToolCallMessage.tool_calls Field required [type=missing, input_value={'name': 'verifyAddressAn...nds_from_start': 112.64}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/missing

I tried the golang sdk and it worked. Atleast it didnt crash within the sdk. Is this working? I've tried with both of the versions that were released and I'm running python:3.9-alpine

pintotomas commented 1 week ago

I've tried with python 3.8 again and same results @chdeskur