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
Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
271
+
Defaults to `"enabled"`.
272
+
Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`.
Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
571
+
Defaults to `"enabled"`.
572
+
Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`.
from cohere import ChatbotMessage, ChatConnector, Client, UserMessage
701
+
from cohere import Client
703
702
704
703
client = Client(
705
704
client_name="YOUR_CLIENT_NAME",
706
705
token="YOUR_TOKEN",
707
706
)
708
707
client.chat(
709
-
chat_history=[
710
-
UserMessage(
711
-
message="Who discovered gravity?",
712
-
),
713
-
ChatbotMessage(
714
-
message="The man who is widely credited with discovering gravity is Sir Isaac Newton",
715
-
),
716
-
],
717
-
message="What year was he born?",
718
-
connectors=[
719
-
ChatConnector(
720
-
id="web-search",
721
-
)
722
-
],
708
+
model="command-a-03-2025",
709
+
message="Tell me about LLMs",
723
710
)
724
711
"""
725
712
_response=self._raw_client.chat(
@@ -1073,7 +1060,7 @@ def embed(
1073
1060
images : typing.Optional[typing.Sequence[str]]
1074
1061
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
1075
1062
1076
-
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`or `image/png` format and has a maximum size of 5MB.
1063
+
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
1077
1064
1078
1065
Images are only supported with Embed v3.0 and newer models.
Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
1714
+
Defaults to `"enabled"`.
1715
+
Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`.
Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
2023
+
Defaults to `"enabled"`.
2024
+
Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`.
from cohere import AsyncClient, ChatbotMessage, ChatConnector, UserMessage
2155
+
from cohere import AsyncClient
2170
2156
2171
2157
client = AsyncClient(
2172
2158
client_name="YOUR_CLIENT_NAME",
@@ -2176,20 +2162,8 @@ async def chat(
2176
2162
2177
2163
async def main() -> None:
2178
2164
await client.chat(
2179
-
chat_history=[
2180
-
UserMessage(
2181
-
message="Who discovered gravity?",
2182
-
),
2183
-
ChatbotMessage(
2184
-
message="The man who is widely credited with discovering gravity is Sir Isaac Newton",
2185
-
),
2186
-
],
2187
-
message="What year was he born?",
2188
-
connectors=[
2189
-
ChatConnector(
2190
-
id="web-search",
2191
-
)
2192
-
],
2165
+
model="command-a-03-2025",
2166
+
message="Tell me about LLMs",
2193
2167
)
2194
2168
2195
2169
@@ -2563,7 +2537,7 @@ async def embed(
2563
2537
images : typing.Optional[typing.Sequence[str]]
2564
2538
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
2565
2539
2566
-
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`or `image/png` format and has a maximum size of 5MB.
2540
+
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
2567
2541
2568
2542
Images are only supported with Embed v3.0 and newer models.
Copy file name to clipboardExpand all lines: src/cohere/datasets/client.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,7 @@ def create(
120
120
The name of the uploaded dataset.
121
121
122
122
type : DatasetType
123
-
The dataset type, which is used to validate the data. Valid types are `embed-input`, `reranker-finetune-input`, `single-label-classification-finetune-input`, `chat-finetune-input`, and `multi-label-classification-finetune-input`.
123
+
The dataset type, which is used to validate the data. The only valid type is `embed-input` used in conjunction with the Embed Jobs API.
124
124
125
125
data : core.File
126
126
See core.File for more documentation
@@ -384,7 +384,7 @@ async def create(
384
384
The name of the uploaded dataset.
385
385
386
386
type : DatasetType
387
-
The dataset type, which is used to validate the data. Valid types are `embed-input`, `reranker-finetune-input`, `single-label-classification-finetune-input`, `chat-finetune-input`, and `multi-label-classification-finetune-input`.
387
+
The dataset type, which is used to validate the data. The only valid type is `embed-input` used in conjunction with the Embed Jobs API.
Copy file name to clipboardExpand all lines: src/cohere/datasets/raw_client.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -265,7 +265,7 @@ def create(
265
265
The name of the uploaded dataset.
266
266
267
267
type : DatasetType
268
-
The dataset type, which is used to validate the data. Valid types are `embed-input`, `reranker-finetune-input`, `single-label-classification-finetune-input`, `chat-finetune-input`, and `multi-label-classification-finetune-input`.
268
+
The dataset type, which is used to validate the data. The only valid type is `embed-input` used in conjunction with the Embed Jobs API.
269
269
270
270
data : core.File
271
271
See core.File for more documentation
@@ -1207,7 +1207,7 @@ async def create(
1207
1207
The name of the uploaded dataset.
1208
1208
1209
1209
type : DatasetType
1210
-
The dataset type, which is used to validate the data. Valid types are `embed-input`, `reranker-finetune-input`, `single-label-classification-finetune-input`, `chat-finetune-input`, and `multi-label-classification-finetune-input`.
1210
+
The dataset type, which is used to validate the data. The only valid type is `embed-input` used in conjunction with the Embed Jobs API.
Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
199
+
Defaults to `"enabled"`.
200
+
Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`.
Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
665
+
Defaults to `"enabled"`.
666
+
Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`.
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
1609
1607
1610
-
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`or `image/png` format and has a maximum size of 5MB.
1608
+
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
1611
1609
1612
1610
Images are only supported with Embed v3.0 and newer models.
Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
3112
+
Defaults to `"enabled"`.
3113
+
Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`.
Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
3578
+
Defaults to `"enabled"`.
3579
+
Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`.
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
4524
4520
4525
-
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`or `image/png` format and has a maximum size of 5MB.
4521
+
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
4526
4522
4527
4523
Images are only supported with Embed v3.0 and newer models.
0 commit comments