themissingCRAM
commited on
Commit
·
7fdbbb2
1
Parent(s):
8bbbb33
debug
Browse files
app.py
CHANGED
@@ -47,10 +47,11 @@ def sql_engine_tool(
|
|
47 |
|
48 |
"""
|
49 |
output = ""
|
|
|
50 |
print(engine)
|
51 |
with engine.connect() as con:
|
52 |
-
print("debug sql_engine_tool")
|
53 |
print(con.connection)
|
|
|
54 |
rows = con.execute(text(query))
|
55 |
for row in rows:
|
56 |
output += "\n" + str(row)
|
@@ -100,12 +101,12 @@ def init_db(engine):
|
|
100 |
print("init_db debug")
|
101 |
print(engine)
|
102 |
print()
|
103 |
-
return engine
|
104 |
|
105 |
|
106 |
if __name__ == "__main__":
|
107 |
engine = create_engine("sqlite:///:memory:")
|
108 |
-
engine = init_db(engine)
|
109 |
model = HfApiModel(
|
110 |
model_id="meta-llama/Meta-Llama-3.1-8B-Instruct",
|
111 |
token=os.getenv("my_first_agents_hf_tokens"),
|
|
|
47 |
|
48 |
"""
|
49 |
output = ""
|
50 |
+
print("debug sql_engine_tool")
|
51 |
print(engine)
|
52 |
with engine.connect() as con:
|
|
|
53 |
print(con.connection)
|
54 |
+
print(metadata_objects.tables.keys())
|
55 |
rows = con.execute(text(query))
|
56 |
for row in rows:
|
57 |
output += "\n" + str(row)
|
|
|
101 |
print("init_db debug")
|
102 |
print(engine)
|
103 |
print()
|
104 |
+
return engine, metadata_obj
|
105 |
|
106 |
|
107 |
if __name__ == "__main__":
|
108 |
engine = create_engine("sqlite:///:memory:")
|
109 |
+
engine, metadata_objects = init_db(engine)
|
110 |
model = HfApiModel(
|
111 |
model_id="meta-llama/Meta-Llama-3.1-8B-Instruct",
|
112 |
token=os.getenv("my_first_agents_hf_tokens"),
|