MCPcopy
hub / github.com/lingodotdev/lingo.dev / getKeyFromRc

Function getKeyFromRc

packages/compiler/src/utils/llm-api-key.ts:22–26  ·  view source on GitHub ↗
(rcPath: string)

Source from the content-addressed store, hash-verified

20
21// Generic function to retrieve key from .lingodotdevrc file
22function getKeyFromRc(rcPath: string): string | undefined {
23 const rc = getRc();
24 const result = _.get(rc, rcPath);
25 return typeof result === "string" ? result : undefined;
26}
27
28export function getGroqKey() {
29 return getGroqKeyFromEnv() || getGroqKeyFromRc();

Callers 7

getGroqKeyFromRcFunction · 0.85
getLingoDotDevKeyFromRcFunction · 0.85
getGoogleKeyFromRcFunction · 0.85
getOpenRouterKeyFromRcFunction · 0.85
getMistralKeyFromRcFunction · 0.85
getOpenAIKeyFromRcFunction · 0.85
getAnthropicKeyFromRcFunction · 0.85

Calls 2

getRcFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected