Spaces:
Running
Running
Create task_tools.py
Browse files- utils/task_tools.py +22 -0
utils/task_tools.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
task_tool = [{
|
| 2 |
+
"type": "function",
|
| 3 |
+
"name": "create_tasks",
|
| 4 |
+
"description": "Create a list of tasks to be completed using tools to better answer the users query.Eg: If the user asks to research on a particular topic , create a personalised list of tasks like ['search web on topic', 'crawl websites on topic', 'search images on topic', 'run code to create graphs on topic','give detailed answer']",
|
| 5 |
+
"parameters": {
|
| 6 |
+
"type": "object",
|
| 7 |
+
"properties": {
|
| 8 |
+
"userid": {
|
| 9 |
+
"type": "string",
|
| 10 |
+
"description": "userid of the user who is requesting the tasks. This is used to track the tasks and their completion status.Set as 1 if not available.",
|
| 11 |
+
},
|
| 12 |
+
"task_list": {
|
| 13 |
+
"type": "list",
|
| 14 |
+
"description": "A list of tasks to be completed.",
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"required": [
|
| 18 |
+
"userid","task_list"
|
| 19 |
+
],
|
| 20 |
+
"additionalProperties": False
|
| 21 |
+
}
|
| 22 |
+
}]
|