Spaces:
Running
on
Zero
Running
on
Zero
File size: 2,603 Bytes
886d8e9 |
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
---
title: Perplexity
---
To use Open Interpreter with the Perplexity API, set the `model` flag:
<CodeGroup>
```bash Terminal
interpreter --model perplexity/<perplexity-model>
```
```python Python
from interpreter import interpreter
interpreter.llm.model = "perplexity/<perplexity-model>"
interpreter.chat()
```
</CodeGroup>
# Supported Models
We support the following completion models from the Perplexity API:
- pplx-7b-chat
- pplx-70b-chat
- pplx-7b-online
- pplx-70b-online
- codellama-34b-instruct
- llama-2-13b-chat
- llama-2-70b-chat
- mistral-7b-instruct
- openhermes-2-mistral-7b
- openhermes-2.5-mistral-7b
- pplx-7b-chat-alpha
- pplx-70b-chat-alpha
<CodeGroup>
```bash Terminal
interpreter --model perplexity/pplx-7b-chat
interpreter --model perplexity/pplx-70b-chat
interpreter --model perplexity/pplx-7b-online
interpreter --model perplexity/pplx-70b-online
interpreter --model perplexity/codellama-34b-instruct
interpreter --model perplexity/llama-2-13b-chat
interpreter --model perplexity/llama-2-70b-chat
interpreter --model perplexity/mistral-7b-instruct
interpreter --model perplexity/openhermes-2-mistral-7b
interpreter --model perplexity/openhermes-2.5-mistral-7b
interpreter --model perplexity/pplx-7b-chat-alpha
interpreter --model perplexity/pplx-70b-chat-alpha
```
```python Python
interpreter.llm.model = "perplexity/pplx-7b-chat"
interpreter.llm.model = "perplexity/pplx-70b-chat"
interpreter.llm.model = "perplexity/pplx-7b-online"
interpreter.llm.model = "perplexity/pplx-70b-online"
interpreter.llm.model = "perplexity/codellama-34b-instruct"
interpreter.llm.model = "perplexity/llama-2-13b-chat"
interpreter.llm.model = "perplexity/llama-2-70b-chat"
interpreter.llm.model = "perplexity/mistral-7b-instruct"
interpreter.llm.model = "perplexity/openhermes-2-mistral-7b"
interpreter.llm.model = "perplexity/openhermes-2.5-mistral-7b"
interpreter.llm.model = "perplexity/pplx-7b-chat-alpha"
interpreter.llm.model = "perplexity/pplx-70b-chat-alpha"
```
</CodeGroup>
# Required Environment Variables
Set the following environment variables [(click here to learn how)](https://chat.openai.com/share/1062cdd8-62a1-4aa8-8ec9-eca45645971a) to use these models.
| Environment Variable | Description | Where to Find |
| ----------------------- | ------------------------------------ | ----------------------------------------------------------------- |
| `PERPLEXITYAI_API_KEY'` | The Perplexity API key from pplx-api | [Perplexity API Settings](https://www.perplexity.ai/settings/api) |
|