diff --git a/src/elevenlabs/types/object_json_schema_property_input.py b/src/elevenlabs/types/object_json_schema_property_input.py index a175d147..fcf8fea5 100644 --- a/src/elevenlabs/types/object_json_schema_property_input.py +++ b/src/elevenlabs/types/object_json_schema_property_input.py @@ -24,7 +24,7 @@ class Config: smart_union = True extra = pydantic.Extra.allow - +from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, I001 from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue # noqa: E402, I001 -update_forward_refs(ObjectJsonSchemaPropertyInput) +update_forward_refs(ObjectJsonSchemaPropertyInput, ArrayJsonSchemaPropertyInput=ArrayJsonSchemaPropertyInput) diff --git a/src/elevenlabs/types/object_json_schema_property_output.py b/src/elevenlabs/types/object_json_schema_property_output.py index e9e6169d..53eccae7 100644 --- a/src/elevenlabs/types/object_json_schema_property_output.py +++ b/src/elevenlabs/types/object_json_schema_property_output.py @@ -25,6 +25,8 @@ class Config: extra = pydantic.Extra.allow + +from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, I001 from .object_json_schema_property_output_properties_value import ObjectJsonSchemaPropertyOutputPropertiesValue # noqa: E402, I001 -update_forward_refs(ObjectJsonSchemaPropertyOutput) +update_forward_refs(ObjectJsonSchemaPropertyOutput, ArrayJsonSchemaPropertyOutput=ArrayJsonSchemaPropertyOutput) diff --git a/tests/test_convai_imports.py b/tests/test_convai_imports.py new file mode 100644 index 00000000..7cd9f0b8 --- /dev/null +++ b/tests/test_convai_imports.py @@ -0,0 +1,6 @@ +from elevenlabs import ElevenLabs + + +def test_convai_imports(): + client = ElevenLabs(api_key="") + client.conversational_ai.agents diff --git a/tests/test_recursive_models.py b/tests/test_recursive_models.py new file mode 100644 index 00000000..6174ed63 --- /dev/null +++ b/tests/test_recursive_models.py @@ -0,0 +1,11 @@ +from elevenlabs import AgentWorkflowRequestModel, ObjectJsonSchemaPropertyInput, ObjectJsonSchemaPropertyOutput + + +def test_recursive_models(): + # Should be able to import and use the recursive types without PydanticUserError + # ObjectJsonSchemaPropertyInput has no required fields, so it can be instantiated + ObjectJsonSchemaPropertyInput() + + ObjectJsonSchemaPropertyOutput() + + AgentWorkflowRequestModel()