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

Function buildPiModel

apps/desktop/main/ai/llm/index.ts:434–441  ·  view source on GitHub ↗
(config: AIServiceConfig)

Source from the content-addressed store, hash-verified

432// ==================== pi-ai Model 构建 ====================
433
434export function buildPiModel(config: AIServiceConfig): PiModel<PiApi> {
435 validateProviderBaseUrl(config.provider, config.baseUrl)
436
437 return buildPiModelCore(config, {
438 findModelFn: findModelDefinition,
439 headers: config.provider === 'openai-compatible' ? buildChatLabUserAgentHeaders() : undefined,
440 })
441}
442
443// ==================== Remote Model API ====================
444

Callers 5

buildCompressionAdapterFunction · 0.90
llmCompleteFunction · 0.90
runAgentFunction · 0.90
runAgentStreamFunction · 0.90

Calls 2

validateProviderBaseUrlFunction · 0.85

Tested by

no test coverage detected