themissingCRAM
commited on
Commit
·
b7b7b9c
1
Parent(s):
cee3a9c
tool
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ def dummy():
|
|
| 28 |
|
| 29 |
|
| 30 |
@tool
|
| 31 |
-
def
|
| 32 |
"""
|
| 33 |
Allows you to perform SQL queries on the table. Returns a string representation of the result.
|
| 34 |
The table is named 'receipts'. Its description is as follows:
|
|
@@ -97,13 +97,13 @@ if __name__ == "__main__":
|
|
| 97 |
)
|
| 98 |
|
| 99 |
agent = CodeAgent(
|
| 100 |
-
tools=[
|
| 101 |
# system_prompt="""
|
| 102 |
# You are a text to sql converter
|
| 103 |
# """,
|
| 104 |
model=model,
|
| 105 |
-
max_steps=
|
| 106 |
-
verbosity_level=
|
| 107 |
)
|
| 108 |
GradioUI(agent).launch()
|
| 109 |
-
# What is the average each customer paid?
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
@tool
|
| 31 |
+
def sql_engine_tool(query: str) -> str:
|
| 32 |
"""
|
| 33 |
Allows you to perform SQL queries on the table. Returns a string representation of the result.
|
| 34 |
The table is named 'receipts'. Its description is as follows:
|
|
|
|
| 97 |
)
|
| 98 |
|
| 99 |
agent = CodeAgent(
|
| 100 |
+
tools=[sql_engine_tool],
|
| 101 |
# system_prompt="""
|
| 102 |
# You are a text to sql converter
|
| 103 |
# """,
|
| 104 |
model=model,
|
| 105 |
+
max_steps=3,
|
| 106 |
+
verbosity_level=2,
|
| 107 |
)
|
| 108 |
GradioUI(agent).launch()
|
| 109 |
+
# What is the average each customer paid? Create a sql statement and invoke your sql_engine tool
|