Private Deployment Usage

You can use Cohere’s SDK to access privately deployed Cohere models.

Installation

To install the Cohere SDK, choose from the following 4 languages:

$pip install -U cohere

Source

Getting Started

The only difference between using Cohere’s models on private deployments and the Cohere platform is how you set up the client. With private deployments, you need to pass the following parameters:

  • api_key - Pass a blank value
  • base_url - Pass the URL of your private deployment
PYTHON
1import cohere
2
3co = cohere.ClientV2(
4 api_key="", base_url="<YOUR_DEPLOYMENT_URL>" # Leave this blank
5)

To get started with example use cases, refer to the following quickstart examples:

Integrations

You can use the LangChain library with privately deployed Cohere models. Refer to the LangChain section for more information on setting up LangChain for private deployments.

Built with