Add new Voyage AI embedding models (#2193)

new voyageai embedding models
This commit is contained in:
Sean Hatfield 2024-08-29 14:11:00 -07:00 committed by GitHub
parent bc0cc20678
commit 86ba16acdc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,8 @@ export default function VoyageAiOptions({ settings }) {
<optgroup label="Available embedding models"> <optgroup label="Available embedding models">
{[ {[
"voyage-large-2-instruct", "voyage-large-2-instruct",
"voyage-finance-2",
"voyage-multilingual-2",
"voyage-law-2", "voyage-law-2",
"voyage-code-2", "voyage-code-2",
"voyage-large-2", "voyage-large-2",

View File

@ -21,6 +21,9 @@ class VoyageAiEmbedder {
// https://docs.voyageai.com/docs/embeddings // https://docs.voyageai.com/docs/embeddings
#getMaxEmbeddingLength() { #getMaxEmbeddingLength() {
switch (this.model) { switch (this.model) {
case "voyage-finance-2":
case "voyage-multilingual-2":
return 32_000;
case "voyage-large-2-instruct": case "voyage-large-2-instruct":
case "voyage-law-2": case "voyage-law-2":
case "voyage-code-2": case "voyage-code-2":