Open dan-homebrew opened 1 month ago
How models list work?
Extension builder still ships default available models. We don't close the door, we improve the example.
// Before
override async onLoad(): Promise<void> {
super.onLoad()
// Register Settings (API Key, Endpoints)
this.registerSettings(SETTINGS)
// Pre-populate models - persist model.json files
// MODELS are model.json files that come with the extension.
this.registerModels(MODELS)
}
// After
override async onLoad(): Promise
// Fetch models from provider models endpoint - just a simple fetch
// Default to /models
get('/models')
.then((models) => {
// Model builder will construct model template (aka preset)
// This operation builds Model DTOs that works with the app.
this.registerModels(this.modelBuilder.build(models))
})
}
Remote Provider Extension |
---|
transformPayload
and transformResponse
to adapt to these cases.
/**
{
"name": "openai-extension",
"displayName": "OpenAI Extension Provider",
"icon": "https://openai.com/logo.png"
}
nitro
or others, filtering for local versus cloud sections. New local engines will be treated as remote engines (e.g. cortex.cpp). -> Filter by Extension type (class name or type, e.g. LocalOAIEngine vs RemoteOAIEngine). Extension settings do not have a community or "others" section |
---|
Idea from @norrybul: https://github.com/janhq/models/issues/23#issuecomment-2381136479
Idea from @norrybul: janhq/models#23 (comment)
Hi @dan-homebrew, that's what we initially thought we should do, but there are a couple of problems, so we've pushed back the Custom OAI Extension:
Goal
list
API)model.yaml
for each remote modelTasklist
Out-of-scope
groq-extension
)Tasklist
Remote API Extensions
Existing Issues