nvidia-nat-vanna 1.5.0a20260115__py3-none-any.whl
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.
Potentially problematic release.
This version of nvidia-nat-vanna might be problematic. Click here for more details.
- nat/meta/pypi.md +129 -0
- nat/plugins/vanna/__init__.py +14 -0
- nat/plugins/vanna/db_utils.py +296 -0
- nat/plugins/vanna/execute_db_query.py +237 -0
- nat/plugins/vanna/register.py +22 -0
- nat/plugins/vanna/text2sql.py +250 -0
- nat/plugins/vanna/training_db_schema.py +75 -0
- nat/plugins/vanna/vanna_utils.py +843 -0
- nvidia_nat_vanna-1.5.0a20260115.dist-info/METADATA +149 -0
- nvidia_nat_vanna-1.5.0a20260115.dist-info/RECORD +13 -0
- nvidia_nat_vanna-1.5.0a20260115.dist-info/WHEEL +5 -0
- nvidia_nat_vanna-1.5.0a20260115.dist-info/entry_points.txt +2 -0
- nvidia_nat_vanna-1.5.0a20260115.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nvidia-nat-vanna
|
|
3
|
+
Version: 1.5.0a20260115
|
|
4
|
+
Summary: Vanna-based Text-to-SQL integration for NeMo Agent Toolkit with Databricks support
|
|
5
|
+
Keywords: ai,agents,text2sql,vanna,sql,database
|
|
6
|
+
Classifier: Programming Language :: Python
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
10
|
+
Requires-Python: <3.14,>=3.11
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: databricks-sql-connector~=4.1.4
|
|
13
|
+
Requires-Dist: databricks-sqlalchemy~=2.0.8
|
|
14
|
+
Requires-Dist: langchain-core~=1.2.0
|
|
15
|
+
Requires-Dist: nvidia-nat[langchain]==v1.5.0a20260115
|
|
16
|
+
Requires-Dist: pandas~=2.0
|
|
17
|
+
Requires-Dist: pymilvus[model]~=2.6.0
|
|
18
|
+
Requires-Dist: sqlglot~=26.33.0
|
|
19
|
+
Requires-Dist: vanna[chromadb]~=2.0.1
|
|
20
|
+
|
|
21
|
+
<!--
|
|
22
|
+
SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
23
|
+
SPDX-License-Identifier: Apache-2.0
|
|
24
|
+
|
|
25
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
26
|
+
you may not use this file except in compliance with the License.
|
|
27
|
+
You may obtain a copy of the License at
|
|
28
|
+
|
|
29
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
30
|
+
|
|
31
|
+
Unless required by applicable law or agreed to in writing, software
|
|
32
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
33
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
+
See the License for the specific language governing permissions and
|
|
35
|
+
limitations under the License.
|
|
36
|
+
-->
|
|
37
|
+
|
|
38
|
+
# NVIDIA NeMo Agent Toolkit Vanna
|
|
39
|
+
|
|
40
|
+
Vanna-based Text-to-SQL integration for NeMo Agent toolkit.
|
|
41
|
+
|
|
42
|
+
## Overview
|
|
43
|
+
|
|
44
|
+
This package provides production-ready text-to-SQL capabilities using the Vanna framework with Databricks support.
|
|
45
|
+
|
|
46
|
+
## Features
|
|
47
|
+
|
|
48
|
+
- **AI-Powered SQL Generation**: Convert natural language to SQL using LLMs
|
|
49
|
+
- **Databricks Support**: Optimized for Databricks SQL warehouses
|
|
50
|
+
- **Vector-Based Similarity Search**: Milvus integration for few-shot learning
|
|
51
|
+
- **Streaming Support**: Real-time progress updates
|
|
52
|
+
- **Query Execution**: Optional database execution with formatted results
|
|
53
|
+
- **Highly Configurable**: Customizable prompts, examples, and connections
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
Install the package:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pip install nvidia-nat-vanna
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Create a workflow configuration:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
functions:
|
|
67
|
+
text2sql:
|
|
68
|
+
_type: text2sql
|
|
69
|
+
llm_name: my_llm
|
|
70
|
+
embedder_name: my_embedder
|
|
71
|
+
milvus_retriever: my_retriever
|
|
72
|
+
database_type: databricks
|
|
73
|
+
connection_url: "${CONNECTION_URL}"
|
|
74
|
+
execute_sql: false
|
|
75
|
+
|
|
76
|
+
execute_db_query:
|
|
77
|
+
_type: execute_db_query
|
|
78
|
+
database_type: databricks
|
|
79
|
+
connection_url: "${CONNECTION_URL}"
|
|
80
|
+
max_rows: 100
|
|
81
|
+
|
|
82
|
+
llms:
|
|
83
|
+
my_llm:
|
|
84
|
+
_type: nim
|
|
85
|
+
model_name: meta/llama-3.1-70b-instruct
|
|
86
|
+
api_key: "${NVIDIA_API_KEY}"
|
|
87
|
+
|
|
88
|
+
embedders:
|
|
89
|
+
my_embedder:
|
|
90
|
+
_type: nim
|
|
91
|
+
model_name: nvidia/llama-3.2-nv-embedqa-1b-v2
|
|
92
|
+
api_key: "${NVIDIA_API_KEY}"
|
|
93
|
+
|
|
94
|
+
retrievers:
|
|
95
|
+
my_retriever:
|
|
96
|
+
_type: milvus_retriever
|
|
97
|
+
uri: "${MILVUS_URI}"
|
|
98
|
+
connection_args:
|
|
99
|
+
user: "developer"
|
|
100
|
+
password: "${MILVUS_PASSWORD}"
|
|
101
|
+
db_name: "default"
|
|
102
|
+
embedding_model: my_embedder
|
|
103
|
+
content_field: text
|
|
104
|
+
use_async_client: true
|
|
105
|
+
|
|
106
|
+
workflow:
|
|
107
|
+
_type: rewoo_agent
|
|
108
|
+
tool_names: [text2sql, execute_db_query]
|
|
109
|
+
llm_name: my_llm
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Run the workflow:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
nat run --config config.yml --input "How many customers do we have?"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Components
|
|
119
|
+
|
|
120
|
+
### `text2sql` Function
|
|
121
|
+
|
|
122
|
+
Generates SQL queries from natural language using:
|
|
123
|
+
- Few-shot learning with similar examples
|
|
124
|
+
- DDL (schema) information
|
|
125
|
+
- Custom documentation
|
|
126
|
+
- LLM-powered query generation
|
|
127
|
+
|
|
128
|
+
### `execute_db_query` Function
|
|
129
|
+
|
|
130
|
+
Executes SQL queries and returns formatted results:
|
|
131
|
+
- Databricks SQL execution
|
|
132
|
+
- Result limiting and pagination
|
|
133
|
+
- Structured output format
|
|
134
|
+
- SQLAlchemy Object Relational Mapper (ORM)-based connection
|
|
135
|
+
|
|
136
|
+
## Use Cases
|
|
137
|
+
|
|
138
|
+
- **Business Intelligence**: Enable non-technical users to query data
|
|
139
|
+
- **Data Exploration**: Rapid prototyping and analysis
|
|
140
|
+
- **Conversational Analytics**: Multi-turn Q&A about your data
|
|
141
|
+
- **SQL Assistance**: Help analysts write complex queries
|
|
142
|
+
|
|
143
|
+
## Documentation
|
|
144
|
+
|
|
145
|
+
Full documentation: <https://docs.nvidia.com/nemo/agent-toolkit/latest/>
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
Part of NVIDIA NeMo Agent toolkit. See repository for license details.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
nat/meta/pypi.md,sha256=n_m6GJEgCvQ6KT0tRwk3QUeT6-15ettHsW_TmkxtdIY,3405
|
|
2
|
+
nat/plugins/vanna/__init__.py,sha256=hiEJ2ajB5zhZuZOUHAyHfTA9w9UNhygij7hp4yfA6QE,685
|
|
3
|
+
nat/plugins/vanna/db_utils.py,sha256=jYZBDqjNw8GkOFAWlAx2oxTPljSdJipwVRbJ7C6GPqo,9867
|
|
4
|
+
nat/plugins/vanna/execute_db_query.py,sha256=b0LURxOKBNDhqF-LzT5uRp-JeIfAWf9-IttnPXhcsRs,9435
|
|
5
|
+
nat/plugins/vanna/register.py,sha256=ntMAXpC2O70B-fh908o2EimXQbLrbalXa9abi0NCPPc,845
|
|
6
|
+
nat/plugins/vanna/text2sql.py,sha256=egE_2vvySr32EOuPZQsxJ8W7SDtcqSw42BYHwGng6OE,11188
|
|
7
|
+
nat/plugins/vanna/training_db_schema.py,sha256=RaMc48NI6bnksNA3dpY1M_KAluotsiz2HZ9gyCXtvFQ,3147
|
|
8
|
+
nat/plugins/vanna/vanna_utils.py,sha256=b4pYGiDYBu9_eeeZoGNoyswP7FhRafGM6CVntw99AXE,32996
|
|
9
|
+
nvidia_nat_vanna-1.5.0a20260115.dist-info/METADATA,sha256=x_9Vf9hkbn083dDq-dwatOOMbDOcMCAUtJeVJcja0bo,4198
|
|
10
|
+
nvidia_nat_vanna-1.5.0a20260115.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
nvidia_nat_vanna-1.5.0a20260115.dist-info/entry_points.txt,sha256=R-SYyO1XwbN43yqGE5jM4uGhvkJeUmCWIxSl_LIi_rw,56
|
|
12
|
+
nvidia_nat_vanna-1.5.0a20260115.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
|
13
|
+
nvidia_nat_vanna-1.5.0a20260115.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nat
|