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

This commit is contained in:
sigoden authored and GitHub committed 2024-05-19 22:43:49 +08:00
1 parent be279dcd32
commit 03c4b69822
15 files changed
+543 -92

No files matched your search

+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