Skip to content

Commit 5fd042c

Browse files
committed
fix(getting-started): refactor model name retrieval in listenModel function
1 parent 10d3f61 commit 5fd042c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/development/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ function listenModel(ctx: Context) {
101101
service.getAllModels(ModelType.llm).map((m) => Schema.const(m))
102102

103103
ctx.on('chatluna/model-added', (service) => {
104-
ctx.schema.set('model', Schema.union(ctx.chatluna.getModelNames(service)))
104+
ctx.schema.set('model', Schema.union(getModelNames(service)))
105105
})
106106

107107
ctx.on('chatluna/model-removed', (service) => {
108-
ctx.schema.set('model', Schema.union(ctx.chatluna.getModelNames(service)))
108+
ctx.schema.set('model', Schema.union(getModelNames(service)))
109109
})
110110

111111
ctx.on('ready', () => {

0 commit comments

Comments
 (0)