112 lines
3.7 KiB
Python
112 lines
3.7 KiB
Python
function_description = [
|
|
{
|
|
"name": "run_bash",
|
|
"description": "Execute a Bash command on the local system",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {
|
|
"type": "string",
|
|
"description": "The string to execute in Bash"
|
|
},
|
|
"reasoning": {
|
|
"type": "string",
|
|
"description": "Why you chose to run this command"
|
|
}
|
|
},
|
|
"required": ["command", "reasoning"]
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "end_my_response",
|
|
"description": "Call this when you require input from the user or are ready for their response. This allows you to send multiple messages and then a single `end_my_response` when you are finished. An `end_my_response` should always be preceded by a message.",
|
|
},
|
|
|
|
{
|
|
"name": "end_chat",
|
|
"description": "Close the chat connection with the user. The assistant is allowed to close the connection at any point if it desires to.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reasoning": {
|
|
"type": "string",
|
|
"description": "Why you chose to run this function"
|
|
}
|
|
},
|
|
"required": ["reasoning"]
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "search_google",
|
|
"description": "Preform a Google search query",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"query": {
|
|
"type": "string",
|
|
"description": "The query string"
|
|
},
|
|
"reasoning": {
|
|
"type": "string",
|
|
"description": "Why you chose to run this command"
|
|
}
|
|
},
|
|
"required": ["query", "reasoning"]
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "search_google_maps",
|
|
"description": "Preform a Google Maps search query",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"query": {
|
|
"type": "string",
|
|
"description": "The query string"
|
|
},
|
|
"latitude": {
|
|
"type": "number",
|
|
"description": "The latitude of where you want your query to be applied"
|
|
},
|
|
"longitude": {
|
|
"type": "number",
|
|
"description": "The longitude of where you want your query to be applied"
|
|
},
|
|
"zoom": {
|
|
"type": "number",
|
|
"description": "The zoom level. Optional but recommended for higher precision. Ranges from `3z` (map completely zoomed out) to `21z` (map completely zoomed in)"
|
|
},
|
|
"reasoning": {
|
|
"type": "string",
|
|
"description": "Why you chose to run this command"
|
|
}
|
|
},
|
|
"required": ["query", "latitude", "longitude", "reasoning"]
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "search_google_news",
|
|
"description": "Preform a Google News search query",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"query": {
|
|
"type": "string",
|
|
"description": "The query string"
|
|
},
|
|
"reasoning": {
|
|
"type": "string",
|
|
"description": "Why you chose to run this command"
|
|
}
|
|
},
|
|
"required": ["query", "reasoning"]
|
|
}
|
|
},
|
|
]
|
|
|
|
VALID_FUNCS = [x['name'] for x in function_description]
|