-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[translation] support translation kwargs for single translation overload #19851
Conversation
/azp run python - translation - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
:keyword str category_id: Category / custom model ID for using custom translation. | ||
:keyword glossaries: Glossaries to apply to translation. | ||
:paramtype glossaries: list[~azure.ai.translation.document.TranslationGlossary] | ||
:keyword str source_storage_source: Source storage source. Default value: "AzureBlob". |
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.
Slightly weird how you have "Default value is "AzureBlob". Only "AzureBlob" supported"
I think for now you can just have the "Only AzureBlob supported" for now, and once more values get added, switch it to "Default value is AzureBlob"
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.
curious, why is Python exposing this property if the user can't set other values right now?
in .NET we decided to hide it, and whenever there are other options we will expose it.
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.
I was on the fence about it and Johan didn't have a preference for exposing it. Seeing as .NET is hiding it, I will hide as well. Thanks!
prefix = kwargs.pop("prefix", None) | ||
suffix = kwargs.pop("suffix", None) | ||
storage_type = kwargs.pop("storage_type", None) | ||
source_storage_source = kwargs.pop("source_storage_source", 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.
just to make sure: are you getting the "AzureBlob" default from the generated code / service, and that's why you can default to None here?
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.
yes service defaults to AzureBlob
:keyword str category_id: Category / custom model ID for using custom translation. | ||
:keyword glossaries: Glossaries to apply to translation. | ||
:paramtype glossaries: list[~azure.ai.translation.document.TranslationGlossary] | ||
:keyword str source_storage_source: Source storage source. Default value: "AzureBlob". |
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.
curious, why is Python exposing this property if the user can't set other values right now?
in .NET we decided to hide it, and whenever there are other options we will expose it.
Resolves #19798
https://apiview.dev/Assemblies/Review/019355482c6245a5a404eef64740da1e?diffRevisionId=39de9ee01595481abdf9749b09966197&doc=False&diffOnly=True