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

[Text Translation] Updating to the latest TypeSpec #40035

Merged
merged 21 commits into from May 17, 2024

Conversation

MikeyMCZ
Copy link
Member

@MikeyMCZ MikeyMCZ commented May 3, 2024

Description

  • Updating to the latest TypeSpec
  • Updating naming of model properties
  • Adding convenient methods to call for translate
  • Adding LanguageScope enum
  • Adding Options for Translate method
  • Updating tests
  • Updating samples

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

com.azure:azure-ai-translation-text

String clientTraceId, String from, TextType textType, String category, ProfanityAction profanityAction,
ProfanityMarker profanityMarker, Boolean includeAlignment, Boolean includeSentenceLength, String suggestedFrom,
String fromScript, String toScript, Boolean allowFallback) {
private Mono<List<TranslatedTextItem>> translate(List<String> targetLanguages, List<InputTextItem> body,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: instead of body can we name the param inputTexts on all these APIs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that it would require TypeSpec change as some parameters named body are in generated methods. I can change not generated, but then it will not be consistent.

@srnagar srnagar merged commit d0a6cb7 into Azure:main May 17, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants