-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Open
Description
Bug Description
Several legacy exports are still listed in llama_index.core.__all__, but are no longer actually bound at runtime.
This causes import failures for names that appear to be part of the public API, for example:
from llama_index.core import GPTKnowledgeGraphIndex
from llama_index.core import SummaryPrompt
from llama_index.core import *At runtime, these currently fail because:
GPTKnowledgeGraphIndexis listed inllama_index.core.indices.__all__, but is not actually imported/bound there- legacy prompt aliases such as
SummaryPrompt,TreeInsertPrompt,RefinePrompt, etc. exist inllama_index.core.prompts.prompts, but are not re-exported throughllama_index.core.promptsorllama_index.core
This also means from llama_index.core import * can fail with AttributeError because __all__ references names that are missing from the module object.
Version
0.14.18
Steps to Reproduce
- Create a clean environment and install/import
llama-index-core - Run:
from llama_index.core import GPTKnowledgeGraphIndex- Run:
from llama_index.core import SummaryPrompt- Run:
from llama_index.core import *Relevant Logs/Tracbacks
ImportError: cannot import name 'GPTKnowledgeGraphIndex' from 'llama_index.core'
ImportError: cannot import name 'SummaryPrompt' from 'llama_index.core'
AttributeError: module 'llama_index.core' has no attribute 'GPTKnowledgeGraphIndex'Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels