langchain_cohere.llms.BaseCohere¶

class langchain_cohere.llms.BaseCohere[source]¶

Bases: Serializable

Base class for Cohere models.

param base_url: Optional[str] = None¶

Override the default Cohere API URL.

param cohere_api_key: Optional[SecretStr] = None¶

Cohere API key. If not provided, will be read from the environment variable.

Constraints
  • type = string

  • writeOnly = True

  • format = password

param model: Optional[str] = None¶

Model name to use.

param stop: Optional[List[str]] = None¶
param streaming: bool = False¶

Whether to stream the results.

param temperature: Optional[float] = None¶

A non-negative float that tunes the degree of randomness in generation.

param timeout_seconds: Optional[float] = 300¶

Timeout in seconds for the Cohere API request.

param user_agent: str = 'langchain:partner'¶

Identifier for the application making the request.