🪢 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 { zipToolCallsFromRecord } from "@langfuse/shared";
export function buildSelectedSampleObject<
TObservation extends object,
TEventDetails extends object,
>({
observation,
eventDetails,
}: {
observation: TObservation | null;
eventDetails: TEventDetails | null | undefined;
}) {
if (!observation || !eventDetails) return null;
return {
...observation,
...eventDetails,
toolCalls: zipToolCallsFromRecord(eventDetails),
};
}