You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference.md
+38-42Lines changed: 38 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,21 @@ await client.checkApiKey();
63
63
<dl>
64
64
<dd>
65
65
66
+
#### 📝 Description
67
+
68
+
<dl>
69
+
<dd>
70
+
71
+
<dl>
72
+
<dd>
73
+
74
+
Generates a message from the model in response to a provided conversation. To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides.
Generates a message from the model in response to a provided conversation. To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides.
Copy file name to clipboardExpand all lines: src/Client.ts
+38-72Lines changed: 38 additions & 72 deletions
Original file line number
Diff line number
Diff line change
@@ -62,8 +62,8 @@ export class CohereClient {
62
62
: undefined,
63
63
"X-Fern-Language": "JavaScript",
64
64
"X-Fern-SDK-Name": "cohere-ai",
65
-
"X-Fern-SDK-Version": "7.12.1",
66
-
"User-Agent": "cohere-ai/7.12.1",
65
+
"X-Fern-SDK-Version": "7.13.0",
66
+
"User-Agent": "cohere-ai/7.13.0",
67
67
"X-Fern-Runtime": core.RUNTIME.type,
68
68
"X-Fern-Runtime-Version": core.RUNTIME.version,
69
69
},
@@ -233,8 +233,8 @@ export class CohereClient {
233
233
: undefined,
234
234
"X-Fern-Language": "JavaScript",
235
235
"X-Fern-SDK-Name": "cohere-ai",
236
-
"X-Fern-SDK-Version": "7.12.1",
237
-
"User-Agent": "cohere-ai/7.12.1",
236
+
"X-Fern-SDK-Version": "7.13.0",
237
+
"User-Agent": "cohere-ai/7.13.0",
238
238
"X-Fern-Runtime": core.RUNTIME.type,
239
239
"X-Fern-Runtime-Version": core.RUNTIME.version,
240
240
},
@@ -350,10 +350,9 @@ export class CohereClient {
350
350
}
351
351
352
352
/**
353
-
* > 🚧 Warning
354
-
* >
355
-
* > This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
356
-
*
353
+
* <Warning>
354
+
* This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
355
+
* </Warning>
357
356
* Generates realistic text conditioned on a given input.
358
357
*/
359
358
publicasyncgenerateStream(
@@ -374,8 +373,8 @@ export class CohereClient {
374
373
: undefined,
375
374
"X-Fern-Language": "JavaScript",
376
375
"X-Fern-SDK-Name": "cohere-ai",
377
-
"X-Fern-SDK-Version": "7.12.1",
378
-
"User-Agent": "cohere-ai/7.12.1",
376
+
"X-Fern-SDK-Version": "7.13.0",
377
+
"User-Agent": "cohere-ai/7.13.0",
379
378
"X-Fern-Runtime": core.RUNTIME.type,
380
379
"X-Fern-Runtime-Version": core.RUNTIME.version,
381
380
},
@@ -502,10 +501,9 @@ export class CohereClient {
502
501
}
503
502
504
503
/**
505
-
* > 🚧 Warning
506
-
* >
507
-
* > This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
508
-
*
504
+
* <Warning>
505
+
* This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
506
+
* </Warning>
509
507
* Generates realistic text conditioned on a given input.
* query: "What is the capital of the United States?",
849
-
* documents: ["Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."]
846
+
* query: "query",
847
+
* documents: ["documents"]
850
848
* })
851
849
*/
852
850
publicasyncrerank(
@@ -867,8 +865,8 @@ export class CohereClient {
867
865
: undefined,
868
866
"X-Fern-Language": "JavaScript",
869
867
"X-Fern-SDK-Name": "cohere-ai",
870
-
"X-Fern-SDK-Version": "7.12.1",
871
-
"User-Agent": "cohere-ai/7.12.1",
868
+
"X-Fern-SDK-Version": "7.13.0",
869
+
"User-Agent": "cohere-ai/7.13.0",
872
870
"X-Fern-Runtime": core.RUNTIME.type,
873
871
"X-Fern-Runtime-Version": core.RUNTIME.version,
874
872
},
@@ -1001,38 +999,7 @@ export class CohereClient {
1001
999
*
1002
1000
* @example
1003
1001
* await client.classify({
1004
-
* inputs: ["Confirm your email address", "hey i need u to send some $"],
1005
-
* examples: [{
1006
-
* text: "Dermatologists don't like her!",
1007
-
* label: "Spam"
1008
-
* }, {
1009
-
* text: "Hello, open to this?",
1010
-
* label: "Spam"
1011
-
* }, {
1012
-
* text: "I need help please wire me $1000 right now",
1013
-
* label: "Spam"
1014
-
* }, {
1015
-
* text: "Nice to know you ;)",
1016
-
* label: "Spam"
1017
-
* }, {
1018
-
* text: "Please help me?",
1019
-
* label: "Spam"
1020
-
* }, {
1021
-
* text: "Your parcel will be delivered today",
1022
-
* label: "Not spam"
1023
-
* }, {
1024
-
* text: "Review changes to our Terms and Conditions",
1025
-
* label: "Not spam"
1026
-
* }, {
1027
-
* text: "Weekly sync notes",
1028
-
* label: "Not spam"
1029
-
* }, {
1030
-
* text: "Re: Follow up from today\u2019s meeting",
1031
-
* label: "Not spam"
1032
-
* }, {
1033
-
* text: "Pre-read for tomorrow",
1034
-
* label: "Not spam"
1035
-
* }]
1002
+
* inputs: ["inputs"]
1036
1003
* })
1037
1004
*/
1038
1005
publicasyncclassify(
@@ -1053,8 +1020,8 @@ export class CohereClient {
1053
1020
: undefined,
1054
1021
"X-Fern-Language": "JavaScript",
1055
1022
"X-Fern-SDK-Name": "cohere-ai",
1056
-
"X-Fern-SDK-Version": "7.12.1",
1057
-
"User-Agent": "cohere-ai/7.12.1",
1023
+
"X-Fern-SDK-Version": "7.13.0",
1024
+
"User-Agent": "cohere-ai/7.13.0",
1058
1025
"X-Fern-Runtime": core.RUNTIME.type,
1059
1026
"X-Fern-Runtime-Version": core.RUNTIME.version,
1060
1027
},
@@ -1167,10 +1134,9 @@ export class CohereClient {
1167
1134
}
1168
1135
1169
1136
/**
1170
-
* > 🚧 Warning
1171
-
* >
1172
-
* > This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
1173
-
*
1137
+
* <Warning>
1138
+
* This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
1139
+
* </Warning>
1174
1140
* Generates a summary in English for a given text.
1175
1141
*
1176
1142
* @param {Cohere.SummarizeRequest} request
@@ -1190,7 +1156,7 @@ export class CohereClient {
1190
1156
*
1191
1157
* @example
1192
1158
* await client.summarize({
1193
-
* text: "Ice cream is a sweetened frozen food typically eaten as a snack or dessert. It may be made from milk or cream and is flavoured with a sweetener, either sugar or an alternative, and a spice, such as cocoa or vanilla, or with fruit such as strawberries or peaches. It can also be made by whisking a flavored cream base and liquid nitrogen together. Food coloring is sometimes added, in addition to stabilizers. The mixture is cooled below the freezing point of water and stirred to incorporate air spaces and to prevent detectable ice crystals from forming. The result is a smooth, semi-solid foam that is solid at very low temperatures (below 2 \u00B0C or 35 \u00B0F). It becomes more malleable as its temperature increases.\n\nThe meaning of the name \"ice cream\" varies from one country to another. In some countries, such as the United States, \"ice cream\" applies only to a specific variety, and most governments regulate the commercial use of the various terms according to the relative quantities of the main ingredients, notably the amount of cream. Products that do not meet the criteria to be called ice cream are sometimes labelled \"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, one word is used fo\r all variants. Analogues made from dairy alternatives, such as goat's or sheep's milk, or milk substitutes (e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are lactose intolerant, allergic to dairy protein or vegan."
0 commit comments