cohere-ai/cohere-python

Python Library for Accessing the Cohere API

View on GitHub ↗Jump to charts ↓Open shareable report →

Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 1 hour ago
Type:Library / SDKCategory(s):Agent Frameworks & SDKsAI Agents & LLM Apps
Added to GitGenius on November 29th, 2023
Created on January 20th, 2021
Open Issues & Pull Requests: 23 (+0)
GitHub issues: Enabled
Number of forks: 99
Total Stargazers: 404 (+0)
Total Subscribers: 24 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 4.8 days
Mean response time: 140.5 days
90th percentile: 587.8 days
Tracked items: 103

Maintainer activity

2 people did triage or write work on this repository in the last 12 months.

Counts unlabeled, assigned, unassigned, milestoned, demilestoned, locked, unlocked over the last 12 months. These are issue and pull request events that require triage or write permission. Commits and code review are not counted. labeled and renamed are excluded because GitHub issue forms record the issue author as the actor. Figures from October 11, 2026. This count is not comparable across projects: each project's automation decides which of these events a person emits.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 3
New in 7 days: 0
Closed in 7 days: 1
Avg open age: 19 days
Stale 30+ days: 2
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 1
Comments in 7 days: 0
Events in 7 days: 2

Top labels

  • enhancement (1)
  • good first issue (1)
  • help wanted (1)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

The Cohere Python SDK is a client library that provides Python developers with access to Cohere's language models and APIs across multiple cloud platforms and deployment environments. The SDK enables integration with Cohere's models on the native Cohere platform as well as major cloud providers including AWS (through Bedrock and SageMaker), Azure, Google Cloud Platform, and Oracle Cloud Infrastructure. This multi-platform support allows developers to choose their preferred infrastructure while maintaining consistent API interactions through the Python library.

The SDK supports several core Cohere APIs including chat functionality, embeddings, text generation, and reranking capabilities. A notable feature is streaming support for chat endpoints through the chat_stream method, enabling real-time response handling for conversational applications. The library handles authentication flexibly, allowing developers to set API keys through environment variables like CO_API_KEY to avoid hardcoding credentials in application code.

Oracle Cloud Infrastructure receives particular attention in the SDK with dedicated OciClient and OciClientV2 implementations supporting both V1 and V2 API versions. The OCI integration provides full support for embed and chat APIs with streaming capabilities, supporting Command-R and Command-A model families. However, the OCI implementation has specific limitations: the Generate and Rerank APIs are only available through fine-tuned models deployed to dedicated endpoints rather than on-demand inference, and embedding requests cannot simultaneously request multiple embedding types like both float and int8 formats.

The repository maintains connections with other major machine learning and AI projects including MLflow, PyTorch, and vLLM through overlapping contributor networks.

The SDK is classified across numerous natural language processing and machine learning domains including text generation, semantic search, sentiment analysis, content summarization, chatbot development, and conversation AI. This broad classification reflects the library's versatility in supporting various NLP and language model applications.

An important architectural note is that the SDK code is generated programmatically rather than maintained manually. The documentation explicitly states that direct code contributions would be overwritten during the next generated release, so contributors are encouraged to open issues for discussion before submitting pull requests. However, contributions to the README documentation are welcomed and accepted directly. This generative approach to code maintenance distinguishes the development workflow from typical open-source Python libraries.