themissingCRAM
commited on
Commit
·
687b793
1
Parent(s):
b1f7d5c
blocks experiment
Browse files
app.py
CHANGED
|
@@ -39,7 +39,7 @@ def dummy():
|
|
| 39 |
|
| 40 |
|
| 41 |
@tool
|
| 42 |
-
def sql_engine_tool(query: str
|
| 43 |
"""
|
| 44 |
Allows you to perform SQL queries on the table. Returns a string representation of the result.
|
| 45 |
The table is named 'receipts'. Its description is as follows:
|
|
@@ -51,7 +51,6 @@ def sql_engine_tool(query: str, engine: Engine) -> str:
|
|
| 51 |
|
| 52 |
Args:
|
| 53 |
query: The query to perform. This should be correct SQL.
|
| 54 |
-
engine: Use the given engine in the additional_args
|
| 55 |
"""
|
| 56 |
output = ""
|
| 57 |
print("debug sql_engine_tool")
|
|
@@ -145,7 +144,7 @@ if __name__ == "__main__":
|
|
| 145 |
print("message:", message)
|
| 146 |
print("chat_history", chat_history)
|
| 147 |
chat_history.append({"role": "user", "content": message})
|
| 148 |
-
x = stream_to_gradio(agent, message
|
| 149 |
print(type(x))
|
| 150 |
print("\n\n\n", x, "\n\n\n")
|
| 151 |
return "", x
|
|
|
|
| 39 |
|
| 40 |
|
| 41 |
@tool
|
| 42 |
+
def sql_engine_tool(query: str) -> str:
|
| 43 |
"""
|
| 44 |
Allows you to perform SQL queries on the table. Returns a string representation of the result.
|
| 45 |
The table is named 'receipts'. Its description is as follows:
|
|
|
|
| 51 |
|
| 52 |
Args:
|
| 53 |
query: The query to perform. This should be correct SQL.
|
|
|
|
| 54 |
"""
|
| 55 |
output = ""
|
| 56 |
print("debug sql_engine_tool")
|
|
|
|
| 144 |
print("message:", message)
|
| 145 |
print("chat_history", chat_history)
|
| 146 |
chat_history.append({"role": "user", "content": message})
|
| 147 |
+
x = stream_to_gradio(agent, message)
|
| 148 |
print(type(x))
|
| 149 |
print("\n\n\n", x, "\n\n\n")
|
| 150 |
return "", x
|