Skip to content

Commit

Permalink
Make text-embedding-3-large the default embedding model (#775)
Browse files Browse the repository at this point in the history
* add openai to models list in ui update default models in backend

* make text-embedding-3-large the default model
  • Loading branch information
sanjay920 authored Dec 5, 2024
1 parent a4a5b61 commit ab0b558
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/data/default-model-aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ items:
spec:
manifest:
alias: text-embedding
model: text-embedding-3-small
model: text-embedding-3-large
- apiVersion: otto.otto8.ai/v1
kind: DefaultModelAlias
metadata:
Expand Down
11 changes: 11 additions & 0 deletions pkg/controller/data/default-models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ items:
modelProvider: openai-model-provider
active: true
usage: text-embedding
- apiVersion: otto.otto8.ai/v1
kind: Model
metadata:
name: text-embedding-3-large
namespace: default
spec:
manifest:
targetModel: text-embedding-3-large
modelProvider: openai-model-provider
active: true
usage: text-embedding
- apiVersion: otto.otto8.ai/v1
kind: Model
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/handlers/knowledgeset/knowledgeset.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (h *Handler) SetEmbeddingModel(req router.Request, _ router.Response) error
if err := req.Get(&defaultEmbeddingModel, req.Namespace, string(types.DefaultModelAliasTypeTextEmbedding)); err == nil {
ks.Status.TextEmbeddingModel = defaultEmbeddingModel.Spec.Manifest.Model
} else if apierrors.IsNotFound(err) {
ks.Status.TextEmbeddingModel = "text-embedding-3-small"
ks.Status.TextEmbeddingModel = "text-embedding-3-large"
} else if err != nil {
return err
}
Expand Down

0 comments on commit ab0b558

Please sign in to comment.