-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitAI.py
More file actions
97 lines (91 loc) · 1.59 KB
/
commitAI.py
File metadata and controls
97 lines (91 loc) · 1.59 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
"""
Constants used in the pandasai package.
It includes Start & End Code tags, Whitelisted Python Packages and
While List Builtin Methods.
"""
# Default directory to store chart if user doesn't provide any
DEFAULT_CHART_DIRECTORY = "exports/charts"
# Default permissions for files and directories
DEFAULT_FILE_PERMISSIONS = 0o755
# Token needed to invalidate the cache after breaking changes
CACHE_TOKEN = "pandasai1"
# List of Python builtin libraries that are added to the environment by default.
WHITELISTED_BUILTINS = [
"abs",
"all",
"any",
"ascii",
"bin",
"bool",
"bytearray",
"bytes",
"callable",
"chr",
"classmethod",
"complex",
"delattr",
"dict",
"dir",
"divmod",
"enumerate",
"filter",
"float",
"format",
"frozenset",
"getattr",
"hasattr",
"hash",
"help",
"hex",
"id",
"int",
"isinstance",
"issubclass",
"iter",
"len",
"list",
"locals",
"map",
"max",
"memoryview",
"min",
"next",
"object",
"oct",
"ord",
"pow",
"print",
"property",
"range",
"repr",
"reversed",
"round",
"set",
"setattr",
"slice",
"sorted",
"staticmethod",
"str",
"sum",
"super",
"tuple",
"type",
"vars",
"zip",
]
# List of Python packages that are whitelisted for import in generated code
WHITELISTED_LIBRARIES = [
"sklearn",
"statsmodels",
"seaborn",
"plotly",
"ggplot",
"matplotlib",
"numpy",
"datetime",
"json",
"io",
"base64",
"scipy",
"streamlit",
]