diff --git a/build.gradle b/build.gradle
index 102bc1e..caef60e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -46,7 +46,7 @@ java {
group = 'com.cohere'
-version = '1.8.0'
+version = '1.8.1'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -77,7 +77,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.cohere'
artifactId = 'cohere-java'
- version = '1.8.0'
+ version = '1.8.1'
from components.java
pom {
name = 'cohere'
diff --git a/reference.md b/reference.md
index fb5cb69..fa45643 100644
--- a/reference.md
+++ b/reference.md
@@ -57,6 +57,19 @@ client.chatStream(
+**rawPrompting:** `Optional`
+
+When enabled, the user's prompt will be sent to the model without
+any pre-processing.
+
+Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+
+
+
+
+
+
+
**message:** `String`
Text input for the model to respond to.
@@ -528,6 +541,19 @@ client.chatStream(
+**rawPrompting:** `Optional`
+
+When enabled, the user's prompt will be sent to the model without
+any pre-processing.
+
+Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+
+
+
+
+
+
+
**message:** `String`
Text input for the model to respond to.
@@ -2265,6 +2291,19 @@ When set to `true`, tool calls in the Assistant message will be forced to follow
+**rawPrompting:** `Optional`
+
+When enabled, the user's prompt will be sent to the model without
+any pre-processing.
+
+Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+
+
+
+
+
+
+
**responseFormat:** `Optional`
@@ -2543,6 +2582,19 @@ When set to `true`, tool calls in the Assistant message will be forced to follow
+**rawPrompting:** `Optional`
+
+When enabled, the user's prompt will be sent to the model without
+any pre-processing.
+
+Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+
+
+
+
+
+
+
**responseFormat:** `Optional`
diff --git a/src/main/java/com/cohere/api/AsyncRawCohere.java b/src/main/java/com/cohere/api/AsyncRawCohere.java
index c3728c4..f3276b4 100644
--- a/src/main/java/com/cohere/api/AsyncRawCohere.java
+++ b/src/main/java/com/cohere/api/AsyncRawCohere.java
@@ -87,6 +87,9 @@ public CompletableFuture>> cha
.addPathSegments("v1/chat")
.build();
Map properties = new HashMap<>();
+ if (request.getRawPrompting().isPresent()) {
+ properties.put("raw_prompting", request.getRawPrompting());
+ }
properties.put("message", request.getMessage());
if (request.getModel().isPresent()) {
properties.put("model", request.getModel());
@@ -296,6 +299,9 @@ public CompletableFuture> chat(
.addPathSegments("v1/chat")
.build();
Map properties = new HashMap<>();
+ if (request.getRawPrompting().isPresent()) {
+ properties.put("raw_prompting", request.getRawPrompting());
+ }
properties.put("message", request.getMessage());
if (request.getModel().isPresent()) {
properties.put("model", request.getModel());
diff --git a/src/main/java/com/cohere/api/RawCohere.java b/src/main/java/com/cohere/api/RawCohere.java
index 3f3ec4e..8dbeb2b 100644
--- a/src/main/java/com/cohere/api/RawCohere.java
+++ b/src/main/java/com/cohere/api/RawCohere.java
@@ -83,6 +83,9 @@ public CohereHttpResponse> chatStream(
.addPathSegments("v1/chat")
.build();
Map properties = new HashMap<>();
+ if (request.getRawPrompting().isPresent()) {
+ properties.put("raw_prompting", request.getRawPrompting());
+ }
properties.put("message", request.getMessage());
if (request.getModel().isPresent()) {
properties.put("model", request.getModel());
@@ -253,6 +256,9 @@ public CohereHttpResponse chat(ChatRequest request, Req
.addPathSegments("v1/chat")
.build();
Map properties = new HashMap<>();
+ if (request.getRawPrompting().isPresent()) {
+ properties.put("raw_prompting", request.getRawPrompting());
+ }
properties.put("message", request.getMessage());
if (request.getModel().isPresent()) {
properties.put("model", request.getModel());
diff --git a/src/main/java/com/cohere/api/core/ClientOptions.java b/src/main/java/com/cohere/api/core/ClientOptions.java
index 07e7379..906ee74 100644
--- a/src/main/java/com/cohere/api/core/ClientOptions.java
+++ b/src/main/java/com/cohere/api/core/ClientOptions.java
@@ -32,10 +32,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.cohere:cohere-java/1.8.0");
+ put("User-Agent", "com.cohere:cohere-java/1.8.1");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.cohere.fern:api-sdk");
- put("X-Fern-SDK-Version", "1.8.0");
+ put("X-Fern-SDK-Version", "1.8.1");
}
});
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 5c4e8d7..efb2908 100644
--- a/src/main/java/com/cohere/api/requests/ChatRequest.java
+++ b/src/main/java/com/cohere/api/requests/ChatRequest.java
@@ -32,6 +32,8 @@
public final class ChatRequest {
private final Optional accepts;
+ private final Optional rawPrompting;
+
private final String message;
private final Optional model;
@@ -84,6 +86,7 @@ public final class ChatRequest {
private ChatRequest(
Optional accepts,
+ Optional rawPrompting,
String message,
Optional model,
Optional preamble,
@@ -110,6 +113,7 @@ private ChatRequest(
Optional safetyMode,
Map additionalProperties) {
this.accepts = accepts;
+ this.rawPrompting = rawPrompting;
this.message = message;
this.model = model;
this.preamble = preamble;
@@ -145,6 +149,16 @@ public Optional getAccepts() {
return accepts;
}
+ /**
+ * @return When enabled, the user's prompt will be sent to the model without
+ * any pre-processing.
+ *
+ */
+ @JsonProperty("raw_prompting")
+ public Optional getRawPrompting() {
+ return rawPrompting;
+ }
+
/**
* @return Text input for the model to respond to.
*
+ */
+ @JsonProperty("raw_prompting")
+ public Optional getRawPrompting() {
+ return rawPrompting;
+ }
+
/**
* @return Text input for the model to respond to.
*