-
Notifications
You must be signed in to change notification settings - Fork 895
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pf tool] Support tool init with advance info, such as icon, tags and…
… category (#838) # Description 70e65be Support tool init with advance info, such as icon, tags and category ``` pf tool init --package package_tool --tool tool_name --set icon=<icon-path> category=<category> tags="{'key': 'value'}" ``` tool meta: ``` "test_cli_package.cli_tool.cli_tool": { "name": "cli_tool", "type": "python", "inputs": { "connection": { "type": [ "CustomConnection" ] }, "input_text": { "type": [ "string" ] } }, "description": "This is cli_tool tool", "module": "test_cli_package.cli_tool", "function": "cli_tool", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABcElEQVR4nJVSsUoDQRB9e+dd4p0xESHaHBEsJCEKsbf0C+z0B/wHv8PC3sIvEMFWRAJKFCwsDBpIyEbwyJlj9/bcHQtPiBgMmfLx3sybmceICLOUNRP7R0AErQ19EsxUAZtoiYgYYxMRC4B5fVLHRxcPh8/hZdbmN3scsQCYt256fnr7ctKN7lSSjuIoiqJxtjGm3++P7WBZcHKOPWc0Hu/bzWaz1+sppZRSWus0TUejUavViuMYwBwA2y/Mb9RXl1aLXiDEhxCSc95ut6WUruuWSqXBYMA5r9frvu9bAG6WGzu7Z3tOqcEsAZYmUghRq9WCICgWi0mSVCqVarVaLpczS2FirvtKvV9BvOa8Rd/ztNadTkdKGcfxcDjknGutwzDMLBkABJgUMNuba9ArKjVSSt/3oyjK5/NE5LqubduZIPDY/rrjLhxgYcvLO4Dj/dynUChMfxzR98Q/P2YsExBgCDY0GJuarsnR+KdmTusX7Qa9XJS8qLcAAAAASUVORK5CYII=", "category": "test_category", "tags": { "key": "value" }, "package": "test-cli-package", "package_version": "0.0.1" } } ``` Folder structure ``` TOOL_WITH_EXTRA_INFO │ MANIFEST.in │ README.md │ setup.py │ ├───icon │ logo.jpg │ └───tool_with_extra_info func_name.py utils.py __init__.py ``` Please add an informative description that covers that changes made by the pull request and link all relevant issues. # All Promptflow Contribution checklist: - [ ] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [ ] Title of the pull request is clear and informative. - [ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [ ] Pull request includes test coverage for the included changes.
- Loading branch information
1 parent
1a9d01a
commit 50a164e
Showing
10 changed files
with
189 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/promptflow/promptflow/_cli/data/package_tool/MANIFEST.in.jinja2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include {{ package_name }}/icons |
15 changes: 14 additions & 1 deletion
15
src/promptflow/promptflow/_cli/data/package_tool/tool.py.jinja2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.