llama-index-tools-python-file 0.1.2__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {llama_index_tools_python_file-0.1.2 → llama_index_tools_python_file-0.1.3}/PKG-INFO +5 -4
- {llama_index_tools_python_file-0.1.2 → llama_index_tools_python_file-0.1.3}/README.md +2 -2
- {llama_index_tools_python_file-0.1.2 → llama_index_tools_python_file-0.1.3}/llama_index/tools/python_file/base.py +1 -1
- {llama_index_tools_python_file-0.1.2 → llama_index_tools_python_file-0.1.3}/pyproject.toml +6 -3
- llama_index_tools_python_file-0.1.2/llama_index/tools/python_file/BUILD +0 -1
- {llama_index_tools_python_file-0.1.2 → llama_index_tools_python_file-0.1.3}/llama_index/tools/python_file/__init__.py +0 -0
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: llama-index-tools-python-file
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: llama-index tools python_file integration
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Your Name
|
|
7
7
|
Author-email: you@example.com
|
|
8
8
|
Maintainer: ajhofmann
|
|
9
|
-
Requires-Python: >=3.8.1,<
|
|
9
|
+
Requires-Python: >=3.8.1,<4.0
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.9
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
16
|
Requires-Dist: llama-index-core (>=0.10.1,<0.11.0)
|
|
16
17
|
Description-Content-Type: text/markdown
|
|
17
18
|
|
|
@@ -35,14 +36,14 @@ agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())
|
|
|
35
36
|
|
|
36
37
|
agent.chat(
|
|
37
38
|
"""Load the eig, transpose and solve functions from the python file,
|
|
38
|
-
and then write a function
|
|
39
|
+
and then write a function definition using only builtin python types (List, float, Tuple)
|
|
39
40
|
with a short 5-10 line doc string tool prompts for the functions that only has a small description and arguments
|
|
40
41
|
"""
|
|
41
42
|
)
|
|
42
43
|
```
|
|
43
44
|
|
|
44
45
|
`function_definitions`: Get all of the function definitions from the Python file
|
|
45
|
-
`get_function`: Get a
|
|
46
|
+
`get_function`: Get a specific function definition from the Python file
|
|
46
47
|
`get_functions`: Get a list of functions from the python file
|
|
47
48
|
|
|
48
49
|
This loader is designed to be used as a way to load data as a Tool in a Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.
|
|
@@ -18,14 +18,14 @@ agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())
|
|
|
18
18
|
|
|
19
19
|
agent.chat(
|
|
20
20
|
"""Load the eig, transpose and solve functions from the python file,
|
|
21
|
-
and then write a function
|
|
21
|
+
and then write a function definition using only builtin python types (List, float, Tuple)
|
|
22
22
|
with a short 5-10 line doc string tool prompts for the functions that only has a small description and arguments
|
|
23
23
|
"""
|
|
24
24
|
)
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
`function_definitions`: Get all of the function definitions from the Python file
|
|
28
|
-
`get_function`: Get a
|
|
28
|
+
`get_function`: Get a specific function definition from the Python file
|
|
29
29
|
`get_functions`: Get a list of functions from the python file
|
|
30
30
|
|
|
31
31
|
This loader is designed to be used as a way to load data as a Tool in a Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.
|
|
@@ -13,7 +13,7 @@ class PythonFileToolSpec(BaseToolSpec):
|
|
|
13
13
|
|
|
14
14
|
def function_definitions(self, external: Optional[bool] = True) -> str:
|
|
15
15
|
"""
|
|
16
|
-
Use this function to get the name and arguments of all function
|
|
16
|
+
Use this function to get the name and arguments of all function definitions in the python file.
|
|
17
17
|
|
|
18
18
|
Args:
|
|
19
19
|
external (Optional[bool]): Defaults to true. If false, this function will also return functions that start with _
|
|
@@ -8,10 +8,12 @@ check-hidden = true
|
|
|
8
8
|
skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
|
|
9
9
|
|
|
10
10
|
[tool.llamahub]
|
|
11
|
-
classes = ["PythonFileToolSpec"]
|
|
12
11
|
contains_example = false
|
|
13
12
|
import_path = "llama_index.tools.python_file"
|
|
14
13
|
|
|
14
|
+
[tool.llamahub.class_authors]
|
|
15
|
+
PythonFileToolSpec = "ajhofmann"
|
|
16
|
+
|
|
15
17
|
[tool.mypy]
|
|
16
18
|
disallow_untyped_defs = true
|
|
17
19
|
exclude = ["_static", "build", "examples", "notebooks", "venv"]
|
|
@@ -21,14 +23,15 @@ python_version = "3.8"
|
|
|
21
23
|
[tool.poetry]
|
|
22
24
|
authors = ["Your Name <you@example.com>"]
|
|
23
25
|
description = "llama-index tools python_file integration"
|
|
26
|
+
exclude = ["**/BUILD"]
|
|
24
27
|
license = "MIT"
|
|
25
28
|
maintainers = ["ajhofmann"]
|
|
26
29
|
name = "llama-index-tools-python-file"
|
|
27
30
|
readme = "README.md"
|
|
28
|
-
version = "0.1.
|
|
31
|
+
version = "0.1.3"
|
|
29
32
|
|
|
30
33
|
[tool.poetry.dependencies]
|
|
31
|
-
python = ">=3.8.1,<
|
|
34
|
+
python = ">=3.8.1,<4.0"
|
|
32
35
|
llama-index-core = "^0.10.1"
|
|
33
36
|
|
|
34
37
|
[tool.poetry.group.dev.dependencies]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
python_sources()
|