Skip to content
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

Merged
merged 4 commits into from
May 24, 2024

Conversation

stefan521
Copy link
Contributor

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 and get_plugin method. Removed the unused DEFAULT_CHAT_SYSTEM_PROMPT

Contribution Checklist

@stefan521 stefan521 requested a review from a team as a code owner May 23, 2024 19:39
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label May 23, 2024
@github-actions github-actions bot changed the title Refactoring. Use get_function and get_plugin. Python: Refactoring. Use get_function and get_plugin. May 23, 2024
@stefan521
Copy link
Contributor Author

stefan521 commented May 23, 2024 via email

@stefan521
Copy link
Contributor Author

stefan521 commented May 23, 2024 via email

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented May 23, 2024

Py3.10 Test Coverage

Python 3.10 Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL607887086% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python 3.10 Unit Test Overview

Tests Skipped Failures Errors Time
1374 1 💤 0 ❌ 0 🔥 13.682s ⏱️

Copy link
Contributor

@moonbox3 moonbox3 left a 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. :)

@stefan521
Copy link
Contributor Author

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.

@moonbox3
Copy link
Contributor

@stefan521 please run a Black format in the python directory to fix the lint issues.

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue May 24, 2024
Merged via the queue into microsoft:main with commit a9d7d5d May 24, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants