MCPcopy Create free account
hub / github.com/cortexkit/magic-context / getApiKey

Function getApiKey

packages/plugin/scripts/longmemeval/judge.ts:67–73  ·  view source on GitHub ↗
(config: JudgeConfig)

Source from the content-addressed store, hash-verified

65}
66
67function getApiKey(config: JudgeConfig): string {
68 const value = process.env[config.apiKeyEnvVar];
69 if (!value) {
70 throw new Error(`Missing judge API key in environment variable ${config.apiKeyEnvVar}`);
71 }
72 return value;
73}
74
75function extractResponseText(payload: OpenAIChatCompletionResponse): string {
76 const content = payload.choices?.[0]?.message?.content;

Callers 1

judgeAnswerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected