Exercise#5 Cohere account

Reference

Cohere site

Documentation

Playground

REST endpoints

Cookbooks

Objective

  1. Review Cohere pricing and terms of use
  2. Create a Cohere account for accessing the Command and other models.
  3. Try out various models in the playground

The trial account keys are Free as of September 2024. Please check documentation for current terms and pricing

Steps

1. Go through the Cohere pricing plans

Review the pricing plan. You will be creating a Trial API Key which is free.

Pricing

2. Register with Cohere

Open the link to create the API Key.

Cohere API

3. Add API key to the key file

Copy/Paste the key from dashboard to the key file you created in the earlier exercise.

Note: The key file was setup in an earlier exercise

API key name for Cohere = COHERE_API_KEY

4. Test the key setup

The solution code should work if everything was set up as per the instructions in section on Development environment setup and in this section. You will need to address the issue based on the error. MAKE SURE TO ADJUST THE PATH TO THE KEY FILE!!!

  1. Open the notebook in Jupyter

setup-test-api-keys

  1. Change the path to the API key file in the cell titled Setup the environment

  2. Run all the cells under the section titled Setup the environment

  3. Run the cells under the section titled Cohere API key

If you are prompted for the API Key then that means one of the two things (a) COHERE_API_KEY was not added to he key file (b) the path to key file is not correct in the notebook. Address the issue, restart the notebook kernel and try again.

5. Checkout the models in playground

Open the Cohere playground and try out various models with different settings.