feat: add Azure OpenAI support for embedding models

This commit is contained in:
liweixin
2026-04-07 19:28:34 +08:00
committed by lyingbug
parent f72b032c1d
commit 2eb2dea634
3 changed files with 181 additions and 0 deletions
+2
View File
@@ -256,6 +256,7 @@ func (s *modelService) GetEmbeddingModel(ctx context.Context, modelId string) (e
Dimensions: model.Parameters.EmbeddingParameters.Dimension,
TruncatePromptTokens: model.Parameters.EmbeddingParameters.TruncatePromptTokens,
Provider: model.Parameters.Provider,
Extra: stringMapToAnyMap(model.Parameters.ExtraConfig),
}, s.pooler, s.ollamaService)
if err != nil {
logger.ErrorWithFields(ctx, err, map[string]interface{}{
@@ -311,6 +312,7 @@ func (s *modelService) GetEmbeddingModelForTenant(ctx context.Context, modelId s
Dimensions: model.Parameters.EmbeddingParameters.Dimension,
TruncatePromptTokens: model.Parameters.EmbeddingParameters.TruncatePromptTokens,
Provider: model.Parameters.Provider,
Extra: stringMapToAnyMap(model.Parameters.ExtraConfig),
}, s.pooler, s.ollamaService)
if err != nil {
logger.ErrorWithFields(ctx, err, map[string]interface{}{