Skip to content
Open
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
101 changes: 39 additions & 62 deletions lib/models/llm/perplexity-llm-list.ts
Original file line number Diff line number Diff line change
@@ -1,88 +1,65 @@
import { LLM } from "@/types"

const PERPLEXITY_PLATORM_LINK =
"https://docs.perplexity.ai/docs/getting-started"
const PERPLEXITY_PLATFORM_LINK =
"https://docs.perplexity.ai/docs/model-cards"

// Perplexity Models (UPDATED 2/25/24) -----------------------------
// Model Deprecation Notice
// Please note that on March 15, the pplx-70b-chat, pplx-70b-online, llama-2-70b-chat, and codellama-34b-instruct models will no longer be available through the Perplexity API.
// Perplexity Models (UPDATED [DATE]) -----------------------------
// API Documentation: https://docs.perplexity.ai/docs/model-cards

// Mixtral 8x7B Instruct (UPDATED 1/31/24)
const MIXTRAL_8X7B_INSTRUCT: LLM = {
modelId: "mixtral-8x7b-instruct",
modelName: "Mixtral 8x7B Instruct",
// Sonar Reasoning Pro - Advanced search capabilities with Chain of Thought reasoning
const PERPLEXITY_SONAR_REASONING_PRO: LLM = {
modelId: "sonar-reasoning-pro",
modelName: "Sonar Reasoning Pro",
provider: "perplexity",
hostedId: "mixtral-8x7b-instruct",
platformLink: PERPLEXITY_PLATORM_LINK,
hostedId: "sonar-reasoning-pro",
platformLink: PERPLEXITY_PLATFORM_LINK,
imageInput: false
}

// Mistral 7B Instruct (UPDATED 1/31/24)
const MISTRAL_7B_INSTRUCT: LLM = {
modelId: "mistral-7b-instruct",
modelName: "Mistral 7B Instruct",
// Sonar Reasoning - Cost-effective model for complex queries with Chain of Thought
const PERPLEXITY_SONAR_REASONING: LLM = {
modelId: "sonar-reasoning",
modelName: "Sonar Reasoning",
provider: "perplexity",
hostedId: "mistral-7b-instruct",
platformLink: PERPLEXITY_PLATORM_LINK,
hostedId: "sonar-reasoning",
platformLink: PERPLEXITY_PLATFORM_LINK,
imageInput: false
}

// CodeLlama 70B Instruct (UPDATED 1/31/24)
const CODELLAMA_70B_INSTRUCT: LLM = {
modelId: "codellama-70b-instruct",
modelName: "CodeLlama 70B Instruct",
// Sonar Pro - Advanced search capabilities for complex queries
const PERPLEXITY_SONAR_PRO: LLM = {
modelId: "sonar-pro",
modelName: "Sonar Pro",
provider: "perplexity",
hostedId: "codellama-70b-instruct",
platformLink: PERPLEXITY_PLATORM_LINK,
hostedId: "sonar-pro",
platformLink: PERPLEXITY_PLATFORM_LINK,
imageInput: false
}

// Sonar Small Chat (UPDATED 2/25/24)
const PERPLEXITY_SONAR_SMALL_CHAT_7B: LLM = {
modelId: "sonar-small-chat",
modelName: "Sonar Small Chat",
// Sonar - Lightweight model for simple tasks, quick completions
const PERPLEXITY_SONAR: LLM = {
modelId: "sonar",
modelName: "Sonar",
provider: "perplexity",
hostedId: "sonar-small-chat",
platformLink: PERPLEXITY_PLATORM_LINK,
hostedId: "sonar",
platformLink: PERPLEXITY_PLATFORM_LINK,
imageInput: false
}

// Sonar Small Online (UPDATED 2/25/24)
const PERPLEXITY_SONAR_SMALL_ONLINE_7B: LLM = {
modelId: "sonar-small-online",
modelName: "Sonar Small Online",
// Sonar Deep Research - Expert-level research model for comprehensive queries
const PERPLEXITY_SONAR_DEEP_RESEARCH: LLM = {
modelId: "sonar-deep-research",
modelName: "Sonar Deep Research",
provider: "perplexity",
hostedId: "sonar-small-online",
platformLink: PERPLEXITY_PLATORM_LINK,
imageInput: false
}

// Sonar Medium Chat (UPDATED 2/25/24)
const PERPLEXITY_SONAR_MEDIUM_CHAT_8x7B: LLM = {
modelId: "sonar-medium-chat",
modelName: "Sonar Medium Chat",
provider: "perplexity",
hostedId: "sonar-medium-chat",
platformLink: PERPLEXITY_PLATORM_LINK,
imageInput: false
}

// Sonar Medium Online (UPDATED 2/25/24)
const PERPLEXITY_SONAR_MEDIUM_ONLINE_8x7B: LLM = {
modelId: "sonar-medium-online",
modelName: "Sonar Medium Online",
provider: "perplexity",
hostedId: "sonar-medium-online",
platformLink: PERPLEXITY_PLATORM_LINK,
hostedId: "sonar-deep-research",
platformLink: PERPLEXITY_PLATFORM_LINK,
imageInput: false
}

export const PERPLEXITY_LLM_LIST: LLM[] = [
MIXTRAL_8X7B_INSTRUCT,
MISTRAL_7B_INSTRUCT,
CODELLAMA_70B_INSTRUCT,
PERPLEXITY_SONAR_SMALL_CHAT_7B,
PERPLEXITY_SONAR_SMALL_ONLINE_7B,
PERPLEXITY_SONAR_MEDIUM_CHAT_8x7B,
PERPLEXITY_SONAR_MEDIUM_ONLINE_8x7B
PERPLEXITY_SONAR_REASONING_PRO,
PERPLEXITY_SONAR_REASONING,
PERPLEXITY_SONAR_PRO,
PERPLEXITY_SONAR,
PERPLEXITY_SONAR_DEEP_RESEARCH
]
3 changes: 2 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
})

const withPWA = require("next-pwa")({
dest: "public"
dest: "public",
disable: process.env.NODE_ENV === "development"
})

module.exports = withBundleAnalyzer(
Expand Down