Skip to main content
Ctrl+K
πŸ¦œπŸ”— LangChain  documentation - Home
  • Reference
  • Legacy reference
Ctrl+K
Docs
  • GitHub
  • X / Twitter
Ctrl+K
  • Reference
  • Legacy reference
Docs
  • GitHub
  • X / Twitter

Section Navigation

Base packages

  • Core
  • Langchain
  • Text Splitters
  • Community
  • Experimental

Integrations

  • AI21
  • Airbyte
  • Anthropic
  • AstraDB
  • AWS
  • Azure Dynamic Sessions
  • Chroma
  • Cohere
    • chains
    • chat_models
    • common
    • csv_agent
    • embeddings
    • llms
      • BaseCohere
      • Cohere
      • acompletion_with_retry
      • completion_with_retry
      • enforce_stop_tokens
    • rag_retrievers
    • react_multi_hop
    • rerank
    • sql_agent
  • Couchbase
  • Elasticsearch
  • Exa
  • Fireworks
  • Google Community
  • Google GenAI
  • Google VertexAI
  • Groq
  • Huggingface
  • Milvus
  • MistralAI
  • MongoDB
  • Nomic
  • Nvidia Ai Endpoints
  • Ollama
  • OpenAI
  • Pinecone
  • Postgres
  • Prompty
  • Qdrant
  • Robocorp
  • Together
  • Unstructured
  • VoyageAI
  • Weaviate
  • LangChain Python API Reference
  • langchain-cohere: 0.2.2

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 2023, LangChain Inc.