Skip to content

Commit b5443a5

Browse files
committed
SDK regeneration
1 parent 4ce0e90 commit b5443a5

191 files changed

Lines changed: 10325 additions & 14268 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/metadata.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"cliVersion": "4.46.0",
2+
"cliVersion": "4.84.2",
33
"generatorName": "fernapi/fern-java-sdk",
4-
"generatorVersion": "4.0.4",
4+
"generatorVersion": "4.3.1",
55
"generatorConfig": {
66
"package-prefix": "com.deepgram",
77
"base-api-exception-class-name": "DeepgramHttpException",
@@ -11,6 +11,10 @@
1111
},
1212
"enable-wire-tests": true
1313
},
14-
"originGitCommit": "e994b5ab79ae6fe3560daff055acdf80d315b48e",
15-
"sdkVersion": "0.2.1"
14+
"originGitCommit": "bb699c3af412d6c9d85ff86a1c1f43ccb3b68f92",
15+
"originGitCommitIsDirty": true,
16+
"invokedBy": "manual",
17+
"requestedVersion": null,
18+
"ciProvider": null,
19+
"sdkVersion": "0.2.2"
1620
}

context7.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/main/java/com/deepgram/AsyncDeepgramApiClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.deepgram.resources.read.AsyncReadClient;
1313
import com.deepgram.resources.selfhosted.AsyncSelfHostedClient;
1414
import com.deepgram.resources.speak.AsyncSpeakClient;
15+
import com.deepgram.resources.voiceagent.AsyncVoiceAgentClient;
1516
import java.util.function.Supplier;
1617

1718
public class AsyncDeepgramApiClient {
@@ -31,6 +32,8 @@ public class AsyncDeepgramApiClient {
3132

3233
protected final Supplier<AsyncSpeakClient> speakClient;
3334

35+
protected final Supplier<AsyncVoiceAgentClient> voiceAgentClient;
36+
3437
public AsyncDeepgramApiClient(ClientOptions clientOptions) {
3538
this.clientOptions = clientOptions;
3639
this.agentClient = Suppliers.memoize(() -> new AsyncAgentClient(clientOptions));
@@ -40,6 +43,7 @@ public AsyncDeepgramApiClient(ClientOptions clientOptions) {
4043
this.readClient = Suppliers.memoize(() -> new AsyncReadClient(clientOptions));
4144
this.selfHostedClient = Suppliers.memoize(() -> new AsyncSelfHostedClient(clientOptions));
4245
this.speakClient = Suppliers.memoize(() -> new AsyncSpeakClient(clientOptions));
46+
this.voiceAgentClient = Suppliers.memoize(() -> new AsyncVoiceAgentClient(clientOptions));
4347
}
4448

4549
public AsyncAgentClient agent() {
@@ -70,6 +74,10 @@ public AsyncSpeakClient speak() {
7074
return this.speakClient.get();
7175
}
7276

77+
public AsyncVoiceAgentClient voiceAgent() {
78+
return this.voiceAgentClient.get();
79+
}
80+
7381
public static AsyncDeepgramApiClientBuilder builder() {
7482
return new AsyncDeepgramApiClientBuilder();
7583
}

src/main/java/com/deepgram/DeepgramApiClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.deepgram.resources.read.ReadClient;
1313
import com.deepgram.resources.selfhosted.SelfHostedClient;
1414
import com.deepgram.resources.speak.SpeakClient;
15+
import com.deepgram.resources.voiceagent.VoiceAgentClient;
1516
import java.util.function.Supplier;
1617

1718
public class DeepgramApiClient {
@@ -31,6 +32,8 @@ public class DeepgramApiClient {
3132

3233
protected final Supplier<SpeakClient> speakClient;
3334

35+
protected final Supplier<VoiceAgentClient> voiceAgentClient;
36+
3437
public DeepgramApiClient(ClientOptions clientOptions) {
3538
this.clientOptions = clientOptions;
3639
this.agentClient = Suppliers.memoize(() -> new AgentClient(clientOptions));
@@ -40,6 +43,7 @@ public DeepgramApiClient(ClientOptions clientOptions) {
4043
this.readClient = Suppliers.memoize(() -> new ReadClient(clientOptions));
4144
this.selfHostedClient = Suppliers.memoize(() -> new SelfHostedClient(clientOptions));
4245
this.speakClient = Suppliers.memoize(() -> new SpeakClient(clientOptions));
46+
this.voiceAgentClient = Suppliers.memoize(() -> new VoiceAgentClient(clientOptions));
4347
}
4448

4549
public AgentClient agent() {
@@ -70,6 +74,10 @@ public SpeakClient speak() {
7074
return this.speakClient.get();
7175
}
7276

77+
public VoiceAgentClient voiceAgent() {
78+
return this.voiceAgentClient.get();
79+
}
80+
7381
public static DeepgramApiClientBuilder builder() {
7482
return new DeepgramApiClientBuilder();
7583
}

src/main/java/com/deepgram/core/ClientOptions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ private ClientOptions(
4141
this.headers.putAll(headers);
4242
this.headers.putAll(new HashMap<String, String>() {
4343
{
44-
put("User-Agent", "com.deepgram:deepgram-java-sdk/0.2.1"); // x-release-please-version
44+
put("User-Agent", "com.deepgram:deepgram-sdk/0.2.2");
4545
put("X-Fern-Language", "JAVA");
46-
put("X-Fern-SDK-Name", "com.deepgram:deepgram-java-sdk");
47-
put("X-Fern-SDK-Version", "0.2.1"); // x-release-please-version
46+
put("X-Fern-SDK-Name", "com.deepgram.fern:api-sdk");
47+
put("X-Fern-SDK-Version", "0.2.2");
4848
}
4949
});
5050
this.headerSuppliers = headerSuppliers;

src/main/java/com/deepgram/core/Environment.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ public final class Environment {
77
public static final Environment PRODUCTION =
88
new Environment("https://api.deepgram.com", "wss://agent.deepgram.com", "wss://api.deepgram.com");
99

10-
public static final Environment AGENT =
11-
new Environment("https://agent.deepgram.com", "wss://agent.deepgram.com", "wss://api.deepgram.com");
12-
1310
private final String base;
1411

1512
private final String agent;

src/main/java/com/deepgram/core/RetryInterceptor.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public class RetryInterceptor implements Interceptor {
1919
private static final Duration MAX_RETRY_DELAY = Duration.ofMillis(60000);
2020
private static final double JITTER_FACTOR = 0.2;
2121

22-
private final ExponentialBackoff backoff;
22+
private final int maxRetries;
2323
private final Random random = new Random();
2424

2525
public RetryInterceptor(int maxRetries) {
26-
this.backoff = new ExponentialBackoff(maxRetries);
26+
this.maxRetries = maxRetries;
2727
}
2828

2929
@Override
@@ -38,7 +38,8 @@ public Response intercept(Chain chain) throws IOException {
3838
}
3939

4040
private Response retryChain(Response response, Chain chain) throws IOException {
41-
Optional<Duration> nextBackoff = this.backoff.nextBackoff(response);
41+
ExponentialBackoff backoff = new ExponentialBackoff(this.maxRetries);
42+
Optional<Duration> nextBackoff = backoff.nextBackoff(response);
4243
while (nextBackoff.isPresent()) {
4344
try {
4445
Thread.sleep(nextBackoff.get().toMillis());
@@ -48,7 +49,7 @@ private Response retryChain(Response response, Chain chain) throws IOException {
4849
response.close();
4950
response = chain.proceed(chain.request());
5051
if (shouldRetry(response.code())) {
51-
nextBackoff = this.backoff.nextBackoff(response);
52+
nextBackoff = backoff.nextBackoff(response);
5253
} else {
5354
return response;
5455
}

src/main/java/com/deepgram/resources/agent/v1/settings/think/models/AsyncRawModelsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public CompletableFuture<DeepgramApiHttpResponse<AgentThinkModelsV1Response>> li
4242
* Retrieves the available think models that can be used for AI agent processing
4343
*/
4444
public CompletableFuture<DeepgramApiHttpResponse<AgentThinkModelsV1Response>> list(RequestOptions requestOptions) {
45-
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL())
45+
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getAgentURL())
4646
.newBuilder()
4747
.addPathSegments("v1/agent/settings/think/models");
4848
if (requestOptions != null) {

src/main/java/com/deepgram/resources/agent/v1/settings/think/models/RawModelsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public DeepgramApiHttpResponse<AgentThinkModelsV1Response> list() {
3838
* Retrieves the available think models that can be used for AI agent processing
3939
*/
4040
public DeepgramApiHttpResponse<AgentThinkModelsV1Response> list(RequestOptions requestOptions) {
41-
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL())
41+
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getAgentURL())
4242
.newBuilder()
4343
.addPathSegments("v1/agent/settings/think/models");
4444
if (requestOptions != null) {

src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ConversationTextRole.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import com.fasterxml.jackson.annotation.JsonValue;
88

99
public final class AgentV1ConversationTextRole {
10+
public static final AgentV1ConversationTextRole USER = new AgentV1ConversationTextRole(Value.USER, "user");
11+
1012
public static final AgentV1ConversationTextRole ASSISTANT =
1113
new AgentV1ConversationTextRole(Value.ASSISTANT, "assistant");
1214

13-
public static final AgentV1ConversationTextRole USER = new AgentV1ConversationTextRole(Value.USER, "user");
14-
1515
private final Value value;
1616

1717
private final String string;
@@ -45,10 +45,10 @@ public int hashCode() {
4545

4646
public <T> T visit(Visitor<T> visitor) {
4747
switch (value) {
48-
case ASSISTANT:
49-
return visitor.visitAssistant();
5048
case USER:
5149
return visitor.visitUser();
50+
case ASSISTANT:
51+
return visitor.visitAssistant();
5252
case UNKNOWN:
5353
default:
5454
return visitor.visitUnknown(string);
@@ -58,10 +58,10 @@ public <T> T visit(Visitor<T> visitor) {
5858
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
5959
public static AgentV1ConversationTextRole valueOf(String value) {
6060
switch (value) {
61-
case "assistant":
62-
return ASSISTANT;
6361
case "user":
6462
return USER;
63+
case "assistant":
64+
return ASSISTANT;
6565
default:
6666
return new AgentV1ConversationTextRole(Value.UNKNOWN, value);
6767
}

0 commit comments

Comments
 (0)