-
Notifications
You must be signed in to change notification settings - Fork 4k
Python: Refactoring. Use get_function and get_plugin. #6382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: Refactoring. Use get_function and get_plugin. #6382
Conversation
@microsoft-github-policy-service agree
…On Thu, May 23, 2024 at 8:43 PM microsoft-github-policy-service[bot] < ***@***.***> wrote:
@stefan521 <https://github.com/stefan521> the command you issued was
incorrect. Please try again.
Examples are:
@microsoft-github-policy-service agree
and
@microsoft-github-policy-service agree company="your company"
—
Reply to this email directly, view it on GitHub
<#6382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6PSU3N2GYDTN6ZMGDCVZTZDZBELAVCNFSM6AAAAABIGI3BPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXHA4TSMBTGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@microsoft-github-policy-service agree
…On Thu, May 23, 2024 at 8:54 PM microsoft-github-policy-service[bot] < ***@***.***> wrote:
@stefan521 <https://github.com/stefan521> the command you issued was
incorrect. Please try again.
Examples are:
@microsoft-github-policy-service agree
and
@microsoft-github-policy-service agree company="your company"
—
Reply to this email directly, view it on GitHub
<#6382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6PSU74QPOHQWSZZ654CT3ZDZCQ3AVCNFSM6AAAAABIGI3BPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXHEYTMMRYGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. My small nit is to use named args to make it more clear when reading:
function = kernel.get_function(plugin_name=<name>, function_name=<name>)
May just be my style preference. :)
That's a good shout. I've named them. |
@stefan521 please run a |
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Refactoring some of the code following [this advice](microsoft#6371 (comment)) from the maintainers. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Look up kernel functions and plugins with the `get_function` and `get_plugin` method. Removed the unused `DEFAULT_CHAT_SYSTEM_PROMPT` ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
Motivation and Context
Refactoring some of the code following this advice from the maintainers.
Description
Look up kernel functions and plugins with the
get_function
andget_plugin
method. Removed the unusedDEFAULT_CHAT_SYSTEM_PROMPT
Contribution Checklist