Spaces:
Sleeping
Sleeping
fix docstring
Browse files
app.py
CHANGED
@@ -64,13 +64,14 @@ conn.commit()
|
|
64 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
65 |
@tool
|
66 |
def get_employee_job_title(first_name:str, last_name:str)-> str: #it's import to specify the return type
|
67 |
-
conn = sqlite3.connect('employee_database.db')
|
68 |
-
cursor = conn.cursor()
|
69 |
"""A tool that allows to do a sqlite sql query based on first_name and last_name
|
70 |
Args:
|
71 |
first_name: the first argument
|
72 |
last_name: the second argument
|
73 |
"""
|
|
|
|
|
|
|
74 |
return cursor.execute(f"SELECT job_title FROM employees WHERE first_name='{first_name}' AND last_name='{last_name}'")
|
75 |
rows = cursor.fetchall()[0][0]
|
76 |
|
|
|
64 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
65 |
@tool
|
66 |
def get_employee_job_title(first_name:str, last_name:str)-> str: #it's import to specify the return type
|
|
|
|
|
67 |
"""A tool that allows to do a sqlite sql query based on first_name and last_name
|
68 |
Args:
|
69 |
first_name: the first argument
|
70 |
last_name: the second argument
|
71 |
"""
|
72 |
+
conn = sqlite3.connect('employee_database.db')
|
73 |
+
cursor = conn.cursor()
|
74 |
+
|
75 |
return cursor.execute(f"SELECT job_title FROM employees WHERE first_name='{first_name}' AND last_name='{last_name}'")
|
76 |
rows = cursor.fetchall()[0][0]
|
77 |
|