feat: adjust project structure (#16)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
def declarate():
|
||||
return {
|
||||
"name": "may_execute_py_code",
|
||||
"description": "Runs the python code.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "Python code to execute, such as `print(\"hello world\")`"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def execute(data):
|
||||
exec(data["code"])
|
||||
Reference in New Issue
Block a user