Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support llama-index >= 0.11.0 #115

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

desaxce
Copy link
Collaborator

@desaxce desaxce commented Aug 27, 2024

LLamaIndex version 0.11.0 introduced dependency on pydantic v2 which prevents underscore prefixed Field() on classes.

Changes:

  • switched private fields to PrivateAttr
  • added test against latest LlamaIndex version

To test:

from literalai import LiteralClient
lc = LiteralClient(api_key="xxx")
lc.instrument_llamaindex()

@desaxce desaxce force-pushed the hugues/eng-1823-check-issue-llamaindex-python branch from 3a0bbd9 to c3bd506 Compare August 27, 2024 13:59
from typing import TYPE_CHECKING, Any, Dict, List, Optional, TypedDict, Union, cast

from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union, cast
from typing_extensions import TypedDict
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.11 fails otherwise

@desaxce desaxce merged commit b325c0b into main Aug 27, 2024
2 checks passed
@desaxce desaxce deleted the hugues/eng-1823-check-issue-llamaindex-python branch August 27, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NameError: Fields must not use names with leading underscores; e.g., use 'client' instead of '_client'.
2 participants