Perplexity
Configure Perplexity as a custom endpoint in LibreChat.
Perplexity provides the Sonar family of search-grounded models, used in LibreChat as a custom endpoint.
Get an API key
Create a key from the Perplexity API settings. Add it to your .env file:
PERPLEXITY_API_KEY=your-api-keyConfiguration
Add the endpoint under endpoints.custom in your librechat.yaml:
- name: "Perplexity"
apiKey: "${PERPLEXITY_API_KEY}"
baseURL: "https://api.perplexity.ai/"
models:
default: [
"sonar-deep-research",
"sonar-reasoning-pro",
"sonar-reasoning",
"sonar-pro",
"sonar",
"r1-1776"
]
fetch: false
titleConvo: true
titleModel: "llama-3-sonar-small-32k-chat"
summarize: false
summaryModel: "llama-3-sonar-small-32k-chat"
dropParams: ["stop", "frequency_penalty"]
modelDisplayLabel: "Perplexity"Notes
- Fetching the model list is not supported, so keep
fetch: falseand maintain thedefaultlist manually. - The API is strict for some models. Fields like
stopandfrequency_penaltycan cause an error when set to 0, so drop them withdropParams.
How is this guide?