feat: supports functions in bash/js/python/ruby (#6)

This commit is contained in:
sigoden
2024-05-19 22:43:49 +08:00
committed by GitHub
parent be279dcd32
commit 03c4b69822
15 changed files with 543 additions and 92 deletions
+22
View File
@@ -0,0 +1,22 @@
def declarate
{
"name": "may_execute_rb_code",
"description": "Runs the ruby code.",
"parameters": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Ruby code to execute, such as `puts \"hello world\"`"
}
},
"required": [
"code"
]
}
}
end
def execute(data)
eval(data["code"])
end