{"repo":"cohere-ai/cohere-python","free":true,"listed":false,"github":"https://github.com/cohere-ai/cohere-python","clone":"git clone https://github.com/cohere-ai/cohere-python.git","description":"Python Library for Accessing the Cohere API","language":"Python","stars":395,"topics":["python","sdk"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Cohere Python SDK The Cohere Python SDK allows access to Cohere models across many different platforms: the cohere platform, AWS (Bedrock, Sagemaker), Azure, GCP and Oracle OCI. For a full list of support and snippets, please take a look at the SDK support docs page. Documentation Cohere documentation and API reference is available here. Installation Usage [!TIP] You can set a system environment variable CO API KEY to avoid writing your api key within your code, e.g. add export CO API KEY=theapikeyforyouraccount in your /.zshrc or /.bashrc, open a new terminal, then code calling cohere.Client() will read this key. Streaming The SDK supports streaming endpoints. To take advantage of this feature for chat, use chat stream . Oracle Cloud Infrastructure (OCI) The SDK supports Oracle Cloud Infrastructure (OCI) Generative AI service. First, install the OCI SDK: Then use the OciClient or OciClientV2 : OCI Authentication Methods 1. Config File (Default) 2. Custom Profile 3. Session-based Authentication (Security Token) 4. Direct Credentials 5. Instance Principal (for OCI Compute instances) Supported OCI APIs The OCI client supports the following Cohere APIs: - Embed : Full support for all embedding models - Chat : Full support with both V1 ( OciClient ) and V2 ( OciClientV2 ) APIs - Streaming available via chat stream() - Supports Command-R and Command-A model families OCI Model Availability and Limitations Available on OCI On-Demand Inference: - ✅ Embed models : available on OCI Gen","default_branch":null,"files":null,"tree":[],"storefront":"/r/cohere-ai","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cohere-ai/cohere-python/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}