Skip to content

Commit 2810a7e

Browse files
committed
docs: update cohere-works-everywhere (v2) with OCI SDK support
- Remove stale "v2 not supported for OCI" note - Change OCI Python from "soon" to "docs" - Fix generate/generate_stream as unsupported on OCI - Add OCI V2 code snippet section
1 parent 1cdb064 commit 2810a7e

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

fern/pages/v2/deployment-options/cohere-works-everywhere.mdx

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Note that the code snippets presented in this document should be more than enoug
2121
The table below summarizes the environments in which Cohere models can be deployed. You'll notice it contains many links; the links in the "sdk" column take you to Github pages with more information on Cohere's language-specific SDKs, while all the others take you to relevant sections in this document.
2222

2323
<Note title="Note">
24-
The Cohere v2 API is not yet supported for cloud deployments (Bedrock, SageMaker, Azure, and OCI) and will be coming soon. The code examples shown for these cloud deployments use the v1 API.
24+
The Cohere v2 API is not yet supported for some cloud deployments (Bedrock, SageMaker, Azure). OCI supports the v2 API via `OciClientV2`. The code examples shown for Bedrock, SageMaker, and Azure use the v1 API.
2525
</Note>
2626

2727
| sdk | [Cohere platform](/reference/about) | [Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-cohere.html) | Sagemaker | Azure | OCI | Private Deployment |
2828
| ------------------------------------------------------------ | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------- | --------------------------- | -------------------------- | ------------------------------ |
2929
| [Typescript](https://github.com/cohere-ai/cohere-typescript) | [✅ docs](#cohere-platform) | [✅ docs](#bedrock) | [✅ docs](#sagemaker) | [✅ docs](#azure) | [🟠 soon]() | [✅ docs](#private-deployment) |
30-
| [Python](https://github.com/cohere-ai/cohere-python) | [✅ docs](#cohere-platform) | [✅ docs](#bedrock) | [✅ docs](#sagemaker) | [✅ docs](#azure) | [🟠 soon]() | [✅ docs](#private-deployment) |
30+
| [Python](https://github.com/cohere-ai/cohere-python) | [✅ docs](#cohere-platform) | [✅ docs](#bedrock) | [✅ docs](#sagemaker) | [✅ docs](#azure) | [✅ docs](#oci) | [✅ docs](#private-deployment) |
3131
| [Go](https://github.com/cohere-ai/cohere-go) | [✅ docs](#cohere-platform) | [🟠 soon](#bedrock) | [🟠 soon](#sagemaker) | [✅ docs](#azure) | [🟠 soon](#) | [✅ docs](#private-deployment) |
3232
| [Java](https://github.com/cohere-ai/cohere-java) | [✅ docs](#cohere-platform) | [🟠 soon](#bedrock) | [🟠 soon](#sagemaker) | [✅ docs](#azure) | [🟠 soon]() | [✅ docs](#private-deployment) |
3333

@@ -39,8 +39,8 @@ The most complete set of features is found on the cohere platform, while each of
3939
| --------------- | --------------- | ----------- | ----------- | ----------- | ----------- | -------------- |
4040
| chat_stream |||||||
4141
| chat |||||||
42-
| generate_stream ||||| ||
43-
| generate ||||| ||
42+
| generate_stream ||||| ⬜️ ||
43+
| generate ||||| ⬜️ ||
4444
| embed |||||||
4545
| rerank ||||| ⬜️ ||
4646
| classify || ⬜️ | ⬜️ | ⬜️ | ⬜️ ||
@@ -603,3 +603,25 @@ public class ChatPost {
603603
}
604604
```
605605
</CodeBlocks>
606+
607+
#### OCI
608+
609+
<CodeBlocks>
610+
```python PYTHON
611+
import cohere
612+
613+
co = cohere.OciClientV2(
614+
oci_region="us-chicago-1",
615+
oci_compartment_id="ocid1.compartment.oc1...",
616+
)
617+
618+
response = co.chat(
619+
model="command-a-03-2025",
620+
messages=[
621+
{"role": "user", "content": "Who discovered gravity?"},
622+
],
623+
)
624+
625+
print(response)
626+
```
627+
</CodeBlocks>

0 commit comments

Comments
 (0)