File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/contextual/types/agents Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -49,12 +49,17 @@ class RetrievalContentCtxlMetadata(BaseModel):
49
49
section_title : Optional [str ] = None
50
50
"""Title of the section."""
51
51
52
- __pydantic_extra__ : Dict [str , object ] = FieldInfo (init = False ) # pyright: ignore[reportIncompatibleVariableOverride]
53
52
if TYPE_CHECKING :
53
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
54
+ # value to this field, so for compatibility we avoid doing it at runtime.
55
+ __pydantic_extra__ : Dict [str , object ] = FieldInfo (init = False ) # pyright: ignore[reportIncompatibleVariableOverride]
56
+
54
57
# Stub to indicate that arbitrary properties are accepted.
55
58
# To access properties that are not valid identifiers you can use `getattr`, e.g.
56
59
# `getattr(obj, '$type')`
57
60
def __getattr__ (self , attr : str ) -> object : ...
61
+ else :
62
+ __pydantic_extra__ : Dict [str , object ]
58
63
59
64
60
65
class RetrievalContentCustomMetadataConfig (BaseModel ):
You can’t perform that action at this time.
0 commit comments