Ao executar a linha, ocorre erro:
from llama_index.experimental.query_engine import PandasQueryEngine
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipython-input-781478984.py in <cell line: 0>()
----> 1 from llama_index.experimental.query_engine import PandasQueryEngine
ModuleNotFoundError: No module named 'llama_index.experimental'
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
O Gemini está explicando sobre o erro o seguinte:
The error ModuleNotFoundError: No module named 'llama_index.experimental' means that the PandasQueryEngine is being imported from a location that no longer exists in the installed version of the llama-index library.
The PandasQueryEngine has been moved out of the experimental module in recent versions of LlamaIndex. It is now typically found in llama_index.agent.toolkits.pandas.
Realizando a mudança no código com a sugestão do Gemini,tambémnão funciona...
You are now encountering a ModuleNotFoundError: No module named 'llama_index.agent'. This error suggests that even the llama_index.agent module, where PandasQueryEngine is expected to be in recent versions, is not found.
This likely means that the core llama-index library is either not installed or an older version is installed that doesn't have the agent module in that location.
Entrei na documentação do LlamaIndex e achei a instrução para instalar o experimental
!pip install llama-index llama-index-experimental
Adicionei essa instalação antes e funcionou.
Aquela IA do Colab pode ter excessos de criatividade e indicar soluções baseadas em inverdades?