Integration between LlamaIndex and Cohere's language models, enabling the use of Cohere's command and embed models within LlamaIndex workflows. Current version 0.8.0, supporting Python >=3.10. Release cadence is aligned with llama-index core updates, approximately bi-weekly.
pip install llama-index-llms-cohereNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Instantiate Cohere LLM and generate a completion.
Use explicit model names like 'command-r', 'command-r-plus', or 'command-light'.
Set COHERE_API_KEY in environment or pass api_key parameter.
Use from llama_index.llms.cohere import Cohere (capitalized class name).
Use 'from llama_index.llms.cohere import Cohere' (capital C, nested import).
Set the environment variable COHERE_API_KEY to your valid Cohere API key.