docs: Add native Cohere Python SDK support for OCI Generative AI#740
docs: Add native Cohere Python SDK support for OCI Generative AI#740fede-kamel wants to merge 7 commits intocohere-ai:mainfrom
Conversation
|
🌿 Preview your docs: https://cohere-preview-68da7d20-07f9-4943-8b4e-b0bcc6b5ff31.docs.buildwithfern.com |
|
@daniel-cohere I've updated the OCI documentation to cover the new native Cohere Python SDK integration ( |
|
🌿 Preview your docs: https://cohere-preview-77eed9e4-0fe7-4adf-a9e8-b7e9cc482085.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-d4f0ea68-e639-4bd8-8b93-060f49ad5b1b.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-adf67521-5e2d-4e08-92ec-3f8660bd40d0.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-cb29f9f5-98f1-42db-86d8-28fa00b2738c.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-9c72d656-5549-45ba-b88f-fbf4ff09bc3b.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-49dea041-c3cc-4e16-a014-cab15c7d1edb.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-04e61c35-53f9-4dee-b29a-d3bb371955ef.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-0574c26a-3085-4424-ade3-0eeb33860bee.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-235e9217-6b5c-471f-8ebd-575b0852124d.docs.buildwithfern.com |
391eb1e to
2810a7e
Compare
|
🌿 Preview your docs: https://cohere-preview-8427bb6c-8559-4871-81c8-75aca5a3fcf3.docs.buildwithfern.com |
Complete rewrite of the OCI documentation page to cover the new OciClient and OciClientV2 classes: - Installation (pip install cohere[oci]) - Quick start: V2 chat, V1 chat, embeddings, V2/V1 streaming - All authentication methods (config, profile, session, direct, instance principal, resource principal) - V1 vs V2 API comparison table - Tool use, vision, and embed v4 snippets - Supported features table - End-to-end example: embed → search → grounded chat → tool calling (multi-turn) → vision → streaming All code snippets verified against live OCI Generative AI.
- Change OCI Python from "soon" to "docs" in supported environments - Fix generate/generate_stream as unsupported on OCI - Add OCI V1 code snippet section
2810a7e to
fb933c8
Compare
|
🌿 Preview your docs: https://cohere-preview-c45ae295-48bd-4127-b391-fb1770119a71.docs.buildwithfern.com |
- 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
fb933c8 to
9b88dbd
Compare
|
🌿 Preview your docs: https://cohere-preview-05a6b770-d706-4666-98e3-ec9a225d8d1e.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-f23064b4-1b37-4d94-b664-a95e3baea6fa.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-adbff624-80ad-4efa-8e15-a87f6cb1fc45.docs.buildwithfern.com |
|
🌿 Preview your docs: https://cohere-preview-dd21638f-fc08-4fa4-b395-a85bf6d4bf30.docs.buildwithfern.com |
| - [OCI Generative AI Documentation](https://docs.oracle.com/en-us/iaas/Content/generative-ai/home.htm) | ||
| - [OCI Generative AI Pretrained Models](https://docs.oracle.com/en-us/iaas/Content/generative-ai/pretrained-models.htm) | ||
|
|
||
| You can also work with Cohere models on OCI through the [OCI Console](https://docs.oracle.com/en-us/iaas/Content/generative-ai/use-playground-chat.htm), the [OCI CLI](https://docs.oracle.com/en-us/iaas/Content/generative-ai/use-playground-embed.htm), or the [OCI API](https://docs.oracle.com/en-us/iaas/api/#/en/generative-ai-inference/) directly. |
There was a problem hiding this comment.
Are these correct links - the links look like info for chat/embed rather than specifically info on OCI Console/OCI CLI?
Replace incorrect playground links with proper documentation URLs: - OCI Console now points to the Generative AI overview page - OCI CLI now points to the CLI command reference for generative-ai-inference
|
@daniel-cohere Updated the OCI Console and CLI links — they now point to the correct documentation pages. All links verified. |
|
🌿 Preview your docs: https://cohere-preview-dfa60238-b4d1-4172-914f-0e375c345b8a.docs.buildwithfern.com |
Summary
Updates the OCI documentation to reflect the new native Cohere Python SDK integration with OCI Generative AI, contributed via cohere-ai/cohere-python#718.
Changes
oracle-cloud-infrastructure-oci.mdx— Complete rewrite:pip install cohere[oci])OciClientvsOciClientV2)cohere-works-everywhere.mdx(v1):generateandgenerate_streamas unsupported on OCI (they were incorrectly marked as supported)cohere-works-everywhere.mdx(v2):generateandgenerate_streamas unsupported on OCIContext
The Cohere Python SDK now natively supports OCI Generative AI via
OciClient(V1 API for Command R family) andOciClientV2(V2 API for Command A family). The SDK handles URL rewriting, request/response format translation, OCI cryptographic request signing, and streaming event transformation transparently.Test plan
Note
Low Risk
Low risk: changes are documentation updates plus a GitHub Actions permission/checkout tweak; main risk is broken docs rendering or incorrect code snippets/feature tables.
Overview
Adds native OCI Generative AI documentation for the Cohere Python SDK, including install (
cohere[oci]), V1/V2 client usage (OciClient/OciClientV2), auth options, streaming, and advanced examples (tools/vision/embed).Updates the "Cohere works everywhere" pages (v1 and v2) to mark Python-on-OCI as supported with docs, add OCI code snippets, clarify that OCI supports v2 via
OciClientV2, and correct the feature matrix to showgenerate/generate_streamas not supported on OCI.Hardens the
check-python-code-snippetsworkflow by reducing permissions and checking out fork PRs via the PR head repo + SHA.Reviewed by Cursor Bugbot for commit 84a8791. Bugbot is set up for automated code reviews on this repo. Configure here.