BaseCohere#

class langchain_community.llms.cohere.BaseCohere[source]#

Bases: Serializable

Deprecated since version 0.0.30: Use :class:`~langchain_cohere.BaseCohere` instead.

Base class for Cohere models.

param cohere_api_key: SecretStr | None = None#

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

param model: str | None = None#

Model name to use.

param stop: List[str] | None = None#
param streaming: bool = False#

Whether to stream the results.

param temperature: float = 0.75#

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

param user_agent: str = 'langchain'#

Identifier for the application making the request.

classmethod validate_environment(values: Dict) Dict[source]#

Validate that api key and python package exists in environment.

Parameters:

values (Dict)

Return type:

Dict