Skip to content

Commit

Permalink
🌿 Fern Regeneration -- August 9, 2024 (#192)
Browse files Browse the repository at this point in the history
* SDK regeneration

* Fixes

readble-stream

* Add client v2 and snippets

* bind(this)

* Fix bind

---------

Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Co-authored-by: Billy Trend <[email protected]>
  • Loading branch information
fern-api[bot] and billytrend-cohere authored Aug 9, 2024
1 parent 2e1c087 commit 8ca2163
Show file tree
Hide file tree
Showing 159 changed files with 3,496 additions and 233 deletions.
3 changes: 2 additions & 1 deletion .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ src/AwsClient.ts
src/SagemakerClient.ts
src/index.ts
src/aws-utils.ts
src/core/streaming-fetcher/streaming-utils.ts
src/core/streaming-fetcher/streaming-utils.ts
src/ClientV2.ts
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.11.2",
"version": "7.12.0",
"private": false,
"repository": "https://github.com/cohere-ai/cohere-typescript",
"main": "./index.js",
Expand Down
177 changes: 177 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,183 @@ 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>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.v2.chatStream({
model: "string",
messages: [
{
role: "assistant",
toolCalls: [
{
id: "string",
type: "function",
function: {
name: "string",
arguments: "string",
},
},
],
toolPlan: "string",
content: [
{
text: "string",
},
],
citations: [
{
start: "string",
end: "string",
text: "string",
sources: [
{
type: "tool",
id: "string",
toolOutput: {
string: {
key: "value",
},
},
},
],
},
],
},
],
tools: [
{
type: "function",
function: {
name: "string",
description: "string",
parameters: {
string: {
key: "value",
},
},
},
},
],
toolChoice: Cohere.V2ChatStreamRequestToolChoice.Auto,
citationMode: Cohere.V2ChatStreamRequestCitationMode.Fast,
truncationMode: Cohere.V2ChatStreamRequestTruncationMode.Off,
responseFormat: {
type: "json_object",
schema: {
string: {
key: "value",
},
},
},
maxTokens: 1,
stopSequences: ["string"],
maxInputTokens: 1,
temperature: 1.1,
seed: 1,
frequencyPenalty: 1.1,
presencePenalty: 1.1,
k: 1,
p: 1,
returnPrompt: true,
});
```

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

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Cohere.V2ChatStreamRequest`

</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">chat</a>({ ...params }) -> Cohere.NonStreamedChatResponse2</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.v2.chat({
model: "model",
messages: [],
});
```

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

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Cohere.V2ChatRequest`

</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
Loading

0 comments on commit 8ca2163

Please sign in to comment.