这是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
38 changes: 29 additions & 9 deletions server/utils/AiProviders/perplexity/models.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
const MODELS = {
"sonar-small-chat": {
id: "sonar-small-chat",
name: "sonar-small-chat",
maxLength: 16384,
},
"sonar-small-online": {
id: "sonar-small-online",
name: "sonar-small-online",
maxLength: 12000,
},
"sonar-medium-chat": {
id: "sonar-medium-chat",
name: "sonar-medium-chat",
maxLength: 16384,
},
"sonar-medium-online": {
id: "sonar-medium-online",
name: "sonar-medium-online",
maxLength: 12000,
},
"codellama-34b-instruct": {
id: "codellama-34b-instruct",
name: "codellama-34b-instruct",
Expand All @@ -17,32 +37,32 @@ const MODELS = {
"mistral-7b-instruct": {
id: "mistral-7b-instruct",
name: "mistral-7b-instruct",
maxLength: 8192,
maxLength: 16384,
},
"mixtral-8x7b-instruct": {
id: "mixtral-8x7b-instruct",
name: "mixtral-8x7b-instruct",
maxLength: 8192,
maxLength: 16384,
},
"pplx-7b-chat": {
id: "pplx-7b-chat",
name: "pplx-7b-chat",
maxLength: 8192,
},
"pplx-70b-chat": {
id: "pplx-70b-chat",
name: "pplx-70b-chat",
maxLength: 8192,
maxLength: 16384,
},
"pplx-7b-online": {
id: "pplx-7b-online",
name: "pplx-7b-online",
maxLength: 12000,
},
"pplx-70b-chat": {
id: "pplx-70b-chat",
name: "pplx-70b-chat",
maxLength: 8192,
},
"pplx-70b-online": {
id: "pplx-70b-online",
name: "pplx-70b-online",
maxLength: 8192,
maxLength: 4000,
},
};

Expand Down
26 changes: 15 additions & 11 deletions server/utils/AiProviders/perplexity/scripts/chat_models.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
| Model | Context Length | Model Type |
| :------------------------ | :------------- | :-------------- |
| `codellama-34b-instruct` | 16384 | Chat Completion |
| `codellama-70b-instruct` | 16384 | Chat Completion |
| `llama-2-70b-chat` | 4096 | Chat Completion |
| `mistral-7b-instruct` [2] | 8192 [1] | Chat Completion |
| `mixtral-8x7b-instruct` | 8192 [1] | Chat Completion |
| `pplx-7b-chat` | 8192 | Chat Completion |
| `pplx-70b-chat` | 8192 | Chat Completion |
| `pplx-7b-online` | 8192 | Chat Completion |
| `pplx-70b-online` | 8192 | Chat Completion |
| Model | Parameter Count | Context Length | Model Type |
| :-------------------------- | :-------------- | :------------- | :-------------- |
| `sonar-small-chat` | 7B | 16384 | Chat Completion |
| `sonar-small-online` | 7B | 12000 | Chat Completion |
| `sonar-medium-chat` | 8x7B | 16384 | Chat Completion |
| `sonar-medium-online` | 8x7B | 12000 | Chat Completion |
| `codellama-34b-instruct`[3] | 34B | 16384 | Chat Completion |
| `codellama-70b-instruct` | 70B | 16384 | Chat Completion |
| `llama-2-70b-chat`[3] | 70B | 4096 | Chat Completion |
| `mistral-7b-instruct` [1] | 7B | 16384 | Chat Completion |
| `mixtral-8x7b-instruct` | 8x7B | 16384 | Chat Completion |
| `pplx-7b-chat`[2] [3] | 7B | 16384 | Chat Completion |
| `pplx-7b-online`[2] [3] | 7B | 12000 | Chat Completion |
| `pplx-70b-chat`[3] | 70B | 8192 | Chat Completion |
| `pplx-70b-online`[3] | 70B | 4000 | Chat Completion |
4 changes: 2 additions & 2 deletions server/utils/AiProviders/perplexity/scripts/parse.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// copy outputs into the export in ../models.js

// Update the date below if you run this again because Perplexity added new models.
// Last Collected: Feb 22, 2024
// Last Collected: Feb 23, 2024

import fs from "fs";

Expand All @@ -18,7 +18,7 @@ function parseChatModels() {
const rows = tableString.split("\n").slice(2);

rows.forEach((row) => {
let [model, contextLength] = row
let [model, _, contextLength] = row
.split("|")
.slice(1, -1)
.map((text) => text.trim());
Expand Down