Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 Fern Regeneration -- November 15, 2024 #35

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4.0'
version = '1.4.1'
from components.java
pom {
name = 'cohere'
Expand Down
30 changes: 15 additions & 15 deletions src/main/java/com/cohere/api/Cohere.java
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public NonStreamedChatResponse chat(ChatRequest request, RequestOptions requestO

/**
* <p>&lt;Warning&gt;
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* &lt;/Warning&gt;
* Generates realistic text conditioned on a given input.</p>
*/
Expand All @@ -442,7 +442,7 @@ public Iterable<GenerateStreamedResponse> generateStream(GenerateStreamRequest r

/**
* <p>&lt;Warning&gt;
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* &lt;/Warning&gt;
* Generates realistic text conditioned on a given input.</p>
*/
Expand Down Expand Up @@ -526,7 +526,7 @@ public Iterable<GenerateStreamedResponse> generateStream(

/**
* <p>&lt;Warning&gt;
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* &lt;/Warning&gt;
* Generates realistic text conditioned on a given input.</p>
*/
Expand All @@ -536,7 +536,7 @@ public Generation generate(GenerateRequest request) {

/**
* <p>&lt;Warning&gt;
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* &lt;/Warning&gt;
* Generates realistic text conditioned on a given input.</p>
*/
Expand Down Expand Up @@ -617,27 +617,27 @@ public Generation generate(GenerateRequest request, RequestOptions requestOption
}

/**
* This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
* <p>Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.</p>
* <p>If you want to learn more how to use the embedding model, have a look at the <a href="/docs/semantic-search">Semantic Search Guide</a>.</p>
* This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents.
* <p>Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.</p>
* <p>If you want to learn more how to use the embedding model, have a look at the <a href="https://docs.cohere.com/docs/semantic-search">Semantic Search Guide</a>.</p>
*/
public EmbedResponse embed() {
return embed(EmbedRequest.builder().build());
}

/**
* This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
* <p>Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.</p>
* <p>If you want to learn more how to use the embedding model, have a look at the <a href="/docs/semantic-search">Semantic Search Guide</a>.</p>
* This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents.
* <p>Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.</p>
* <p>If you want to learn more how to use the embedding model, have a look at the <a href="https://docs.cohere.com/docs/semantic-search">Semantic Search Guide</a>.</p>
*/
public EmbedResponse embed(EmbedRequest request) {
return embed(request, null);
}

/**
* This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
* <p>Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.</p>
* <p>If you want to learn more how to use the embedding model, have a look at the <a href="/docs/semantic-search">Semantic Search Guide</a>.</p>
* This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents.
* <p>Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.</p>
* <p>If you want to learn more how to use the embedding model, have a look at the <a href="https://docs.cohere.com/docs/semantic-search">Semantic Search Guide</a>.</p>
*/
public EmbedResponse embed(EmbedRequest request, RequestOptions requestOptions) {
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
Expand Down Expand Up @@ -891,7 +891,7 @@ public ClassifyResponse classify(ClassifyRequest request, RequestOptions request

/**
* <p>&lt;Warning&gt;
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* &lt;/Warning&gt;
* Generates a summary in English for a given text.</p>
*/
Expand All @@ -901,7 +901,7 @@ public SummarizeResponse summarize(SummarizeRequest request) {

/**
* <p>&lt;Warning&gt;
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* This API is marked as &quot;Legacy&quot; and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* &lt;/Warning&gt;
* Generates a summary in English for a given text.</p>
*/
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.4.0");
put("X-Fern-SDK-Version", "1.4.1");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/cohere/api/requests/ChatRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public Optional<ChatRequestPromptTruncation> getPromptTruncation() {
}

/**
* @return Accepts <code>{&quot;id&quot;: &quot;web-search&quot;}</code>, and/or the <code>&quot;id&quot;</code> for a custom <a href="https://docs.cohere.com/docs/connectors">connector</a>, if you've <a href="https://docs.cohere.com/docs/creating-and-deploying-a-connector">created</a> one.
* @return Accepts <code>{&quot;id&quot;: &quot;web-search&quot;}</code>, and/or the <code>&quot;id&quot;</code> for a custom <a href="https://docs.cohere.com/docs/connectors">connector</a>, if you've <a href="https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector">created</a> one.
* <p>When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).</p>
* <p>Compatible Deployments: Cohere Platform</p>
*/
Expand Down Expand Up @@ -440,10 +440,10 @@ public Optional<ResponseFormat> getResponseFormat() {
}

/**
* @return Used to select the <a href="/docs/safety-modes">safety instruction</a> inserted into the prompt. Defaults to <code>CONTEXTUAL</code>.
* @return Used to select the <a href="https://docs.cohere.com/docs/safety-modes">safety instruction</a> inserted into the prompt. Defaults to <code>CONTEXTUAL</code>.
* 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="/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</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>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
*/
@JsonProperty("safety_mode")
Expand Down Expand Up @@ -753,10 +753,10 @@ public _FinalStage message(String message) {
}

/**
* <p>Used to select the <a href="/docs/safety-modes">safety instruction</a> inserted into the prompt. Defaults to <code>CONTEXTUAL</code>.
* <p>Used to select the <a href="https://docs.cohere.com/docs/safety-modes">safety instruction</a> inserted into the prompt. Defaults to <code>CONTEXTUAL</code>.
* 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="/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</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>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 Expand Up @@ -1134,7 +1134,7 @@ public _FinalStage searchQueriesOnly(Optional<Boolean> searchQueriesOnly) {
}

/**
* <p>Accepts <code>{&quot;id&quot;: &quot;web-search&quot;}</code>, and/or the <code>&quot;id&quot;</code> for a custom <a href="https://docs.cohere.com/docs/connectors">connector</a>, if you've <a href="https://docs.cohere.com/docs/creating-and-deploying-a-connector">created</a> one.</p>
* <p>Accepts <code>{&quot;id&quot;: &quot;web-search&quot;}</code>, and/or the <code>&quot;id&quot;</code> for a custom <a href="https://docs.cohere.com/docs/connectors">connector</a>, if you've <a href="https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector">created</a> one.</p>
* <p>When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).</p>
* <p>Compatible Deployments: Cohere Platform</p>
* @return Reference to {@code this} so that method calls can be chained together.
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/cohere/api/requests/ChatStreamRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public Optional<ChatStreamRequestPromptTruncation> getPromptTruncation() {
}

/**
* @return Accepts <code>{&quot;id&quot;: &quot;web-search&quot;}</code>, and/or the <code>&quot;id&quot;</code> for a custom <a href="https://docs.cohere.com/docs/connectors">connector</a>, if you've <a href="https://docs.cohere.com/docs/creating-and-deploying-a-connector">created</a> one.
* @return Accepts <code>{&quot;id&quot;: &quot;web-search&quot;}</code>, and/or the <code>&quot;id&quot;</code> for a custom <a href="https://docs.cohere.com/docs/connectors">connector</a>, if you've <a href="https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector">created</a> one.
* <p>When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).</p>
* <p>Compatible Deployments: Cohere Platform</p>
*/
Expand Down Expand Up @@ -440,10 +440,10 @@ public Optional<ResponseFormat> getResponseFormat() {
}

/**
* @return Used to select the <a href="/docs/safety-modes">safety instruction</a> inserted into the prompt. Defaults to <code>CONTEXTUAL</code>.
* @return Used to select the <a href="https://docs.cohere.com/docs/safety-modes">safety instruction</a> inserted into the prompt. Defaults to <code>CONTEXTUAL</code>.
* 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="/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</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>Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments</p>
*/
@JsonProperty("safety_mode")
Expand Down Expand Up @@ -753,10 +753,10 @@ public _FinalStage message(String message) {
}

/**
* <p>Used to select the <a href="/docs/safety-modes">safety instruction</a> inserted into the prompt. Defaults to <code>CONTEXTUAL</code>.
* <p>Used to select the <a href="https://docs.cohere.com/docs/safety-modes">safety instruction</a> inserted into the prompt. Defaults to <code>CONTEXTUAL</code>.
* 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="/docs/command-r#august-2024-release">Command R 08-2024</a>, <a href="/docs/command-r-plus#august-2024-release">Command R+ 08-2024</a> and newer.</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>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 Expand Up @@ -1134,7 +1134,7 @@ public _FinalStage searchQueriesOnly(Optional<Boolean> searchQueriesOnly) {
}

/**
* <p>Accepts <code>{&quot;id&quot;: &quot;web-search&quot;}</code>, and/or the <code>&quot;id&quot;</code> for a custom <a href="https://docs.cohere.com/docs/connectors">connector</a>, if you've <a href="https://docs.cohere.com/docs/creating-and-deploying-a-connector">created</a> one.</p>
* <p>Accepts <code>{&quot;id&quot;: &quot;web-search&quot;}</code>, and/or the <code>&quot;id&quot;</code> for a custom <a href="https://docs.cohere.com/docs/connectors">connector</a>, if you've <a href="https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector">created</a> one.</p>
* <p>When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).</p>
* <p>Compatible Deployments: Cohere Platform</p>
* @return Reference to {@code this} so that method calls can be chained together.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cohere/api/requests/EmbedRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public Optional<List<String>> getImages() {

/**
* @return Defaults to embed-english-v2.0
* <p>The identifier of the model. Smaller &quot;light&quot; models are faster, while larger models will perform better. <a href="/docs/training-custom-models">Custom models</a> can also be supplied with their full ID.</p>
* <p>The identifier of the model. Smaller &quot;light&quot; models are faster, while larger models will perform better. <a href="https://docs.cohere.com/docs/training-custom-models">Custom models</a> can also be supplied with their full ID.</p>
* <p>Available models and corresponding embedding dimensions:</p>
* <ul>
* <li>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/cohere/api/requests/GenerateRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public String getPrompt() {

/**
* @return The identifier of the model to generate with. Currently available models are <code>command</code> (default), <code>command-nightly</code> (experimental), <code>command-light</code>, and <code>command-light-nightly</code> (experimental).
* Smaller, &quot;light&quot; models are faster, while larger models will perform better. <a href="/docs/training-custom-models">Custom models</a> can also be supplied with their full ID.
* Smaller, &quot;light&quot; models are faster, while larger models will perform better. <a href="https://docs.cohere.com/docs/training-custom-models">Custom models</a> can also be supplied with their full ID.
*/
@JsonProperty("model")
public Optional<String> getModel() {
Expand Down Expand Up @@ -715,7 +715,7 @@ public _FinalStage numGenerations(Optional<Integer> numGenerations) {

/**
* <p>The identifier of the model to generate with. Currently available models are <code>command</code> (default), <code>command-nightly</code> (experimental), <code>command-light</code>, and <code>command-light-nightly</code> (experimental).
* Smaller, &quot;light&quot; models are faster, while larger models will perform better. <a href="/docs/training-custom-models">Custom models</a> can also be supplied with their full ID.</p>
* Smaller, &quot;light&quot; models are faster, while larger models will perform better. <a href="https://docs.cohere.com/docs/training-custom-models">Custom models</a> can also be supplied with their full ID.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
Expand Down
Loading