Skip to content

Commit b25da31

Browse files
fern-supportThomas Baker
andauthored
other fix (#675)
Co-authored-by: Thomas Baker <thomas@buildwithfern.com>
1 parent f7a74c7 commit b25da31

4 files changed

Lines changed: 22 additions & 3 deletions

File tree

src/elevenlabs/types/object_json_schema_property_input.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Config:
2424
smart_union = True
2525
extra = pydantic.Extra.allow
2626

27-
27+
from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, I001
2828
from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue # noqa: E402, I001
2929

30-
update_forward_refs(ObjectJsonSchemaPropertyInput)
30+
update_forward_refs(ObjectJsonSchemaPropertyInput, ArrayJsonSchemaPropertyInput=ArrayJsonSchemaPropertyInput)

src/elevenlabs/types/object_json_schema_property_output.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class Config:
2525
extra = pydantic.Extra.allow
2626

2727

28+
29+
from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, I001
2830
from .object_json_schema_property_output_properties_value import ObjectJsonSchemaPropertyOutputPropertiesValue # noqa: E402, I001
2931

30-
update_forward_refs(ObjectJsonSchemaPropertyOutput)
32+
update_forward_refs(ObjectJsonSchemaPropertyOutput, ArrayJsonSchemaPropertyOutput=ArrayJsonSchemaPropertyOutput)

tests/test_convai_imports.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from elevenlabs import ElevenLabs
2+
3+
4+
def test_convai_imports():
5+
client = ElevenLabs(api_key="")
6+
client.conversational_ai.agents

tests/test_recursive_models.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from elevenlabs import AgentWorkflowRequestModel, ObjectJsonSchemaPropertyInput, ObjectJsonSchemaPropertyOutput
2+
3+
4+
def test_recursive_models():
5+
# Should be able to import and use the recursive types without PydanticUserError
6+
# ObjectJsonSchemaPropertyInput has no required fields, so it can be instantiated
7+
ObjectJsonSchemaPropertyInput()
8+
9+
ObjectJsonSchemaPropertyOutput()
10+
11+
AgentWorkflowRequestModel()

0 commit comments

Comments
 (0)