θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content
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
45 changes: 10 additions & 35 deletions server/utils/AiProviders/perplexity/models.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,14 @@
const MODELS = {
"llama-3.1-sonar-small-128k-online": {
id: "llama-3.1-sonar-small-128k-online",
name: "llama-3.1-sonar-small-128k-online",
maxLength: 127072,
},
"llama-3.1-sonar-large-128k-online": {
id: "llama-3.1-sonar-large-128k-online",
name: "llama-3.1-sonar-large-128k-online",
maxLength: 127072,
},
"llama-3.1-sonar-huge-128k-online": {
id: "llama-3.1-sonar-huge-128k-online",
name: "llama-3.1-sonar-huge-128k-online",
maxLength: 127072,
},
"llama-3.1-sonar-small-128k-chat": {
id: "llama-3.1-sonar-small-128k-chat",
name: "llama-3.1-sonar-small-128k-chat",
maxLength: 131072,
},
"llama-3.1-sonar-large-128k-chat": {
id: "llama-3.1-sonar-large-128k-chat",
name: "llama-3.1-sonar-large-128k-chat",
maxLength: 131072,
},
"llama-3.1-8b-instruct": {
id: "llama-3.1-8b-instruct",
name: "llama-3.1-8b-instruct",
maxLength: 131072,
},
"llama-3.1-70b-instruct": {
id: "llama-3.1-70b-instruct",
name: "llama-3.1-70b-instruct",
maxLength: 131072,
},
"sonar-pro": {
"id": "sonar-pro",
"name": "sonar-pro",
"maxLength": 200000
},
"sonar": {
"id": "sonar",
"name": "sonar",
"maxLength": 127072
}
};

module.exports.MODELS = MODELS;
9 changes: 2 additions & 7 deletions server/utils/AiProviders/perplexity/scripts/chat_models.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
| Model | Parameter Count | Context Length | Model Type |
| :---------------------------------- | :-------------- | :------------- | :-------------- |
| `llama-3.1-sonar-small-128k-online` | 8B | 127,072 | Chat Completion |
| `llama-3.1-sonar-large-128k-online` | 70B | 127,072 | Chat Completion |
| `llama-3.1-sonar-huge-128k-online` | 405B | 127,072 | Chat Completion |
| `llama-3.1-sonar-small-128k-chat` | 8B | 131,072 | Chat Completion |
| `llama-3.1-sonar-large-128k-chat` | 70B | 131,072 | Chat Completion |
| `llama-3.1-8b-instruct` | 8B | 131,072 | Chat Completion |
| `llama-3.1-70b-instruct` | 70B | 131,072 | Chat Completion |
| `sonar-pro` | 8B | 200,000 | Chat Completion |
| `sonar` | 8B | 127,072 | Chat Completion |
7 changes: 6 additions & 1 deletion server/utils/AiProviders/perplexity/scripts/parse.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
// copy outputs into the export in ../models.js

// Update the date below if you run this again because Perplexity added new models.
// Last Collected: Sept 12, 2024
// Last Collected: Jan 23, 2025

// UPDATE: Jan 23, 2025
// The table is no longer available on the website, but Perplexity has deprecated the
// old models so now we can just update the chat_models.txt file with the new models
// manually and then run this script to get the new models.

import fs from "fs";

Expand Down