-
Notifications
You must be signed in to change notification settings - Fork 388
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Do you guys test your releases at all ?
The python SDK for conversational AI barely work.
I always face issue with imports or schemas not truly reflecting the API. I had already faced an issue with #650
Example :
from elevenlabs.conversational_ai.phone_numbers.types import (
PhoneNumbersCreateRequestBody_Twilio as PhoneNumbersCreateRequestBody,
)
from elevenlabs.conversational_ai.phone_numbers.types import (
PhoneNumbersUpdateResponse,
)
from elevenlabs.core.api_error import ApiError as ElevenLabsApiError
from elevenlabs.core.request_options import RequestOptions
from elevenlabs.types import (
AgentCallLimits,
AgentConfig,
AgentPlatformSettingsRequestModel,
AgentWorkspaceOverridesInput,
ArrayJsonSchemaPropertyOutput,
ClientEvent,
ConvAiSecretLocator,
ConversationalConfig,
ConversationConfig,
ConversationInitiationClientDataConfigInput,
ConversationInitiationClientDataWebhook,
CreateAgentResponseModel,
CreatePhoneNumberResponseModel,
DynamicVariablesConfig,
DynamicVariablesConfigDynamicVariablePlaceholdersValue,
GetAgentResponseModel,
GetAgentsPageResponseModel,
GetPronunciationDictionariesMetadataResponseModel,
GetPronunciationDictionaryMetadataResponse,
Llm,
PromptAgentApiModelInputToolsItem_System,
PromptAgentApiModelOutput,
PromptAgentApiModelOutputToolsItem_System,
PydanticPronunciationDictionaryVersionLocator,
SystemToolConfigInputParams_EndCall,
SystemToolConfigOutputParams_EndCall,
TtsConversationalConfigOutput,
TurnConfig,
TurnMode,
)
from pydantic import BaseModel
if __name__ == "__main__":
print("OK")
Just doing this fails on version 2.13.0 and later.
On version 2.13.0, adding the two lines below fixes this problem
PromptAgentApiModelOutput.model_rebuild()
AgentConfig.model_rebuild()
But then it breaks again on the latest version. (I believe it breaks with version 2.18.0)
The error message on 2.18.0 :
ImportError: Failed to import GetAgentResponseModel from .get_agent_response_model: cannot import name 'AstAndOperatorNodeOutputChildrenItem' from partially initialized module 'elevenlabs.types.ast_and_operator_node_output_children_item' (most likely due to a circular import)
The error message on 2.21.0 :
pydantic.errors.PydanticUndefinedAnnotation: name 'ObjectJsonSchemaPropertyOutput' is not defined
For further information visit https://errors.pydantic.dev/2.11/u/undefined-annotation
Code example
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working