-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Python: Add UserSecurityContext to SK python #11752
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
base: main
Are you sure you want to change the base?
Conversation
…nAIPromptExecutionSettings.cs Co-authored-by: Mark Wallace <[email protected]>
…ore.ChatCompletion.cs Co-authored-by: Roger Barreto <[email protected]>
Python Unit Test Overview
|
@@ -159,6 +159,7 @@ class ExtraBody(KernelBaseModel): | |||
data_sources: list[DataSource] | None = None | |||
input_language: Annotated[str | None, Field(serialization_alias="inputLanguage")] = None | |||
output_language: Annotated[str | None, Field(serialization_alias="outputLanguage")] = None | |||
user_security_context: Annotated[str | None, Field()] = None |
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.
If we don't need any special serialization alias handling for this attribute, we can remove the need for the empty Field()
.
user_security_context: Annotated[str | None, Field()] = None | |
user_security_context: str | None = None |
@@ -159,6 +159,7 @@ class ExtraBody(KernelBaseModel): | |||
data_sources: list[DataSource] | None = None | |||
input_language: Annotated[str | None, Field(serialization_alias="inputLanguage")] = None | |||
output_language: Annotated[str | None, Field(serialization_alias="outputLanguage")] = None | |||
user_security_context: Annotated[str | None, Field()] = None |
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.
This should prob be a dict[str, Any], see https://learn.microsoft.com/en-us/azure/ai-services/openai/reference-preview#usersecuritycontext
Motivation and Context
Expose UserSecurityContext in SK python via ExtraBody as this is available in Azure only.
https://learn.microsoft.com/en-us/dotnet/api/azure.ai.openai.usersecuritycontext
Description
Contribution Checklist