feat: supports functions in bash/js/python/ruby (#6)
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user