Skip to content

Commit

Permalink
unpin pydantic (#17193)
Browse files Browse the repository at this point in the history
* unpin pydantic

* doesn't actually work until 2.8.0

* unpin pydantic

* doesn't actually work until 2.8.0

* lock
  • Loading branch information
logan-markewich authored Dec 8, 2024
1 parent b7c9655 commit 27eeec7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 4 additions & 1 deletion llama-index-core/llama_index/core/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ class BaseComponent(BaseModel):
def __get_pydantic_json_schema__(
cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler
) -> JsonSchemaValue:
json_schema = super().__get_pydantic_json_schema__(core_schema, handler)
json_schema = handler(core_schema)
json_schema = handler.resolve_ref_schema(json_schema)

# inject class name to help with serde
if "properties" in json_schema:
json_schema["properties"]["class_name"] = {
"title": "Class Name",
Expand Down
5 changes: 2 additions & 3 deletions llama-index-core/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion llama-index-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ tqdm = "^4.66.1"
pillow = ">=9.0.0"
PyYAML = ">=6.0.1"
wrapt = "*"
pydantic = ">=2.7.0,<2.10.0" # TODO: 2.10 was breaking many things, unpin when it settles down
pydantic = ">=2.8.0"
filetype = "^1.2.0" # Used for multi-modal MIME utils
eval-type-backport = {python = "<3.10", version = "^0.2.0"}

Expand Down

0 comments on commit 27eeec7

Please sign in to comment.