File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 55import java .util .stream .Stream ;
66import javax .annotation .Nonnull ;
77
8- /** Client for interacting with OpenAI models. Allows for convenient string prompts only. */
9- public interface OpenAiClientWithSystemPrompt {
8+ /**
9+ * Client for interacting with OpenAI models. Allows for convenient string prompts only.
10+ *
11+ * @since 1.2.0
12+ */
13+ public interface ChatCompletionString {
1014
1115 /**
1216 * Generate a completion for the given user prompt.
Original file line number Diff line number Diff line change 3737/** Client for interacting with OpenAI models. */
3838@ Slf4j
3939@ RequiredArgsConstructor (access = AccessLevel .PRIVATE )
40- public final class OpenAiClient implements OpenAiClientWithSystemPrompt {
40+ public final class OpenAiClient implements ChatCompletionString {
4141 private static final String DEFAULT_API_VERSION = "2024-02-01" ;
4242 static final ObjectMapper JACKSON = getDefaultObjectMapper ();
4343 @ Nullable private String systemPrompt = null ;
@@ -113,7 +113,7 @@ public static OpenAiClient withCustomDestination(@Nonnull final Destination dest
113113 * @return the client
114114 */
115115 @ Nonnull
116- public OpenAiClientWithSystemPrompt withSystemPrompt (@ Nonnull final String systemPrompt ) {
116+ public ChatCompletionString withSystemPrompt (@ Nonnull final String systemPrompt ) {
117117 this .systemPrompt = systemPrompt ;
118118 return this ;
119119 }
You can’t perform that action at this time.
0 commit comments