-
Notifications
You must be signed in to change notification settings - Fork 940
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support AssistantDefinition contract in executor (#1657)
# Description This pull request supported `AssistantDefinition` contract in executor. The most important changes include introducing a new `AssistantDefinition` class and modifying methods to handle conversions and placeholders. Main interface changes: * [`src/promptflow/promptflow/contracts/types.py`](diffhunk://#diff-3cac7adc96dc2969cfdb50d8b19e5fdedbb4d38bad5a7821405df91bd02e6078R32-R60): Added a new `AssistantDefinition` class. * [`src/promptflow/promptflow/executor/_tool_resolver.py`](diffhunk://#diff-714d8202b40acb4053e3f9b366ee4972b32f98afc8a2efe8a1750842f1facc65R98-R112): Added a new method `_convert_to_assistant_definition` and made changes to handle the conversion of values to assistant definitions. * [`src/promptflow/promptflow/executor/_assistant_tool_invoker.py`](diffhunk://#diff-a9ca3b4ac0f9cc1667221699844a2528d92d4e226464b7e862cc0707e4baf101L27-R33): Added a new `setup` method to the `AssistantToolInvoker` class. * [`src/promptflow/promptflow/contracts/tool.py`](diffhunk://#diff-96d10cc01c636338eedcf0287bd0a5ab57c9e7e8d8fac4619aaa51e5d36de9abL14-R14): Added support for the `AssistantDefinition` class as an input type in the `tool` decorator. # All Promptflow Contribution checklist: - [x] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [x] **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 - [x] Title of the pull request is clear and informative. - [x] 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 - [x] Pull request includes test coverage for the included changes. --------- Co-authored-by: Lina Tang <[email protected]>
- Loading branch information
Showing
13 changed files
with
229 additions
and
38 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
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
Oops, something went wrong.