File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
main/java/com/sap/ai/sdk/orchestration
test/java/com/sap/ai/sdk/orchestration
sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public class TranslationConfig {
3636 * @return A TranslationConfig configured for input translation
3737 */
3838 @ Nonnull
39- public static TranslationConfig createInputConfig (@ Nonnull final String targetLanguage ) {
39+ public static TranslationConfig createInput (@ Nonnull final String targetLanguage ) {
4040 val translationType = SAPDocumentTranslationInput .TypeEnum .SAP_DOCUMENT_TRANSLATION ;
4141 val inputConfig =
4242 SAPDocumentTranslationInput .create ()
@@ -55,7 +55,7 @@ public static TranslationConfig createInputConfig(@Nonnull final String targetLa
5555 * @return A TranslationConfig configured for output translation
5656 */
5757 @ Nonnull
58- public static TranslationConfig createOutputConfig (@ Nonnull final String targetLanguage ) {
58+ public static TranslationConfig createOutput (@ Nonnull final String targetLanguage ) {
5959 val translationType = SAPDocumentTranslationOutput .TypeEnum .SAP_DOCUMENT_TRANSLATION ;
6060 val outputConfig =
6161 SAPDocumentTranslationOutput .create ()
Original file line number Diff line number Diff line change @@ -140,10 +140,8 @@ void testDpiMaskingRegex() {
140140
141141 @ Test
142142 void testTranslationConfig () {
143- var inputTranslationConfig =
144- TranslationConfig .createInputConfig ("en-US" ).sourceLanguage ("de-DE" );
145- var outputTranslationConfig =
146- TranslationConfig .createOutputConfig ("de-DE" ).sourceLanguage ("en-US" );
143+ var inputTranslationConfig = TranslationConfig .createInput ("en-US" ).sourceLanguage ("de-DE" );
144+ var outputTranslationConfig = TranslationConfig .createOutput ("de-DE" ).sourceLanguage ("en-US" );
147145 var config =
148146 new OrchestrationModuleConfig ()
149147 .withLlmConfig (GPT_4O )
Original file line number Diff line number Diff line change @@ -616,9 +616,9 @@ public OrchestrationChatResponse translation() {
616616 // https://help.sap.com/docs/translation-hub/sap-translation-hub/supported-languages?version=Cloud#translation-provider-sap-machine-translation
617617 val configWithTranslation =
618618 config
619- .withInputTranslationConfig (TranslationConfig .createInputConfig ("en-US" ))
619+ .withInputTranslationConfig (TranslationConfig .createInput ("en-US" ))
620620 .withOutputTranslationConfig (
621- TranslationConfig .createOutputConfig ("de-DE" )
621+ TranslationConfig .createOutput ("de-DE" )
622622 .sourceLanguage ("en-US" )); // optional source language
623623
624624 return client .chatCompletion (prompt , configWithTranslation );
You can’t perform that action at this time.
0 commit comments