I just updated LlamaIndex and got this error: ImportError: cannot import name 'PromptTemplate' from 'llama_index.prompts' (/Users/jana/work/LlamaIndexLangChain/jupyter/myenv/lib/python3.9/site-packages/llama_index/prompts/init.py) upon calling this query_engine = index.as_query_engine() on a vector index. Anyone experiencing the same issue and know how to resolve it?
I have reinstalled the llama-index. Error occurs when I run from llama_index.prompts import PromptTemplate trace is simple: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[18], line 1 ----> 1 from llama_index.prompts import PromptTemplate
ImportError: cannot import name 'PromptTemplate' from 'llama_index.prompts' (/Users/jana/work/LlamaIndexLangChain/jupyter/myenv/lib/python3.9/site-packages/llama_index/prompts/init.py)
If I run : query_engine = index.as_query_engine() then the trace is --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[19], line 1 ----> 1 query_engine = index.as_query_engine()
File ~/work/LlamaIndexLangChain/jupyter/myenv/lib/python3.9/site-packages/llama_index/query_engine/init.py:1 ----> 1 from llama_index.query_engine.citation_query_engine import CitationQueryEngine 2 from llama_index.query_engine.flare.base import FLAREInstructQueryEngine 3 from llama_index.query_engine.graph_query_engine import ComposableGraphQueryEngine
File ~/work/LlamaIndexLangChain/jupyter/myenv/lib/python3.9/site-packages/llama_index/query_engine/citation_query_engine.py:10 8 from llama_index.indices.query.base import BaseQueryEngine 9 from llama_index.indices.query.schema import QueryBundle ---> 10 from llama_index.prompts import PromptTemplate 11 from llama_index.prompts.base import BasePromptTemplate 12 from llama_index.response.schema import RESPONSE_TYPE
ImportError: cannot import name 'PromptTemplate' from 'llama_index.prompts' (/Users/jana/work/LlamaIndexLangChain/jupyter/myenv/lib/python3.9/site-packages/llama_index/prompts/init.py)