Skip to content

Commit

Permalink
fix(core): remove platform from model name parsing in set_default_emb…
Browse files Browse the repository at this point in the history
…eddings
  • Loading branch information
dingyi222666 committed Dec 28, 2024
1 parent 7c21bec commit e0ff9ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/middlewares/set_default_embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function apply(ctx: Context, config: Config, chain: ChatChain) {

const embeddings = service.getAllModels(ModelType.embeddings)

const [platform, modelName] = parseRawModelName(setEmbeddings)
const [, modelName] = parseRawModelName(setEmbeddings)

const targetEmbeddings = embeddings.filter((embeddingsName) => {
return embeddingsName.includes(modelName)
Expand Down Expand Up @@ -51,7 +51,7 @@ export function apply(ctx: Context, config: Config, chain: ChatChain) {
context.message = session.text('.model_not_found')
}

const fullName = platform + '/' + targetEmbeddings[0]
const fullName = targetEmbeddings[0]

await context.send(session.text('.success', [fullName]))

Expand Down

0 comments on commit e0ff9ae

Please sign in to comment.