Build Things with Cohere!

Welcome to our hands-on introduction to Cohere! This section is split over seven different tutorials, each focusing on one use case leveraging our Chat, Embed, and Rerank endpoints:

Your learning is structured around building an onboarding assistant that helps new hires at Co1t, a fictitious company. The assistant can help write introductions, answer user questions about the company, search for information from e-mails, and create meeting appointments.

We recommend that you follow the parts sequentially. However, feel free to skip to specific parts if you want (apart from Part 1, which is a pre-requisite) because each part also works as a standalone tutorial.

Installation and Setup

The Cohere platform lets developers access large language model (LLM) capabilities with a few lines of code. These LLMs can solve a broad spectrum of natural language use cases, including classification, semantic search, paraphrasing, summarization, and content generation.

Cohere’s models can be accessed through the playground, SDK, and CLI tool. We support SDKs in four different languages: Python, Typescript, Java, and Go. For these tutorials, we’ll use the Python SDK and access the models through the Cohere platform with an API key.

To get started, first install the Cohere Python SDK.

PYTHON
1! pip install -U cohere

Next, we’ll import the cohere library and create a client to be used throughout the examples. We create a client by passing the Cohere API key as an argument. To get an API key, sign up with Cohere and get the API key from the dashboard.

PYTHON
1import cohere
2
3co = cohere.ClientV2(api_key="YOUR_COHERE_API_KEY") # Get your API key here: https://dashboard.cohere.com/api-keys

In Part 2, we’ll get started with the first use case - text generation.