Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Portkey Custom Endpoints Docs #134

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions pages/docs/configuration/librechat_yaml/ai_endpoints/portkey.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Portkey AI
description: Example configuration for Portkey AI
---

# [Portkey Docs](https://docs.portkey.ai/docs/integrations/libraries/librechat)

> Portkey API key: [app.portkey.ai](https://app.portkey.ai/)



**Notes:**
- LibreChat requires that the `API key` field is present. We don’t need it for the Portkey integration, we can pass a `dummy` string for it.
- Portkey integrates with LibreChat, offering observability, 50+ guardrails, caching, and conditional routing with fallbacks and retries for reliable, production-grade deployments.
- Portkey Supports 250+ Models, you can find the list of providers on [Portkey Docs](https://docs.portkey.ai/docs/integrations/llms)
- You can use Portkey in two ways—through [Virtual Keys](https://docs.portkey.ai/docs/product/ai-gateway/virtual-keys ) or [Configs](https://docs.portkey.ai/docs/product/ai-gateway/configs).
- You can use Model specific parameters like `top_p`, `max Tokens`, etc. in using Portke Config. [Learn more](https://docs.portkey.ai/docs/product/ai-gateway/configs#configs)



## Using Portkey AI with Virtual Keys
```yaml filename="librechat.yaml"
- name: "Portkey"
apikey: "dummy"
baseURL: ${PORTKEY_GATEWAY_URL}
headers:
x-portkey-api-key: "${PORTKEY_API_KEY}"
x-portkey-virtual-key: "PORTKEY_OPENAI_VIRTUAL_KEY"
models:
default: ["gpt-4o-mini"]
fetch: true
titleConvo: true
titleModel: "current_model"
summarize: false
summaryModel: "current_model"
forcePrompt: false
modelDisplayLabel: "Portkey:OpenAI"
siddharthsambharia-portkey marked this conversation as resolved.
Show resolved Hide resolved
iconURL: https://images.crunchbase.com/image/upload/c_pad,f_auto,q_auto:eco,dpr_1/rjqy7ghvjoiu4cd1xjbf
```



## Using Portkey AI with Configs
```yaml filename="librechat.yaml"
- name: "Portkey"
apikey: "dummy"
baseURL: ${PORTKEY_GATEWAY_URL}
headers:
x-portkey-api-key: "${PORTKEY_API_KEY}"
x-portkey-config: "pc-libre-xxx"
models:
default: ["llama-3.2"]
fetch: true
titleConvo: true
titleModel: "current_model"
summarize: false
summaryModel: "current_model"
forcePrompt: false
modelDisplayLabel: "Portkey:Llama"
iconURL: https://images.crunchbase.com/image/upload/c_pad,f_auto,q_auto:eco,dpr_1/rjqy7ghvjoiu4cd1xjbf
```

![image](https://raw.githubusercontent.com/siddharthsambharia-portkey/Portkey-Product-Images/refs/heads/main/portkey-librechat.png)
Loading