-
Notifications
You must be signed in to change notification settings - Fork 3k
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 and fix bug. AuthorRole instead of string literals. #6391
Python: Refactoring and fix bug. AuthorRole instead of string literals. #6391
Conversation
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
Hi @stefan521, could you resolve the one file conflict, please? Thanks! |
# Conflicts: # python/semantic_kernel/connectors/ai/ollama/services/ollama_chat_completion.py
Python 3.10 Test Coverage Report •
Python 3.10 Unit Test Overview
|
Hi @moonbox3 , thanks for reviewing! I've solved the conflicts. |
python/tests/unit/contents/test_streaming_chat_message_content.py
Outdated
Show resolved
Hide resolved
Head branch was pushed to by a user without write access
@stefan521 sorry, I think I wasn't clear enough, I like that most tests run with AuthorRole... but there need to be some with a str (one per type) so that we know both ways of creating them work! |
@eavanvalkenburg got it! I’ll update the PR tonight. Thanks for reviewing! |
Motivation and Context
There's an enum called
AuthorRole
. I replaced string literals with the enum values. PyCharm highlights this in some cases: Expected type 'AuthorRole', got 'str' insteadI also fixed a bug in function_invocation_filters_stream.py where the argument name was wrong.
author="assistant"
instead ofrole="assistant"
Description
Contribution Checklist