MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / getApiKeyByProfile

Function getApiKeyByProfile

packages/config/src/auth-profiles.ts:53–57  ·  view source on GitHub ↗
(profileName: string)

Source from the content-addressed store, hash-verified

51 * 按 profile 名称获取 API Key
52 */
53export function getApiKeyByProfile(profileName: string): string {
54 const data = loadAuthProfiles()
55 const profile = data.profiles[profileName]
56 return profile?.key || ''
57}
58
59/**
60 * 按 provider 名称获取 API Key(模糊匹配,取第一个匹配的 profile)

Callers 2

resolveApiKeyFunction · 0.85

Calls 1

loadAuthProfilesFunction · 0.85

Tested by

no test coverage detected