themissingCRAM commited on
Commit
b7b7b9c
·
1 Parent(s): cee3a9c
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -28,7 +28,7 @@ def dummy():
28
 
29
 
30
  @tool
31
- def sql_engine(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,13 +97,13 @@ if __name__ == "__main__":
97
  )
98
 
99
  agent = CodeAgent(
100
- tools=[sql_engine],
101
  # system_prompt="""
102
  # You are a text to sql converter
103
  # """,
104
  model=model,
105
- max_steps=1,
106
- verbosity_level=1,
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