🪢 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 { type Organization } from "@prisma/client";
import { CloudConfigSchema } from "./cloudConfigSchema";
export type ParsedOrganization = Omit<Organization, "cloudConfig"> & {
cloudConfig: CloudConfigSchema | null;
};
export function parseDbOrg(dbOrg: Organization): ParsedOrganization {
const { cloudConfig, ...org } = dbOrg;
const parsedCloudConfig = CloudConfigSchema.safeParse(cloudConfig);
const parsedOrg = {
...org,
cloudConfig: parsedCloudConfig.success ? parsedCloudConfig.data : null,
};
return parsedOrg;
}