-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
pandas_query_engine.py
33 lines (23 loc) · 1.08 KB
/
pandas_query_engine.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""Default query for PandasIndex.
WARNING: This tool provides the LLM access to the `eval` function.
Arbitrary code execution is possible on the machine running this tool.
This tool is not recommended to be used in a production setting, and would
require heavy sandboxing or virtual machines.
DEPRECATED: Use `PandasQueryEngine` from `llama-index-experimental` instead.
"""
from typing import Any
class PandasQueryEngine:
"""Pandas query engine.
DEPRECATED: Use `PandasQueryEngine` from `llama-index-experimental` instead.
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
raise DeprecationWarning(
"PandasQueryEngine has been moved to `llama-index-experimental`.\n"
"`pip install llama-index-experimental`\n"
"`from llama_index.experimental.query_engine import PandasQueryEngine`\n"
"Note that the PandasQueryEngine allows for arbitrary code execution, \n"
"and should be used in a secure environment."
)
# legacy
NLPandasQueryEngine = PandasQueryEngine
GPTNLPandasQueryEngine = PandasQueryEngine