🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
import { MULTI_WINDOW_CONFIG } from "../types";
export const WINDOW_IDS_KEY = "playgroundWindowIds";
export const STREAMING_PREF_KEY = "langfuse-playground-streaming";
const getPrefixedKey = (prefix: string, windowId: string) => {
const effectiveWindowId = windowId || MULTI_WINDOW_CONFIG.DEFAULT_WINDOW_ID;
if (effectiveWindowId === MULTI_WINDOW_CONFIG.DEFAULT_WINDOW_ID) {
return prefix.endsWith("_") ? prefix.slice(0, -1) : prefix;
}
return `${prefix}${effectiveWindowId}`;
};
export const getCacheKey = (windowId: string) =>
getPrefixedKey("langfuse-playgroundCache_", windowId);
export const getModelNameKey = (windowId: string) =>
getPrefixedKey("langfuse-llmModelName_", windowId);
export const getModelProviderKey = (windowId: string) =>
getPrefixedKey("langfuse-llmModelProvider_", windowId);