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

Function getFastModelConfig

apps/desktop/main/ai/llm/index.ts:259–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

257
258/** 获取快速模型配置(会话摘要),未配置时回退到默认助手 */
259export function getFastModelConfig(): AIServiceConfig | null {
260 const store = loadConfigStore()
261 if (store.fastModel === null) return getDefaultAssistantConfig()
262
263 const slot = resolveSlot(store.fastModel, store.configs)
264 if (slot) {
265 const config = store.configs.find((c) => c.id === slot.configId)
266 if (config) return { ...config, model: slot.modelId || config.model }
267 }
268 return getDefaultAssistantConfig()
269}
270
271export function getConfigById(id: string): AIServiceConfig | null {
272 const store = loadConfigStore()

Callers 1

llmCompleteFunction · 0.90

Calls 3

loadConfigStoreFunction · 0.85
resolveSlotFunction · 0.70

Tested by

no test coverage detected