Skip to content

Commit 7c91cbe

Browse files
🌿 Fern Regeneration -- August 7, 2025 (#57)
* SDK regeneration * 1.8.1 --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: billytrend-cohere <[email protected]>
1 parent 27a5996 commit 7c91cbe

File tree

12 files changed

+366
-10
lines changed

12 files changed

+366
-10
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ java {
4646

4747
group = 'com.cohere'
4848

49-
version = '1.8.0'
49+
version = '1.8.1'
5050

5151
jar {
5252
dependsOn(":generatePomFileForMavenPublication")
@@ -77,7 +77,7 @@ publishing {
7777
maven(MavenPublication) {
7878
groupId = 'com.cohere'
7979
artifactId = 'cohere-java'
80-
version = '1.8.0'
80+
version = '1.8.1'
8181
from components.java
8282
pom {
8383
name = 'cohere'

reference.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ client.chatStream(
5757
<dl>
5858
<dd>
5959

60+
**rawPrompting:** `Optional<Boolean>`
61+
62+
When enabled, the user's prompt will be sent to the model without
63+
any pre-processing.
64+
65+
Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
66+
67+
</dd>
68+
</dl>
69+
70+
<dl>
71+
<dd>
72+
6073
**message:** `String`
6174

6275
Text input for the model to respond to.
@@ -528,6 +541,19 @@ client.chatStream(
528541
<dl>
529542
<dd>
530543

544+
**rawPrompting:** `Optional<Boolean>`
545+
546+
When enabled, the user's prompt will be sent to the model without
547+
any pre-processing.
548+
549+
Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
550+
551+
</dd>
552+
</dl>
553+
554+
<dl>
555+
<dd>
556+
531557
**message:** `String`
532558

533559
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
22652291
<dl>
22662292
<dd>
22672293

2294+
**rawPrompting:** `Optional<Boolean>`
2295+
2296+
When enabled, the user's prompt will be sent to the model without
2297+
any pre-processing.
2298+
2299+
Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
2300+
2301+
</dd>
2302+
</dl>
2303+
2304+
<dl>
2305+
<dd>
2306+
22682307
**responseFormat:** `Optional<ResponseFormatV2>`
22692308

22702309
</dd>
@@ -2543,6 +2582,19 @@ When set to `true`, tool calls in the Assistant message will be forced to follow
25432582
<dl>
25442583
<dd>
25452584

2585+
**rawPrompting:** `Optional<Boolean>`
2586+
2587+
When enabled, the user's prompt will be sent to the model without
2588+
any pre-processing.
2589+
2590+
Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
2591+
2592+
</dd>
2593+
</dl>
2594+
2595+
<dl>
2596+
<dd>
2597+
25462598
**responseFormat:** `Optional<ResponseFormatV2>`
25472599

25482600
</dd>

src/main/java/com/cohere/api/AsyncRawCohere.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ public CompletableFuture<CohereHttpResponse<Iterable<StreamedChatResponse>>> cha
8787
.addPathSegments("v1/chat")
8888
.build();
8989
Map<String, Object> properties = new HashMap<>();
90+
if (request.getRawPrompting().isPresent()) {
91+
properties.put("raw_prompting", request.getRawPrompting());
92+
}
9093
properties.put("message", request.getMessage());
9194
if (request.getModel().isPresent()) {
9295
properties.put("model", request.getModel());
@@ -296,6 +299,9 @@ public CompletableFuture<CohereHttpResponse<NonStreamedChatResponse>> chat(
296299
.addPathSegments("v1/chat")
297300
.build();
298301
Map<String, Object> properties = new HashMap<>();
302+
if (request.getRawPrompting().isPresent()) {
303+
properties.put("raw_prompting", request.getRawPrompting());
304+
}
299305
properties.put("message", request.getMessage());
300306
if (request.getModel().isPresent()) {
301307
properties.put("model", request.getModel());

src/main/java/com/cohere/api/RawCohere.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ public CohereHttpResponse<Iterable<StreamedChatResponse>> chatStream(
8383
.addPathSegments("v1/chat")
8484
.build();
8585
Map<String, Object> properties = new HashMap<>();
86+
if (request.getRawPrompting().isPresent()) {
87+
properties.put("raw_prompting", request.getRawPrompting());
88+
}
8689
properties.put("message", request.getMessage());
8790
if (request.getModel().isPresent()) {
8891
properties.put("model", request.getModel());
@@ -253,6 +256,9 @@ public CohereHttpResponse<NonStreamedChatResponse> chat(ChatRequest request, Req
253256
.addPathSegments("v1/chat")
254257
.build();
255258
Map<String, Object> properties = new HashMap<>();
259+
if (request.getRawPrompting().isPresent()) {
260+
properties.put("raw_prompting", request.getRawPrompting());
261+
}
256262
properties.put("message", request.getMessage());
257263
if (request.getModel().isPresent()) {
258264
properties.put("model", request.getModel());

src/main/java/com/cohere/api/core/ClientOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ private ClientOptions(
3232
this.headers.putAll(headers);
3333
this.headers.putAll(new HashMap<String, String>() {
3434
{
35-
put("User-Agent", "com.cohere:cohere-java/1.8.0");
35+
put("User-Agent", "com.cohere:cohere-java/1.8.1");
3636
put("X-Fern-Language", "JAVA");
3737
put("X-Fern-SDK-Name", "com.cohere.fern:api-sdk");
38-
put("X-Fern-SDK-Version", "1.8.0");
38+
put("X-Fern-SDK-Version", "1.8.1");
3939
}
4040
});
4141
this.headerSuppliers = headerSuppliers;

src/main/java/com/cohere/api/requests/ChatRequest.java

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
public final class ChatRequest {
3333
private final Optional<String> accepts;
3434

35+
private final Optional<Boolean> rawPrompting;
36+
3537
private final String message;
3638

3739
private final Optional<String> model;
@@ -84,6 +86,7 @@ public final class ChatRequest {
8486

8587
private ChatRequest(
8688
Optional<String> accepts,
89+
Optional<Boolean> rawPrompting,
8790
String message,
8891
Optional<String> model,
8992
Optional<String> preamble,
@@ -110,6 +113,7 @@ private ChatRequest(
110113
Optional<ChatRequestSafetyMode> safetyMode,
111114
Map<String, Object> additionalProperties) {
112115
this.accepts = accepts;
116+
this.rawPrompting = rawPrompting;
113117
this.message = message;
114118
this.model = model;
115119
this.preamble = preamble;
@@ -145,6 +149,16 @@ public Optional<String> getAccepts() {
145149
return accepts;
146150
}
147151

152+
/**
153+
* @return When enabled, the user's prompt will be sent to the model without
154+
* any pre-processing.
155+
* <p>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
156+
*/
157+
@JsonProperty("raw_prompting")
158+
public Optional<Boolean> getRawPrompting() {
159+
return rawPrompting;
160+
}
161+
148162
/**
149163
* @return Text input for the model to respond to.
150164
* <p>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
@@ -439,6 +453,7 @@ public Map<String, Object> getAdditionalProperties() {
439453

440454
private boolean equalTo(ChatRequest other) {
441455
return accepts.equals(other.accepts)
456+
&& rawPrompting.equals(other.rawPrompting)
442457
&& message.equals(other.message)
443458
&& model.equals(other.model)
444459
&& preamble.equals(other.preamble)
@@ -469,6 +484,7 @@ private boolean equalTo(ChatRequest other) {
469484
public int hashCode() {
470485
return Objects.hash(
471486
this.accepts,
487+
this.rawPrompting,
472488
this.message,
473489
this.model,
474490
this.preamble,
@@ -524,6 +540,15 @@ public interface _FinalStage {
524540

525541
_FinalStage accepts(String accepts);
526542

543+
/**
544+
* <p>When enabled, the user's prompt will be sent to the model without
545+
* any pre-processing.</p>
546+
* <p>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
547+
*/
548+
_FinalStage rawPrompting(Optional<Boolean> rawPrompting);
549+
550+
_FinalStage rawPrompting(Boolean rawPrompting);
551+
527552
/**
528553
* <p>The name of a compatible <a href="https://docs.cohere.com/docs/models">Cohere model</a> or the ID of a <a href="https://docs.cohere.com/docs/chat-fine-tuning">fine-tuned</a> model.</p>
529554
* <p>Compatible Deployments: Cohere Platform, Private Deployments</p>
@@ -813,6 +838,8 @@ public static final class Builder implements MessageStage, _FinalStage {
813838

814839
private Optional<String> model = Optional.empty();
815840

841+
private Optional<Boolean> rawPrompting = Optional.empty();
842+
816843
private Optional<String> accepts = Optional.empty();
817844

818845
@JsonAnySetter
@@ -823,6 +850,7 @@ private Builder() {}
823850
@java.lang.Override
824851
public Builder from(ChatRequest other) {
825852
accepts(other.getAccepts());
853+
rawPrompting(other.getRawPrompting());
826854
message(other.getMessage());
827855
model(other.getModel());
828856
preamble(other.getPreamble());
@@ -1477,6 +1505,30 @@ public _FinalStage model(Optional<String> model) {
14771505
return this;
14781506
}
14791507

1508+
/**
1509+
* <p>When enabled, the user's prompt will be sent to the model without
1510+
* any pre-processing.</p>
1511+
* <p>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
1512+
* @return Reference to {@code this} so that method calls can be chained together.
1513+
*/
1514+
@java.lang.Override
1515+
public _FinalStage rawPrompting(Boolean rawPrompting) {
1516+
this.rawPrompting = Optional.ofNullable(rawPrompting);
1517+
return this;
1518+
}
1519+
1520+
/**
1521+
* <p>When enabled, the user's prompt will be sent to the model without
1522+
* any pre-processing.</p>
1523+
* <p>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
1524+
*/
1525+
@java.lang.Override
1526+
@JsonSetter(value = "raw_prompting", nulls = Nulls.SKIP)
1527+
public _FinalStage rawPrompting(Optional<Boolean> rawPrompting) {
1528+
this.rawPrompting = rawPrompting;
1529+
return this;
1530+
}
1531+
14801532
/**
14811533
* <p>Pass text/event-stream to receive the streamed response as server-sent events. The default is <code>\n</code> delimited events.</p>
14821534
* @return Reference to {@code this} so that method calls can be chained together.
@@ -1501,6 +1553,7 @@ public _FinalStage accepts(Optional<String> accepts) {
15011553
public ChatRequest build() {
15021554
return new ChatRequest(
15031555
accepts,
1556+
rawPrompting,
15041557
message,
15051558
model,
15061559
preamble,

0 commit comments

Comments
 (0)