MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / providerDefinitionToInfo

Function providerDefinitionToInfo

apps/desktop/main/ai/llm/index.ts:79–89  ·  view source on GitHub ↗
(def: ProviderDefinition)

Source from the content-addressed store, hash-verified

77}
78
79function providerDefinitionToInfo(def: ProviderDefinition): ProviderInfo {
80 const models = getBuiltinModelsByProvider(def.id)
81 return {
82 id: def.id,
83 name: def.name,
84 defaultBaseUrl: def.defaultBaseUrl,
85 models: models
86 .filter((m) => !m.capabilities.includes('embedding') && !m.capabilities.includes('ranking'))
87 .map((m) => ({ id: m.id, name: m.name, description: m.description })),
88 }
89}
90
91export const PROVIDERS: ProviderInfo[] = BUILTIN_PROVIDERS.map(providerDefinitionToInfo)
92

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected