Find answers from the community

Updated 3 months ago

NEED HELP!!!!

NEED HELP!!!!
ImportError: cannot import name 'BaseQueryEngine' from partially initialized module 'llama_index.core' (most likely due to a circular import) getting it for importing get_tokenizer from utils and also for TokenCountingHandler from llama_index.core.callbacks
W
2 comments
How are you importing them currently?
Try importing it like this:
Plain Text
from llama_index.core.callbacks import TokenCountingHandler
from llama_index.core.utils import get_tokenizer
from llama_index.core.query_engine import BaseQueryEngine
Add a reply
Sign up and join the conversation on Discord