Skip to content

Commit

Permalink
Merge pull request #94 from philippgille/add-new-embedding-models
Browse files Browse the repository at this point in the history
Update embedding model constants
  • Loading branch information
philippgille authored Aug 11, 2024
2 parents 55f437c + a43daf6 commit a194428
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 14 deletions.
7 changes: 4 additions & 3 deletions embed_cohere.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import (
type EmbeddingModelCohere string

const (
EmbeddingModelCohereMultilingualV2 EmbeddingModelCohere = "embed-multilingual-v2.0"
EmbeddingModelCohereEnglishLightV2 EmbeddingModelCohere = "embed-english-light-v2.0"
EmbeddingModelCohereEnglishV2 EmbeddingModelCohere = "embed-english-v2.0"
EmbeddingModelCohereMultilingualV2 EmbeddingModelCohere = "embed-multilingual-v2.0"
EmbeddingModelCohereEnglishLightV2 EmbeddingModelCohere = "embed-english-light-v2.0"
EmbeddingModelCohereEnglishV2 EmbeddingModelCohere = "embed-english-v2.0"

EmbeddingModelCohereMultilingualLightV3 EmbeddingModelCohere = "embed-multilingual-light-v3.0"
EmbeddingModelCohereEnglishLightV3 EmbeddingModelCohere = "embed-english-light-v3.0"
EmbeddingModelCohereMultilingualV3 EmbeddingModelCohere = "embed-multilingual-v3.0"
Expand Down
36 changes: 26 additions & 10 deletions embed_compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ const baseURLJina = "https://api.jina.ai/v1"
type EmbeddingModelJina string

const (
EmbeddingModelJina2BaseEN EmbeddingModelJina = "jina-embeddings-v2-base-en"
EmbeddingModelJina2BaseDE EmbeddingModelJina = "jina-embeddings-v2-base-de"
EmbeddingModelJina2BaseEN EmbeddingModelJina = "jina-embeddings-v2-base-en"
EmbeddingModelJina2BaseES EmbeddingModelJina = "jina-embeddings-v2-base-es"
EmbeddingModelJina2BaseDE EmbeddingModelJina = "jina-embeddings-v2-base-de"
EmbeddingModelJina2BaseZH EmbeddingModelJina = "jina-embeddings-v2-base-zh"

EmbeddingModelJina2BaseCode EmbeddingModelJina = "jina-embeddings-v2-base-code"
EmbeddingModelJina2BaseZH EmbeddingModelJina = "jina-embeddings-v2-base-zh"

EmbeddingModelJinaClipV1 EmbeddingModelJina = "jina-clip-v1"
)

// NewEmbeddingFuncJina returns a function that creates embeddings for a text
Expand All @@ -40,14 +44,26 @@ const baseURLMixedbread = "https://api.mixedbread.ai"
type EmbeddingModelMixedbread string

const (
EmbeddingModelMixedbreadUAELargeV1 EmbeddingModelMixedbread = "UAE-Large-V1"
EmbeddingModelMixedbreadBGELargeENV15 EmbeddingModelMixedbread = "bge-large-en-v1.5"
EmbeddingModelMixedbreadGTELarge EmbeddingModelMixedbread = "gte-large"
EmbeddingModelMixedbreadE5LargeV2 EmbeddingModelMixedbread = "e5-large-v2"
// Possibly outdated / not available anymore
EmbeddingModelMixedbreadUAELargeV1 EmbeddingModelMixedbread = "UAE-Large-V1"
// Possibly outdated / not available anymore
EmbeddingModelMixedbreadBGELargeENV15 EmbeddingModelMixedbread = "bge-large-en-v1.5"
// Possibly outdated / not available anymore
EmbeddingModelMixedbreadGTELarge EmbeddingModelMixedbread = "gte-large"
// Possibly outdated / not available anymore
EmbeddingModelMixedbreadE5LargeV2 EmbeddingModelMixedbread = "e5-large-v2"
// Possibly outdated / not available anymore
EmbeddingModelMixedbreadMultilingualE5Large EmbeddingModelMixedbread = "multilingual-e5-large"
EmbeddingModelMixedbreadMultilingualE5Base EmbeddingModelMixedbread = "multilingual-e5-base"
EmbeddingModelMixedbreadAllMiniLML6V2 EmbeddingModelMixedbread = "all-MiniLM-L6-v2"
EmbeddingModelMixedbreadGTELargeZh EmbeddingModelMixedbread = "gte-large-zh"
// Possibly outdated / not available anymore
EmbeddingModelMixedbreadMultilingualE5Base EmbeddingModelMixedbread = "multilingual-e5-base"
// Possibly outdated / not available anymore
EmbeddingModelMixedbreadAllMiniLML6V2 EmbeddingModelMixedbread = "all-MiniLM-L6-v2"
// Possibly outdated / not available anymore
EmbeddingModelMixedbreadGTELargeZh EmbeddingModelMixedbread = "gte-large-zh"

EmbeddingModelMixedbreadLargeV1 EmbeddingModelMixedbread = "mxbai-embed-large-v1"
EmbeddingModelMixedbreadDeepsetDELargeV1 EmbeddingModelMixedbread = "deepset-mxbai-embed-de-large-v1"
EmbeddingModelMixedbread2DLargeV1 EmbeddingModelMixedbread = "mxbai-embed-2d-large-v1"
)

// NewEmbeddingFuncMixedbread returns a function that creates embeddings for a text
Expand Down
3 changes: 2 additions & 1 deletion embed_openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const BaseURLOpenAI = "https://api.openai.com/v1"
type EmbeddingModelOpenAI string

const (
EmbeddingModelOpenAI2Ada EmbeddingModelOpenAI = "text-embedding-ada-002"
EmbeddingModelOpenAI2Ada EmbeddingModelOpenAI = "text-embedding-ada-002"

EmbeddingModelOpenAI3Small EmbeddingModelOpenAI = "text-embedding-3-small"
EmbeddingModelOpenAI3Large EmbeddingModelOpenAI = "text-embedding-3-large"
)
Expand Down

0 comments on commit a194428

Please sign in to comment.