Added voyage-3 and voyage-3-lite. (#2394)

This commit is contained in:
Blazej Owczarczyk 2024-09-30 18:37:25 +02:00 committed by GitHub
parent cadc09d71a
commit e07535471f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -36,6 +36,8 @@ export default function VoyageAiOptions({ settings }) {
"voyage-code-2", "voyage-code-2",
"voyage-large-2", "voyage-large-2",
"voyage-2", "voyage-2",
"voyage-3",
"voyage-3-lite",
].map((model) => { ].map((model) => {
return ( return (
<option key={model} value={model}> <option key={model} value={model}>

View File

@ -11,7 +11,7 @@ class VoyageAiEmbedder {
}); });
this.voyage = voyage; this.voyage = voyage;
this.model = process.env.EMBEDDING_MODEL_PREF || "voyage-large-2-instruct"; this.model = process.env.EMBEDDING_MODEL_PREF || "voyage-3-lite";
// Limit of how many strings we can process in a single pass to stay with resource or network limits // Limit of how many strings we can process in a single pass to stay with resource or network limits
this.batchSize = 128; // Voyage AI's limit per request is 128 https://docs.voyageai.com/docs/rate-limits#use-larger-batches this.batchSize = 128; // Voyage AI's limit per request is 128 https://docs.voyageai.com/docs/rate-limits#use-larger-batches
@ -23,6 +23,8 @@ class VoyageAiEmbedder {
switch (this.model) { switch (this.model) {
case "voyage-finance-2": case "voyage-finance-2":
case "voyage-multilingual-2": case "voyage-multilingual-2":
case "voyage-3":
case "voyage-3-lite":
return 32_000; return 32_000;
case "voyage-large-2-instruct": case "voyage-large-2-instruct":
case "voyage-law-2": case "voyage-law-2":