Skip to main content
Ctrl+K
🦜🔗 LangChain  documentation - Home 🦜🔗 LangChain  documentation - Home
  • Reference
Ctrl+K
Docs
  • GitHub
  • X / Twitter
Ctrl+K
  • Reference
Docs
  • GitHub
  • X / Twitter

Section Navigation

Base packages

  • Core
  • Langchain
  • Text Splitters
  • Community
  • Experimental

Integrations

  • AI21
  • Anthropic
  • AstraDB
  • AWS
  • Azure Ai
  • Azure Dynamic Sessions
  • Cerebras
  • Chroma
  • Cohere
    • chains
    • chat_models
    • common
    • embeddings
    • llms
      • BaseCohere
      • Cohere
      • acompletion_with_retry
      • completion_with_retry
      • enforce_stop_tokens
    • rag_retrievers
    • react_multi_hop
    • rerank
    • sql_agent
  • Deepseek
  • Elasticsearch
  • Exa
  • Fireworks
  • Google Community
  • Google GenAI
  • Google VertexAI
  • Groq
  • Huggingface
  • IBM
  • Milvus
  • MistralAI
  • MongoDB
  • Neo4J
  • Nomic
  • Nvidia Ai Endpoints
  • Ollama
  • OpenAI
  • Perplexity
  • Pinecone
  • Postgres
  • Prompty
  • Qdrant
  • Redis
  • Sema4
  • Snowflake
  • Sqlserver
  • Standard Tests
  • Tavily
  • Together
  • Unstructured
  • Upstage
  • VoyageAI
  • Weaviate
  • XAI
  • LangChain Python API Reference
  • langchain-cohere: 0.4.4
  • llms

llms#

Classes

llms.BaseCohere

Base class for Cohere models.

llms.Cohere

Cohere large language models.

Functions

llms.acompletion_with_retry(llm, **kwargs)

Use tenacity to retry the completion call.

llms.completion_with_retry(llm, **kwargs)

Use tenacity to retry the completion call.

llms.enforce_stop_tokens(text, stop)

Cut off the text as soon as any stop words occur.

© Copyright 2025, LangChain Inc.