File size: 1,244 Bytes
7677e00
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Anyscale

>[Anyscale](https://www.anyscale.com) is a platform to run, fine tune and scale LLMs via production-ready APIs.
> [Anyscale Endpoints](https://docs.anyscale.com/endpoints/overview) serve many open-source models in a cost-effective way.

`Anyscale` also provides [an example](https://docs.anyscale.com/endpoints/model-serving/examples/langchain-integration) 
how to setup `LangChain` with `Anyscale` for advanced chat agents.

## Installation and Setup

- Get an Anyscale Service URL, route and API key and set them as environment variables (`ANYSCALE_SERVICE_URL`,`ANYSCALE_SERVICE_ROUTE`, `ANYSCALE_SERVICE_TOKEN`). 
- Please see [the Anyscale docs](https://www.anyscale.com/get-started) for more details.

We have to install the `openai` package:

```bash
pip install openai
```

## LLM

See a [usage example](/docs/integrations/llms/anyscale).

```python
from langchain_community.llms.anyscale import Anyscale
```

## Chat Models

See a [usage example](/docs/integrations/chat/anyscale).

```python
from langchain_community.chat_models.anyscale import ChatAnyscale
```

## Embeddings

See a [usage example](/docs/integrations/text_embedding/anyscale).

```python
from langchain_community.embeddings import AnyscaleEmbeddings
```