Skip to content

Commit

Permalink
Fix for Ada Model Name (sashabaranov#45)
Browse files Browse the repository at this point in the history
* Fix for Ada Model Name

* Refactoring ADA embeddings naming
  • Loading branch information
mtrefilek authored Dec 16, 2022
1 parent 9ada7ea commit 1c20931
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions embeddings.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const (
AdaCodeSearchText
BabbageCodeSearchCode
BabbageCodeSearchText
AdaSimilarityV2
AdaEmbeddingV2
)

var enumToString = map[EmbeddingModel]string{
Expand All @@ -72,7 +72,7 @@ var enumToString = map[EmbeddingModel]string{
AdaCodeSearchText: "code-search-ada-text-001",
BabbageCodeSearchCode: "code-search-babbage-code-001",
BabbageCodeSearchText: "code-search-babbage-text-001",
AdaSimilarityV2: "text-similarity-ada-002",
AdaEmbeddingV2: "text-embedding-ada-002",
}

var stringToEnum = map[string]EmbeddingModel{
Expand All @@ -92,7 +92,7 @@ var stringToEnum = map[string]EmbeddingModel{
"code-search-ada-text-001": AdaCodeSearchText,
"code-search-babbage-code-001": BabbageCodeSearchCode,
"code-search-babbage-text-001": BabbageCodeSearchText,
"text-similarity-ada-002": AdaSimilarityV2,
"text-embedding-ada-002": AdaEmbeddingV2,
}

// Embedding is a special format of data representation that can be easily utilized by machine
Expand Down

0 comments on commit 1c20931

Please sign in to comment.