Skip to content

Commit

Permalink
SDK regeneration (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored Jan 3, 2025
1 parent 1133931 commit 10b39d6
Show file tree
Hide file tree
Showing 22 changed files with 392 additions and 368 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Cohere.
Copyright (c) 2025 Cohere.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.cohere'
artifactId = 'cohere-java'
version = '1.5.0'
version = '1.6.0'
from components.java
pom {
name = 'cohere'
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cohere/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private ClientOptions(
{
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.cohere.fern:api-sdk");
put("X-Fern-SDK-Version", "1.5.0");
put("X-Fern-SDK-Version", "1.6.0");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/cohere/api/requests/ChatRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ public Optional<ResponseFormat> getResponseFormat() {
* When <code>NONE</code> is specified, the safety instruction will be omitted.
* <p>Safety modes are not yet configurable in combination with <code>tools</code>, <code>tool_results</code> and <code>documents</code> parameters.</p>
* <p><strong>Note</strong>: This parameter is only compatible with models <a href="https://docs.cohere.com/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="https://docs.cohere.com/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</p>
* <p><strong>Note</strong>: <code>command-r7b-12-2024</code> only supports <code>&quot;CONTEXTUAL&quot;</code> and <code>&quot;STRICT&quot;</code> modes.</p>
* <p>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
*/
@JsonProperty("safety_mode")
Expand Down Expand Up @@ -757,6 +758,7 @@ public _FinalStage message(String message) {
* When <code>NONE</code> is specified, the safety instruction will be omitted.</p>
* <p>Safety modes are not yet configurable in combination with <code>tools</code>, <code>tool_results</code> and <code>documents</code> parameters.</p>
* <p><strong>Note</strong>: This parameter is only compatible with models <a href="https://docs.cohere.com/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="https://docs.cohere.com/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</p>
* <p><strong>Note</strong>: <code>command-r7b-12-2024</code> only supports <code>&quot;CONTEXTUAL&quot;</code> and <code>&quot;STRICT&quot;</code> modes.</p>
* <p>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/cohere/api/requests/ChatStreamRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ public Optional<ResponseFormat> getResponseFormat() {
* When <code>NONE</code> is specified, the safety instruction will be omitted.
* <p>Safety modes are not yet configurable in combination with <code>tools</code>, <code>tool_results</code> and <code>documents</code> parameters.</p>
* <p><strong>Note</strong>: This parameter is only compatible with models <a href="https://docs.cohere.com/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="https://docs.cohere.com/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</p>
* <p><strong>Note</strong>: <code>command-r7b-12-2024</code> only supports <code>&quot;CONTEXTUAL&quot;</code> and <code>&quot;STRICT&quot;</code> modes.</p>
* <p>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
*/
@JsonProperty("safety_mode")
Expand Down Expand Up @@ -757,6 +758,7 @@ public _FinalStage message(String message) {
* When <code>NONE</code> is specified, the safety instruction will be omitted.</p>
* <p>Safety modes are not yet configurable in combination with <code>tools</code>, <code>tool_results</code> and <code>documents</code> parameters.</p>
* <p><strong>Note</strong>: This parameter is only compatible with models <a href="https://docs.cohere.com/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="https://docs.cohere.com/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</p>
* <p><strong>Note</strong>: <code>command-r7b-12-2024</code> only supports <code>&quot;CONTEXTUAL&quot;</code> and <code>&quot;STRICT&quot;</code> modes.</p>
* <p>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/cohere/api/requests/GenerateRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ public Optional<Double> getPresencePenalty() {
}

/**
* @return One of <code>GENERATION|ALL|NONE</code> to specify how and if the token likelihoods are returned with the response. Defaults to <code>NONE</code>.
* @return One of <code>GENERATION|NONE</code> to specify how and if the token likelihoods are returned with the response. Defaults to <code>NONE</code>.
* <p>If <code>GENERATION</code> is selected, the token likelihoods will only be provided for generated text.</p>
* <p>If <code>ALL</code> is selected, the token likelihoods will be provided both for the prompt and the generated text.</p>
* <p>WARNING: <code>ALL</code> is deprecated, and will be removed in a future release.</p>
*/
@JsonProperty("return_likelihoods")
public Optional<GenerateRequestReturnLikelihoods> getReturnLikelihoods() {
Expand Down Expand Up @@ -476,9 +476,9 @@ public _FinalStage rawPrompting(Optional<Boolean> rawPrompting) {
}

/**
* <p>One of <code>GENERATION|ALL|NONE</code> to specify how and if the token likelihoods are returned with the response. Defaults to <code>NONE</code>.</p>
* <p>One of <code>GENERATION|NONE</code> to specify how and if the token likelihoods are returned with the response. Defaults to <code>NONE</code>.</p>
* <p>If <code>GENERATION</code> is selected, the token likelihoods will only be provided for generated text.</p>
* <p>If <code>ALL</code> is selected, the token likelihoods will be provided both for the prompt and the generated text.</p>
* <p>WARNING: <code>ALL</code> is deprecated, and will be removed in a future release.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ public Optional<Double> getPresencePenalty() {
}

/**
* @return One of <code>GENERATION|ALL|NONE</code> to specify how and if the token likelihoods are returned with the response. Defaults to <code>NONE</code>.
* @return One of <code>GENERATION|NONE</code> to specify how and if the token likelihoods are returned with the response. Defaults to <code>NONE</code>.
* <p>If <code>GENERATION</code> is selected, the token likelihoods will only be provided for generated text.</p>
* <p>If <code>ALL</code> is selected, the token likelihoods will be provided both for the prompt and the generated text.</p>
* <p>WARNING: <code>ALL</code> is deprecated, and will be removed in a future release.</p>
*/
@JsonProperty("return_likelihoods")
public Optional<GenerateStreamRequestReturnLikelihoods> getReturnLikelihoods() {
Expand Down Expand Up @@ -476,9 +476,9 @@ public _FinalStage rawPrompting(Optional<Boolean> rawPrompting) {
}

/**
* <p>One of <code>GENERATION|ALL|NONE</code> to specify how and if the token likelihoods are returned with the response. Defaults to <code>NONE</code>.</p>
* <p>One of <code>GENERATION|NONE</code> to specify how and if the token likelihoods are returned with the response. Defaults to <code>NONE</code>.</p>
* <p>If <code>GENERATION</code> is selected, the token likelihoods will only be provided for generated text.</p>
* <p>If <code>ALL</code> is selected, the token likelihoods will be provided both for the prompt and the generated text.</p>
* <p>WARNING: <code>ALL</code> is deprecated, and will be removed in a future release.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/cohere/api/requests/RerankRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private RerankRequest(
}

/**
* @return The identifier of the model to use, one of : <code>rerank-english-v3.0</code>, <code>rerank-multilingual-v3.0</code>, <code>rerank-english-v2.0</code>, <code>rerank-multilingual-v2.0</code>
* @return The identifier of the model to use, eg <code>rerank-v3.5</code>.
*/
@JsonProperty("model")
public Optional<String> getModel() {
Expand Down Expand Up @@ -348,7 +348,7 @@ public _FinalStage documents(List<RerankRequestDocumentsItem> documents) {
}

/**
* <p>The identifier of the model to use, one of : <code>rerank-english-v3.0</code>, <code>rerank-multilingual-v3.0</code>, <code>rerank-english-v2.0</code>, <code>rerank-multilingual-v2.0</code></p>
* <p>The identifier of the model to use, eg <code>rerank-v3.5</code>.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public Optional<List<ToolV2>> getTools() {
}

/**
* @return When set to <code>true</code>, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the <a href="https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools">Strict Tools guide</a>.
* @return When set to <code>true</code>, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the <a href="https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools">Structured Outputs (Tools) guide</a>.
* <p><strong>Note</strong>: The first few requests with a new set of tools will take longer to process.</p>
*/
@JsonProperty("strict_tools")
Expand Down Expand Up @@ -172,6 +172,7 @@ public Optional<ResponseFormatV2> getResponseFormat() {
* When <code>OFF</code> is specified, the safety instruction will be omitted.
* <p>Safety modes are not yet configurable in combination with <code>tools</code>, <code>tool_results</code> and <code>documents</code> parameters.</p>
* <p><strong>Note</strong>: This parameter is only compatible with models <a href="https://docs.cohere.com/v2/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="https://docs.cohere.com/v2/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</p>
* <p><strong>Note</strong>: <code>command-r7b-12-2024</code> only supports <code>&quot;CONTEXTUAL&quot;</code> and <code>&quot;STRICT&quot;</code> modes.</p>
*/
@JsonProperty("safety_mode")
public Optional<V2ChatRequestSafetyMode> getSafetyMode() {
Expand Down Expand Up @@ -674,6 +675,7 @@ public _FinalStage maxTokens(Optional<Integer> maxTokens) {
* When <code>OFF</code> is specified, the safety instruction will be omitted.</p>
* <p>Safety modes are not yet configurable in combination with <code>tools</code>, <code>tool_results</code> and <code>documents</code> parameters.</p>
* <p><strong>Note</strong>: This parameter is only compatible with models <a href="https://docs.cohere.com/v2/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="https://docs.cohere.com/v2/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</p>
* <p><strong>Note</strong>: <code>command-r7b-12-2024</code> only supports <code>&quot;CONTEXTUAL&quot;</code> and <code>&quot;STRICT&quot;</code> modes.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand Down Expand Up @@ -733,7 +735,7 @@ public _FinalStage documents(Optional<List<V2ChatRequestDocumentsItem>> document
}

/**
* <p>When set to <code>true</code>, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the <a href="https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools">Strict Tools guide</a>.</p>
* <p>When set to <code>true</code>, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the <a href="https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools">Structured Outputs (Tools) guide</a>.</p>
* <p><strong>Note</strong>: The first few requests with a new set of tools will take longer to process.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public Optional<List<ToolV2>> getTools() {
}

/**
* @return When set to <code>true</code>, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the <a href="https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools">Strict Tools guide</a>.
* @return When set to <code>true</code>, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the <a href="https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools">Structured Outputs (Tools) guide</a>.
* <p><strong>Note</strong>: The first few requests with a new set of tools will take longer to process.</p>
*/
@JsonProperty("strict_tools")
Expand Down Expand Up @@ -172,6 +172,7 @@ public Optional<ResponseFormatV2> getResponseFormat() {
* When <code>OFF</code> is specified, the safety instruction will be omitted.
* <p>Safety modes are not yet configurable in combination with <code>tools</code>, <code>tool_results</code> and <code>documents</code> parameters.</p>
* <p><strong>Note</strong>: This parameter is only compatible with models <a href="https://docs.cohere.com/v2/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="https://docs.cohere.com/v2/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</p>
* <p><strong>Note</strong>: <code>command-r7b-12-2024</code> only supports <code>&quot;CONTEXTUAL&quot;</code> and <code>&quot;STRICT&quot;</code> modes.</p>
*/
@JsonProperty("safety_mode")
public Optional<V2ChatStreamRequestSafetyMode> getSafetyMode() {
Expand Down Expand Up @@ -674,6 +675,7 @@ public _FinalStage maxTokens(Optional<Integer> maxTokens) {
* When <code>OFF</code> is specified, the safety instruction will be omitted.</p>
* <p>Safety modes are not yet configurable in combination with <code>tools</code>, <code>tool_results</code> and <code>documents</code> parameters.</p>
* <p><strong>Note</strong>: This parameter is only compatible with models <a href="https://docs.cohere.com/v2/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="https://docs.cohere.com/v2/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</p>
* <p><strong>Note</strong>: <code>command-r7b-12-2024</code> only supports <code>&quot;CONTEXTUAL&quot;</code> and <code>&quot;STRICT&quot;</code> modes.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand Down Expand Up @@ -733,7 +735,7 @@ public _FinalStage documents(Optional<List<V2ChatStreamRequestDocumentsItem>> do
}

/**
* <p>When set to <code>true</code>, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the <a href="https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools">Strict Tools guide</a>.</p>
* <p>When set to <code>true</code>, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the <a href="https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools">Structured Outputs (Tools) guide</a>.</p>
* <p><strong>Note</strong>: The first few requests with a new set of tools will take longer to process.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,7 @@ private V2RerankRequest(
}

/**
* @return The identifier of the model to use.
* <p>Supported models:</p>
* <ul>
* <li><code>rerank-english-v3.0</code></li>
* <li><code>rerank-multilingual-v3.0</code></li>
* <li><code>rerank-english-v2.0</code></li>
* <li><code>rerank-multilingual-v2.0</code></li>
* </ul>
* @return The identifier of the model to use, eg <code>rerank-v3.5</code>.
*/
@JsonProperty("model")
public String getModel() {
Expand Down Expand Up @@ -212,14 +205,7 @@ public Builder from(V2RerankRequest other) {
}

/**
* <p>The identifier of the model to use.</p>
* <p>Supported models:</p>
* <ul>
* <li><code>rerank-english-v3.0</code></li>
* <li><code>rerank-multilingual-v3.0</code></li>
* <li><code>rerank-english-v2.0</code></li>
* <li><code>rerank-multilingual-v2.0</code></li>
* </ul>
* <p>The identifier of the model to use, eg <code>rerank-v3.5</code>.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand Down
Loading

0 comments on commit 10b39d6

Please sign in to comment.