Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions core-services/prompt-registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.google.common.annotations.Beta;
import com.sap.ai.sdk.core.AiCoreService;
import com.sap.ai.sdk.prompt.registry.client.OrchestrationConfigsApi;
import com.sap.ai.sdk.prompt.registry.model.AzureContentSafetyInputFilterConfig;
Expand All @@ -23,7 +22,7 @@
*
* @since 1.15.0
*/
@Beta
// @Beta
public class OrchestrationConfigClient extends OrchestrationConfigsApi {

/**
Expand Down
4 changes: 0 additions & 4 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/java/com/sap/ai/sdk/core/AiCoreService.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static com.sap.ai.sdk.core.JacksonConfiguration.getDefaultObjectMapper;

import com.fasterxml.jackson.databind.json.JsonMapper;
import com.google.common.annotations.Beta;
import com.sap.cloud.sdk.cloudplatform.connectivity.DefaultHttpDestination;
import com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestination;
import com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException;
Expand Down Expand Up @@ -139,7 +138,7 @@ protected String buildDeploymentPath(@Nonnull final String deploymentId) {
*
* @param resourceGroup the resource group of the deleted deployment, usually "default".
*/
@Beta
// @Beta
public void reloadCachedDeployments(@Nonnull final String resourceGroup) {
deploymentResolver.reloadDeployments(resourceGroup);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.annotations.Beta;
import io.vavr.control.Try;
import java.nio.charset.StandardCharsets;
import java.util.Optional;
Expand Down Expand Up @@ -49,7 +48,7 @@ public class ClientResponseHandler<T, R extends ClientError, E extends ClientExc
* @param jackson The {@link ObjectMapper} to use
* @return the current instance of {@link ClientResponseHandler} with the changed object mapper
*/
@Beta
// @Beta
@Nonnull
public ClientResponseHandler<T, R, E> objectMapper(@Nonnull final ObjectMapper jackson) {
objectMapper = jackson;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.annotations.Beta;
import java.io.IOException;
import java.util.stream.Stream;
import javax.annotation.Nonnull;
Expand All @@ -30,7 +29,7 @@ public class ClientStreamingHandler<
* @return the current instance of {@link ClientStreamingHandler} with the changed object mapper
*/
@Nonnull
@Beta
// @Beta
public ClientStreamingHandler<D, R, E> objectMapper(@Nonnull final ObjectMapper jackson) {
super.objectMapper(jackson);
return this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.sap.ai.sdk.foundationmodels.openai;

import com.google.common.annotations.Beta;
import com.openai.core.ClientOptions;
import com.openai.services.async.ResponseServiceAsync;
import com.openai.services.async.ResponseServiceAsyncImpl;
Expand All @@ -24,7 +23,7 @@
*/
@Slf4j
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
@Beta
// @Beta
public class AiCoreOpenAiClient {

private final HttpDestination destination;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.annotations.Beta;
import com.sap.ai.sdk.foundationmodels.openai.generated.model.CreateChatCompletionRequest;
import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -37,7 +36,7 @@ public class OpenAiBatchInput {
*
* @param chatCompletionRequests the list of chat completion requests to include in the batch
*/
@Beta
// @Beta
public OpenAiBatchInput(@Nonnull final OpenAiChatCompletionRequest... chatCompletionRequests) {
for (int i = 0; i < chatCompletionRequests.length; i++) {
val request = chatCompletionRequests[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.annotations.Beta;
import com.sap.ai.sdk.core.AiCoreService;
import com.sap.ai.sdk.core.DeploymentResolutionException;
import com.sap.ai.sdk.core.common.ClientResponseHandler;
Expand Down Expand Up @@ -82,7 +81,7 @@ public static OpenAiClient forModel(@Nonnull final OpenAiModel foundationModel)
*
* @return created client
*/
@Beta
// @Beta
@Nonnull
public static OpenAiRealtimeClient realtimeClient() {
final var withResolvedDestination = OpenAiClient.forModel(OpenAiModel.GPT_REALTIME);
Expand All @@ -95,7 +94,7 @@ public static OpenAiRealtimeClient realtimeClient() {
* @param apiVersion the API version to target.
* @return a new client.
*/
@Beta
// @Beta
@Nonnull
public OpenAiClient withApiVersion(@Nonnull final String apiVersion) {
final var newDestination =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class OpenAiClientException extends ClientException {
*
* @return The {@link ErrorResponse} object, or {@code null} if not available.
*/
@Beta
// @Beta
@Nullable
public ErrorResponse getErrorResponse() {
final var clientError = super.getClientError();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Allows to input (send) text to the open channel, must be closed when not needed anymore (e.g.
* try-with-resources)
*/
@Beta
// @Beta
public interface TextInputChannel extends AutoCloseable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* <p>Should be closed by application (try-with-resources) when not needed anymore
*/
@Beta
// @Beta
public interface AudioInputChannel extends AutoCloseable {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.sap.ai.sdk.foundationmodels.openai.realtime;

import com.google.common.annotations.Beta;

/** Functional interface representing audio output channel (audio data consumer) */
@Beta
// @Beta
public interface AudioOutputChannel {

/**
Expand All @@ -16,6 +14,6 @@ public interface AudioOutputChannel {
* single logical entity (e.g. gets called at the end when all byte parts of a single message
* get passed)
*/
@Beta
// @Beta
void outputAudio(byte[] rawBytesChunk, boolean isLast);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.sap.ai.sdk.foundationmodels.openai.realtime;

import com.google.common.annotations.Beta;
import com.sap.ai.sdk.foundationmodels.openai.TextInputChannel;
import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
import com.sap.cloud.sdk.cloudplatform.connectivity.Header;
Expand All @@ -12,7 +11,7 @@
* OpenAI client implementation of Realtime API. Abstracts technical implementation, transport and
* threading and exposes business-level operations (high level interface)
*/
@Beta
// @Beta
public class OpenAiRealtimeClient {

static final int PATH_BUFFER_SIZE =
Expand All @@ -25,7 +24,7 @@ public class OpenAiRealtimeClient {
*
* @param destination - destination to use
*/
@Beta
// @Beta
public OpenAiRealtimeClient(@Nonnull final Destination destination) {
this.destination = destination;
}
Expand Down Expand Up @@ -58,7 +57,7 @@ public OpenAiRealtimeClient(@Nonnull final Destination destination) {
* @return input channel, allowing for text input
*/
@Nonnull
@Beta
// @Beta
public TextInputChannel textToSpeech(
@Nonnull final AudioOutputChannel audioOutputConsumer,
@Nonnull final RealtimeParam... params) {
Expand Down Expand Up @@ -94,7 +93,7 @@ public TextInputChannel textToSpeech(
* bit)
*/
@Nonnull
@Beta
// @Beta
public AudioInputChannel speechToSpeech(
@Nonnull final AudioOutputChannel audioOutputConsumer,
@Nonnull final RealtimeParam... params) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.sap.ai.sdk.foundationmodels.openai.realtime;

import com.google.common.annotations.Beta;
import javax.annotation.Nonnull;

/** Represents possible configuration params of realtime client */
@Beta
// @Beta
public interface RealtimeParam {
/** Represents configurable options */
enum ParamName {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.sap.ai.sdk.foundationmodels.openai.realtime;

import com.google.common.annotations.Beta;
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/** Allows to configure model system prompt */
@Beta
// @Beta
public final class RealtimeParamSystemPrompt implements RealtimeParam {

private final String systemPrompt;
Expand All @@ -16,25 +15,24 @@ public final class RealtimeParamSystemPrompt implements RealtimeParam {
*
* @param systemPrompt system prompt to use
*/
@Beta
// @Beta
public RealtimeParamSystemPrompt(@Nonnull final String systemPrompt) {
this.systemPrompt = systemPrompt;
}

@Override
@Beta
// @Beta
public @Nonnull ParamName getParamName() {
return ParamName.SYSTEM_PROMPT;
}

@Override
@Beta
// @Beta
public @Nonnull String getValueAsString() {
return systemPrompt;
}

@Override
@Beta
public boolean equals(@Nullable final Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
Expand All @@ -44,7 +42,6 @@ public boolean equals(@Nullable final Object o) {
}

@Override
@Beta
public int hashCode() {
return Objects.hashCode(systemPrompt);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package com.sap.ai.sdk.foundationmodels.openai.realtime;

import com.google.common.annotations.Beta;
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/** Allows to configure turn detection (how model responds). */
@Beta
// @Beta
public final class RealtimeParamTurnDetection implements RealtimeParam {

/** Model tries to recognize if/when it should respond automatically */
@Beta
// @Beta
public static final RealtimeParamTurnDetection BY_MODEL_AUTO =
new RealtimeParamTurnDetection("BY_MODEL_AUTO");

Expand All @@ -19,7 +18,7 @@ public final class RealtimeParamTurnDetection implements RealtimeParam {
* Less convenient than the automatic option but may give lower latency in some cases (model does
* not need to perform additional turn detection analysis).
*/
@Beta
// @Beta
public static final RealtimeParamTurnDetection EACH_CALL_IS_A_TURN =
new RealtimeParamTurnDetection("EACH_CALL_IS_A_TURN");

Expand All @@ -30,19 +29,18 @@ public final class RealtimeParamTurnDetection implements RealtimeParam {
}

@Override
@Beta
// @Beta
public @Nonnull ParamName getParamName() {
return ParamName.TURN_DETECTION;
}

@Override
@Beta
// @Beta
public @Nonnull String getValueAsString() {
return turnDetectionKind;
}

@Override
@Beta
public boolean equals(@Nullable final Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
Expand All @@ -52,7 +50,6 @@ public boolean equals(@Nullable final Object o) {
}

@Override
@Beta
public int hashCode() {
return Objects.hashCode(turnDetectionKind);
}
Expand Down
Loading
Loading