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

Update pricing and models for Perplexity #241

Merged
Show file tree
Hide file tree
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
14 changes: 5 additions & 9 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,15 @@ export const ANTHROPIC_PRICING: Record<string, CostTableEntry> = {
// https://docs.perplexity.ai/docs/pricing --> slightly unclear
// https://docs.perplexity.ai/changelog/api-updates-february-2024 --> diff prices
export const PERPLEXITY_PRICING: Record<string, CostTableEntry> = {
"llama-3-sonar-small-32k-online": {
input: 0.0002,
output: 0.0002,
"llama-3.1-sonar-huge-128k-online": {
input: 0.005,
output: 0.005,
},
"llama-3-sonar-small-32k-chat": {
"llama-3.1-8b-instruct": {
input: 0.0002,
output: 0.0002,
},
"llama-3-sonar-large-32k-online": {
input: 0.001,
output: 0.001,
},
"llama-3-sonar-large-32k-chat": {
"llama-3.1-70b-instruct": {
input: 0.001,
output: 0.001,
},
Expand Down
20 changes: 8 additions & 12 deletions lib/types/playground_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,12 @@ export const groqModels = [

export const perplexityModels = [
{
value: "llama-3-sonar-small-32k-online",
label: "Llama 3 Sonar Small 32K (Online)",
value: "llama-3.1-8b-instruct",
label: "Llama 3 8B Instruct",
},
{
value: "llama-3-sonar-small-32k-chat",
label: "Llama 3 Sonar Small 32K (Chat)",
},
{
value: "llama-3-sonar-large-32k-online",
label: "Llama 3 Sonar Large 32K (Online)",
},
{
value: "llama-3-sonar-large-32k-chat",
label: "Llama 3 Sonar Large 32K (Chat)",
value: "llama-3.1-70b-instruct",
label: "Llama 3 70B Instruct",
},
{
value: "llama-3.1-sonar-small-128k-online",
Expand All @@ -190,6 +182,10 @@ export const perplexityModels = [
value: "llama-3.1-sonar-large-128k-chat",
label: "Llama 3.1 Sonar Large 128K (Chat)",
},
{
value: "llama-3.1-sonar-huge-128k-online",
label: "Llama 3.1 Sonar Huge 128K (Online)",
},
];

export enum OpenAIRole {
Expand Down