Skip to content

Commit a5fa070

Browse files
authored
Fix pydantic issue (#541)
1 parent 4ce79e2 commit a5fa070

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.fernignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ src/elevenlabs/conversational_ai/default_audio_interface.py
77
src/elevenlabs/play.py
88
src/elevenlabs/realtime_tts.py
99
src/elevenlabs/types/get_agent_response_model.py
10+
src/elevenlabs/types/prompt_agent.py
1011

1112
# Ignore CI files
1213
.github/

src/elevenlabs/types/prompt_agent.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from .knowledge_base_locator import KnowledgeBaseLocator
1111
from .custom_llm import CustomLlm
1212
from .rag_config import RagConfig
13-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
13+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
1414

1515

1616
class PromptAgent(UncheckedBaseModel):
@@ -72,3 +72,10 @@ class Config:
7272
frozen = True
7373
smart_union = True
7474
extra = pydantic.Extra.allow
75+
76+
from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402
77+
78+
update_forward_refs(ArrayJsonSchemaPropertyOutput)
79+
80+
if IS_PYDANTIC_V2:
81+
PromptAgent.model_rebuild()

0 commit comments

Comments
 (0)