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.
273
+
Defaults to `"enabled"`.
274
+
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.
573
+
Defaults to `"enabled"`.
574
+
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
703
+
from cohere import Client
703
704
704
705
client = Client(
705
706
client_name="YOUR_CLIENT_NAME",
706
707
token="YOUR_TOKEN",
707
708
)
708
709
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
-
],
710
+
model="command-a-03-2025",
711
+
message="Tell me about LLMs",
723
712
)
724
713
"""
725
714
_response=self._raw_client.chat(
@@ -1073,7 +1062,7 @@ def embed(
1073
1062
images : typing.Optional[typing.Sequence[str]]
1074
1063
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
1075
1064
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.
1065
+
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
1066
1078
1067
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.
1717
+
Defaults to `"enabled"`.
1718
+
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.
2026
+
Defaults to `"enabled"`.
2027
+
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
2158
+
from cohere import AsyncClient
2170
2159
2171
2160
client = AsyncClient(
2172
2161
client_name="YOUR_CLIENT_NAME",
@@ -2176,20 +2165,8 @@ async def chat(
2176
2165
2177
2166
async def main() -> None:
2178
2167
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
-
],
2168
+
model="command-a-03-2025",
2169
+
message="Tell me about LLMs",
2193
2170
)
2194
2171
2195
2172
@@ -2563,7 +2540,7 @@ async def embed(
2563
2540
images : typing.Optional[typing.Sequence[str]]
2564
2541
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
2565
2542
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.
2543
+
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
2544
2568
2545
Images are only supported with Embed v3.0 and newer models.
0 commit comments