File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
orchestration/src/main/java/com/sap/ai/sdk/orchestration/spring Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 22
33import com .google .common .annotations .Beta ;
44import com .sap .ai .sdk .orchestration .OrchestrationChatResponse ;
5- import com .sap .ai .sdk .orchestration .OrchestrationClientException ;
65import com .sap .ai .sdk .orchestration .model .LLMChoice ;
76import com .sap .ai .sdk .orchestration .model .LLMModuleResultSynchronous ;
87import com .sap .ai .sdk .orchestration .model .TokenUsage ;
@@ -49,12 +48,7 @@ static List<Generation> toGenerations(@Nonnull final LLMModuleResultSynchronous
4948 }
5049
5150 @ Nonnull
52- static Generation toGeneration (@ Nonnull final LLMChoice choice )
53- throws OrchestrationClientException {
54- if ("content_filter" .equals (choice .getFinishReason ())) {
55- throw new OrchestrationClientException ("Content filter filtered the output." );
56- }
57-
51+ static Generation toGeneration (@ Nonnull final LLMChoice choice ) {
5852 val metadata = ChatGenerationMetadata .builder ().finishReason (choice .getFinishReason ());
5953 metadata .metadata ("index" , choice .getIndex ());
6054 if (!choice .getLogprobs ().isEmpty ()) {
You can’t perform that action at this time.
0 commit comments