diff --git a/build.gradle b/build.gradle
index 5ea8590..82ce699 100644
--- a/build.gradle
+++ b/build.gradle
@@ -50,7 +50,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.cohere'
artifactId = 'cohere-java'
- version = '1.0.8'
+ version = '1.0.9'
from components.java
pom {
name = 'cohere'
diff --git a/src/main/java/com/cohere/api/Cohere.java b/src/main/java/com/cohere/api/Cohere.java
index 12f0c31..f4fd761 100644
--- a/src/main/java/com/cohere/api/Cohere.java
+++ b/src/main/java/com/cohere/api/Cohere.java
@@ -70,7 +70,7 @@ public Cohere(ClientOptions clientOptions) {
/**
* Generates a text response to a user message.
- * To learn how to use Chat with Streaming and RAG follow this guide.
+ * To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides.
*/
public Iterable chatStream(ChatStreamRequest request) {
return chatStream(request, null);
@@ -78,7 +78,7 @@ public Iterable chatStream(ChatStreamRequest request) {
/**
* Generates a text response to a user message.
- * To learn how to use Chat with Streaming and RAG follow this guide.
+ * To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides.
*/
public Iterable chatStream(ChatStreamRequest request, RequestOptions requestOptions) {
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
@@ -119,7 +119,7 @@ public Iterable chatStream(ChatStreamRequest request, Requ
/**
* Generates a text response to a user message.
- * To learn how to use Chat with Streaming and RAG follow this guide.
+ * To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides.
*/
public NonStreamedChatResponse chat(ChatRequest request) {
return chat(request, null);
@@ -127,7 +127,7 @@ public NonStreamedChatResponse chat(ChatRequest request) {
/**
* Generates a text response to a user message.
- * To learn how to use Chat with Streaming and RAG follow this guide.
+ * To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides.
*/
public NonStreamedChatResponse chat(ChatRequest request, RequestOptions requestOptions) {
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
diff --git a/src/main/java/com/cohere/api/CohereBuilder.java b/src/main/java/com/cohere/api/CohereBuilder.java
index 133039f..e6fa445 100644
--- a/src/main/java/com/cohere/api/CohereBuilder.java
+++ b/src/main/java/com/cohere/api/CohereBuilder.java
@@ -47,7 +47,7 @@ public Cohere build() {
throw new RuntimeException("Please provide token or set the CO_API_KEY environment variable.");
}
this.clientOptionsBuilder.addHeader("Authorization", "Bearer " + this.token);
- if (clientName != null) {
+ if (clientName.isPresent()) {
this.clientOptionsBuilder.addHeader("X-Client-Name", this.clientName);
}
clientOptionsBuilder.environment(this.environment);
diff --git a/src/main/java/com/cohere/api/core/ClientOptions.java b/src/main/java/com/cohere/api/core/ClientOptions.java
index 3d6612d..62f3eea 100644
--- a/src/main/java/com/cohere/api/core/ClientOptions.java
+++ b/src/main/java/com/cohere/api/core/ClientOptions.java
@@ -30,7 +30,7 @@ private ClientOptions(
"X-Fern-SDK-Name",
"com.cohere.fern:api-sdk",
"X-Fern-SDK-Version",
- "1.0.8",
+ "1.0.9",
"X-Fern-Language",
"JAVA"));
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/cohere/api/requests/ChatRequest.java b/src/main/java/com/cohere/api/requests/ChatRequest.java
index 604eaaa..80b9d73 100644
--- a/src/main/java/com/cohere/api/requests/ChatRequest.java
+++ b/src/main/java/com/cohere/api/requests/ChatRequest.java
@@ -57,7 +57,7 @@ public final class ChatRequest {
private final Optional p;
- private final Optional seed;
+ private final Optional seed;
private final Optional> stopSequences;
@@ -93,7 +93,7 @@ private ChatRequest(
Optional maxInputTokens,
Optional k,
Optional p,
- Optional seed,
+ Optional seed,
Optional> stopSequences,
Optional frequencyPenalty,
Optional presencePenalty,
@@ -308,7 +308,7 @@ public Optional getP() {
* Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker, Private Deployments
*/
@JsonProperty("seed")
- public Optional getSeed() {
+ public Optional getSeed() {
return seed;
}
@@ -545,9 +545,9 @@ public interface _FinalStage {
_FinalStage p(Double p);
- _FinalStage seed(Optional seed);
+ _FinalStage seed(Optional seed);
- _FinalStage seed(Double seed);
+ _FinalStage seed(Integer seed);
_FinalStage stopSequences(Optional> stopSequences);
@@ -602,7 +602,7 @@ public static final class Builder implements MessageStage, _FinalStage {
private Optional> stopSequences = Optional.empty();
- private Optional seed = Optional.empty();
+ private Optional seed = Optional.empty();
private Optional p = Optional.empty();
@@ -851,14 +851,14 @@ public _FinalStage stopSequences(Optional> stopSequences) {
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- public _FinalStage seed(Double seed) {
+ public _FinalStage seed(Integer seed) {
this.seed = Optional.of(seed);
return this;
}
@java.lang.Override
@JsonSetter(value = "seed", nulls = Nulls.SKIP)
- public _FinalStage seed(Optional seed) {
+ public _FinalStage seed(Optional seed) {
this.seed = seed;
return this;
}
diff --git a/src/main/java/com/cohere/api/requests/ChatStreamRequest.java b/src/main/java/com/cohere/api/requests/ChatStreamRequest.java
index 10ef461..c302f67 100644
--- a/src/main/java/com/cohere/api/requests/ChatStreamRequest.java
+++ b/src/main/java/com/cohere/api/requests/ChatStreamRequest.java
@@ -57,7 +57,7 @@ public final class ChatStreamRequest {
private final Optional p;
- private final Optional seed;
+ private final Optional seed;
private final Optional> stopSequences;
@@ -93,7 +93,7 @@ private ChatStreamRequest(
Optional maxInputTokens,
Optional k,
Optional p,
- Optional seed,
+ Optional seed,
Optional> stopSequences,
Optional frequencyPenalty,
Optional presencePenalty,
@@ -308,7 +308,7 @@ public Optional getP() {
* Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker, Private Deployments
*/
@JsonProperty("seed")
- public Optional getSeed() {
+ public Optional getSeed() {
return seed;
}
@@ -545,9 +545,9 @@ public interface _FinalStage {
_FinalStage p(Double p);
- _FinalStage seed(Optional seed);
+ _FinalStage seed(Optional seed);
- _FinalStage seed(Double seed);
+ _FinalStage seed(Integer seed);
_FinalStage stopSequences(Optional> stopSequences);
@@ -602,7 +602,7 @@ public static final class Builder implements MessageStage, _FinalStage {
private Optional> stopSequences = Optional.empty();
- private Optional seed = Optional.empty();
+ private Optional seed = Optional.empty();
private Optional p = Optional.empty();
@@ -851,14 +851,14 @@ public _FinalStage stopSequences(Optional> stopSequences) {
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- public _FinalStage seed(Double seed) {
+ public _FinalStage seed(Integer seed) {
this.seed = Optional.of(seed);
return this;
}
@java.lang.Override
@JsonSetter(value = "seed", nulls = Nulls.SKIP)
- public _FinalStage seed(Optional seed) {
+ public _FinalStage seed(Optional seed) {
this.seed = seed;
return this;
}
diff --git a/src/main/java/com/cohere/api/requests/GenerateRequest.java b/src/main/java/com/cohere/api/requests/GenerateRequest.java
index 0b2ede9..5d448bf 100644
--- a/src/main/java/com/cohere/api/requests/GenerateRequest.java
+++ b/src/main/java/com/cohere/api/requests/GenerateRequest.java
@@ -35,7 +35,7 @@ public final class GenerateRequest {
private final Optional temperature;
- private final Optional seed;
+ private final Optional seed;
private final Optional preset;
@@ -64,7 +64,7 @@ private GenerateRequest(
Optional maxTokens,
Optional truncate,
Optional temperature,
- Optional seed,
+ Optional seed,
Optional preset,
Optional> endSequences,
Optional> stopSequences,
@@ -165,10 +165,14 @@ public Optional getTemperature() {
}
/**
- * @return If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinsim cannot be totally guaranteed.
+ * @return If specified, the backend will make a best effort to sample tokens
+ * deterministically, such that repeated requests with the same
+ * seed and parameters should return the same result. However,
+ * determinism cannot be totally guaranteed.
+ * Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker, Private Deployments
*/
@JsonProperty("seed")
- public Optional getSeed() {
+ public Optional getSeed() {
return seed;
}
@@ -341,9 +345,9 @@ public interface _FinalStage {
_FinalStage temperature(Double temperature);
- _FinalStage seed(Optional seed);
+ _FinalStage seed(Optional seed);
- _FinalStage seed(Double seed);
+ _FinalStage seed(Integer seed);
_FinalStage preset(Optional preset);
@@ -404,7 +408,7 @@ public static final class Builder implements PromptStage, _FinalStage {
private Optional preset = Optional.empty();
- private Optional seed = Optional.empty();
+ private Optional seed = Optional.empty();
private Optional temperature = Optional.empty();
@@ -616,18 +620,22 @@ public _FinalStage preset(Optional preset) {
}
/**
- *
If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinsim cannot be totally guaranteed.
+ *
If specified, the backend will make a best effort to sample tokens
+ * deterministically, such that repeated requests with the same
+ * seed and parameters should return the same result. However,
+ * determinism cannot be totally guaranteed.
+ * Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker, Private Deployments
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- public _FinalStage seed(Double seed) {
+ public _FinalStage seed(Integer seed) {
this.seed = Optional.of(seed);
return this;
}
@java.lang.Override
@JsonSetter(value = "seed", nulls = Nulls.SKIP)
- public _FinalStage seed(Optional seed) {
+ public _FinalStage seed(Optional seed) {
this.seed = seed;
return this;
}
diff --git a/src/main/java/com/cohere/api/requests/GenerateStreamRequest.java b/src/main/java/com/cohere/api/requests/GenerateStreamRequest.java
index 505e978..d79fb82 100644
--- a/src/main/java/com/cohere/api/requests/GenerateStreamRequest.java
+++ b/src/main/java/com/cohere/api/requests/GenerateStreamRequest.java
@@ -35,7 +35,7 @@ public final class GenerateStreamRequest {
private final Optional temperature;
- private final Optional seed;
+ private final Optional seed;
private final Optional preset;
@@ -64,7 +64,7 @@ private GenerateStreamRequest(
Optional maxTokens,
Optional truncate,
Optional temperature,
- Optional seed,
+ Optional seed,
Optional preset,
Optional> endSequences,
Optional> stopSequences,
@@ -165,10 +165,14 @@ public Optional getTemperature() {
}
/**
- * @return If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinsim cannot be totally guaranteed.
+ * @return If specified, the backend will make a best effort to sample tokens
+ * deterministically, such that repeated requests with the same
+ * seed and parameters should return the same result. However,
+ * determinism cannot be totally guaranteed.
+ * Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker, Private Deployments
*/
@JsonProperty("seed")
- public Optional getSeed() {
+ public Optional getSeed() {
return seed;
}
@@ -341,9 +345,9 @@ public interface _FinalStage {
_FinalStage temperature(Double temperature);
- _FinalStage seed(Optional seed);
+ _FinalStage seed(Optional seed);
- _FinalStage seed(Double seed);
+ _FinalStage seed(Integer seed);
_FinalStage preset(Optional preset);
@@ -404,7 +408,7 @@ public static final class Builder implements PromptStage, _FinalStage {
private Optional preset = Optional.empty();
- private Optional seed = Optional.empty();
+ private Optional seed = Optional.empty();
private Optional temperature = Optional.empty();
@@ -616,18 +620,22 @@ public _FinalStage preset(Optional preset) {
}
/**
- *
If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinsim cannot be totally guaranteed.
+ *
If specified, the backend will make a best effort to sample tokens
+ * deterministically, such that repeated requests with the same
+ * seed and parameters should return the same result. However,
+ * determinism cannot be totally guaranteed.
+ * Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker, Private Deployments
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- public _FinalStage seed(Double seed) {
+ public _FinalStage seed(Integer seed) {
this.seed = Optional.of(seed);
return this;
}
@java.lang.Override
@JsonSetter(value = "seed", nulls = Nulls.SKIP)
- public _FinalStage seed(Optional seed) {
+ public _FinalStage seed(Optional seed) {
this.seed = seed;
return this;
}
diff --git a/src/main/java/com/cohere/api/types/ChatRequestConnectorsSearchOptions.java b/src/main/java/com/cohere/api/types/ChatRequestConnectorsSearchOptions.java
index 23d2541..e071292 100644
--- a/src/main/java/com/cohere/api/types/ChatRequestConnectorsSearchOptions.java
+++ b/src/main/java/com/cohere/api/types/ChatRequestConnectorsSearchOptions.java
@@ -20,58 +20,24 @@
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonDeserialize(builder = ChatRequestConnectorsSearchOptions.Builder.class)
public final class ChatRequestConnectorsSearchOptions {
- private final Optional