summaryrefslogtreecommitdiff
path: root/src/agents/03-logs/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/agents/03-logs/tools.py')
-rw-r--r--src/agents/03-logs/tools.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/agents/03-logs/tools.py b/src/agents/03-logs/tools.py
new file mode 100644
index 0000000..84b44d4
--- /dev/null
+++ b/src/agents/03-logs/tools.py
@@ -0,0 +1,33 @@
+# tools.py
+import json
+
+def check_username(username):
+ """
+ Check if a username is available.
+ :param username: The username to check.
+ :return: True if the username is available, False otherwise.
+ """
+ # In a real application, this would check a database or an API.
+ # For this example, we'll just pretend all usernames are available.
+ return True
+
+tools = [
+ {
+ "type": "function",
+ "function": {
+ "name": "check_username",
+ "description": "Check if a username is available.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "username": {"type": "string", "description": "The username to check."},
+ },
+ "required": ["username"],
+ },
+ }
+ }
+]
+
+available_functions = {
+ "check_username": check_username
+}