3232public 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