-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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] consider simplifying input to translation #17916
Comments
@kristapratico so for the 1st option, it should be something like this and for the 2nd option |
@mohamedshabanofficial These are just ideas... nothing concrete yet. For the first option - might be easiest to look at this example: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_metrics_advisor_client.py#L441 L441 defines the method that the user will call. For typing, we define "overloads" that show the different sets of required params on L391 and L419. In the method we do client side validation to ensure the correct subset of required parameters are passed for either "overload". So it would be like what you wrote, but minus the inputs:
or
Second option - yes, that would be the idea. This would align closer with what .NET has too. |
Option 1 seems like the way to go.
|
Consult user data available and any findings from user studies to determine if we should simplify our input to create_translation_job to optimize for the use case of only one source and target.
This currently requires you to import and instantiate a few objects
Some ideas - we could consider "overloading" the method itself or accepting additional kwargs in
DocumentTranslationInput
.inputs
. Must passinputs
if you need to pass more than one source and/or target.source_url
,target_url
, andlanguage_code
along with any other optional kwargsDocumentTranslationInput
takes kwargstarget_url
andlanguage_code
. Consider other optional kwargs. Must supplytargets
if planning on passing more than one target in.The text was updated successfully, but these errors were encountered: