Skip to content

Commit ae66160

Browse files
Added source language
1 parent 0b64e5f commit ae66160

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,10 @@ public OrchestrationChatResponse translation() {
553553
.withOutputTranslationConfig(
554554
SAPDocumentTranslation.create()
555555
.type(SAP_DOCUMENT_TRANSLATION)
556-
.config(SAPDocumentTranslationConfig.create().targetLanguage("de-DE")));
556+
.config(
557+
SAPDocumentTranslationConfig.create()
558+
.targetLanguage("de-DE")
559+
.sourceLanguage("en-US"))); // optional source language
557560

558561
return client.chatCompletion(prompt, configWithTranslation);
559562
}

0 commit comments

Comments
 (0)