Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Sep 19, 2024
1 parent 80d9420 commit 126310e
Show file tree
Hide file tree
Showing 185 changed files with 2,490 additions and 1,331 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cohere-ai",
"version": "7.13.1",
"version": "7.13.2",
"private": false,
"repository": "https://github.com/cohere-ai/cohere-typescript",
"main": "./index.js",
Expand Down
156 changes: 145 additions & 11 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ await client.checkApiKey();

## V2

<details><summary><code>client.v2.<a href="/src/api/resources/v2/client/Client.ts">chatStream</a>({ ...params }) -> core.Stream<Cohere.StreamedChatResponse2></code></summary>
<details><summary><code>client.v2.<a href="/src/api/resources/v2/client/Client.ts">chatStream</a>({ ...params }) -> core.Stream<Cohere.StreamedChatResponseV2></code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -93,13 +93,6 @@ await client.v2.chatStream({
{
role: "user",
content: "string",
documents: [
{
string: {
key: "value",
},
},
],
},
],
tools: [
Expand All @@ -116,7 +109,10 @@ await client.v2.chatStream({
},
},
],
citationMode: Cohere.V2ChatStreamRequestCitationMode.Fast,
documents: ["string"],
citationOptions: {
mode: Cohere.CitationOptionsMode.Fast,
},
responseFormat: {
type: "text",
},
Expand Down Expand Up @@ -165,7 +161,7 @@ await client.v2.chatStream({
</dl>
</details>

<details><summary><code>client.v2.<a href="/src/api/resources/v2/client/Client.ts">chat</a>({ ...params }) -> Cohere.NonStreamedChatResponse2</code></summary>
<details><summary><code>client.v2.<a href="/src/api/resources/v2/client/Client.ts">chat</a>({ ...params }) -> Cohere.ChatResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -199,7 +195,7 @@ await client.v2.chat({
{
role: "tool",
toolCallId: "messages",
toolContent: ["messages"],
toolContent: "messages",
},
],
});
Expand Down Expand Up @@ -237,6 +233,144 @@ await client.v2.chat({
</dl>
</details>

<details><summary><code>client.v2.<a href="/src/api/resources/v2/client/Client.ts">embed</a>({ ...params }) -> Cohere.EmbedByTypeResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.

Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.

If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search).

</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.v2.embed({
inputType: "image",
images: ["string"],
model: "string",
});
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Cohere.EmbedRequestV2`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `V2.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>

<details><summary><code>client.v2.<a href="/src/api/resources/v2/client/Client.ts">rerank</a>({ ...params }) -> Cohere.V2RerankResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score.

</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.v2.rerank({
model: "model",
query: "query",
documents: ["documents"],
});
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Cohere.V2RerankRequest`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `V2.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>

## EmbedJobs

<details><summary><code>client.embedJobs.<a href="/src/api/resources/embedJobs/client/Client.ts">list</a>() -> Cohere.ListEmbedJobResponse</code></summary>
Expand Down
48 changes: 24 additions & 24 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class CohereClient {

/**
* Generates a text response to a user message.
* To learn how to use the Chat API with Streaming and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).
* To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).
*/
public async chatStream(
request: Cohere.ChatStreamRequest,
Expand All @@ -63,8 +63,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Accepts: accepts != null ? accepts : undefined,
Expand Down Expand Up @@ -193,7 +193,7 @@ export class CohereClient {

/**
* Generates a text response to a user message.
* To learn how to use the Chat API with Streaming and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).
* To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).
*
* @param {Cohere.ChatRequest} request
* @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
Expand Down Expand Up @@ -241,8 +241,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Accepts: accepts != null ? accepts : undefined,
Expand Down Expand Up @@ -382,8 +382,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -553,8 +553,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -712,8 +712,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -867,8 +867,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1022,8 +1022,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1179,8 +1179,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1334,8 +1334,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1489,8 +1489,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1637,8 +1637,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-SDK-Version": "7.13.2",
"User-Agent": "cohere-ai/7.13.2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
Loading

0 comments on commit 126310e

Please sign in to comment.