File size: 905 Bytes
ed4d993
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# langchain-together

This package contains the LangChain integrations for [Together AI](https://www.together.ai/) through their [APIs](https://docs.together.ai/).

## Installation and Setup

- Install the LangChain partner package

```bash
pip install -U langchain-together
```

- Get your Together AI api key from the [Together Dashboard](https://api.together.ai/settings/api-keys) and set it as an environment variable (`TOGETHER_API_KEY`)

## Chat Completions

This package contains the `ChatTogether` class, which is the recommended way to interface with Together AI chat models.

ADD USAGE EXAMPLE HERE.
Can we add this in the langchain docs?

NEED to add image endpoint + completions endpoint as well

## Embeddings

See a [usage example](https://python.langchain.com/docs/integrations/text_embedding/together/)

Use `togethercomputer/m2-bert-80M-8k-retrieval` as the default model for embeddings.