mirror of
https://github.com/shane-lamb/obsidian-llm-docs.git
synced 2026-07-22 12:30:22 +00:00
added an exclusion list to slightly reduce number of selectable models
This commit is contained in:
parent
6480563c55
commit
afe735b76d
1 changed files with 10 additions and 0 deletions
|
|
@ -9,12 +9,22 @@ export interface ConnectionModel {
|
|||
model: string
|
||||
}
|
||||
|
||||
const modelExclusionList = [
|
||||
/^dall-e/,
|
||||
/embedding/,
|
||||
/(^|-)tts(-|$)/,
|
||||
/^whisper-/,
|
||||
]
|
||||
|
||||
export function getCachedConnectionModels(connections: LlmConnectionSettings[]): ConnectionModel[] {
|
||||
const models: ConnectionModel[] = []
|
||||
for (const connection of connections) {
|
||||
const connectionId = getConnectionId(connection)
|
||||
for (const [model, id] of modelToConnectionCache) {
|
||||
if (id === connectionId) {
|
||||
if (modelExclusionList.some((regex) => regex.test(model))) {
|
||||
continue
|
||||
}
|
||||
models.push({ connection, model })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue