e768098d0e
tools_continuous_delivery / Private PyPI non-main branch release (push) Has been skipped
tools_continuous_delivery / Private PyPI main branch release (push) Failing after 2m42s
Publish Promptflow Doc / Build (push) Has been cancelled
Publish Promptflow Doc / Deploy (push) Has been cancelled
Flake8 Lint / flake8 (push) Has been cancelled
Spell check CI / Spell_Check (push) Has been cancelled
60 lines
2.2 KiB
Python
60 lines
2.2 KiB
Python
from promptflow.core import tool
|
|
|
|
|
|
@tool
|
|
def functions_format() -> list:
|
|
functions = [
|
|
{
|
|
"name": "search",
|
|
"description": """The action will search this entity name on Wikipedia and returns the first {count}
|
|
sentences if it exists. If not, it will return some related entities to search next.""",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"entity": {
|
|
"type": "string",
|
|
"description": "Entity name which is used for Wikipedia search.",
|
|
},
|
|
"count": {
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "Returned sentences count if entity name exists Wikipedia.",
|
|
},
|
|
},
|
|
"required": ["entity"],
|
|
},
|
|
},
|
|
{
|
|
"name": "python",
|
|
"description": """A Python shell. Use this to execute python commands. Input should be a valid python
|
|
command and you should print result with `print(...)` to see the output.""",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {
|
|
"type": "string",
|
|
"description": "The command you want to execute in python",
|
|
}
|
|
},
|
|
"required": ["command"]
|
|
},
|
|
},
|
|
{
|
|
"name": "finish",
|
|
"description": """use this to signal that you have finished all your goals and remember show your
|
|
results""",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"response": {
|
|
"type": "string",
|
|
"description": "final response to let people know you have finished your goals and remember "
|
|
"show your results",
|
|
},
|
|
},
|
|
"required": ["response"],
|
|
},
|
|
},
|
|
]
|
|
return functions
|