🪢 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
feat(eval-table): increase cost lookback to 7d (#10000)
Hassieb Pakzade340df4326a9
diff --git a/packages/shared/src/server/repositories/observations.ts b/packages/shared/src/server/repositories/observations.tsindex dba9fe8a87..b5ad80703e 100644--- a/packages/shared/src/server/repositories/observations.ts+++ b/packages/shared/src/server/repositories/observations.ts@@ -1677,7 +1677,7 @@ export const getObservationCountsByProjectAndDay = async ({};/**- * Get total cost grouped by evaluator ID (job_configuration_id) for the last day.+ * Get total cost grouped by evaluator ID (job_configuration_id) for the last week.** @param projectId - Project ID* @param evaluatorIds - Array of evaluator IDs (job_configuration_id from metadata)@@ -1696,7 +1696,7 @@ export const getCostByEvaluatorIds = async (FROM observations FINALWHERE project_id = {projectId: String}AND metadata['job_configuration_id'] IN ({evaluatorIds: Array(String)})- AND start_time > now() - INTERVAL 24 HOURS+ AND start_time > today() - 7GROUP BY metadata['job_configuration_id']`;diff --git a/web/src/features/evals/components/evaluator-table.tsx b/web/src/features/evals/components/evaluator-table.tsxindex e42063dc5b..b3dfb204a1 100644--- a/web/src/features/evals/components/evaluator-table.tsx+++ b/web/src/features/evals/components/evaluator-table.tsx@@ -182,7 +182,7 @@ export default function EvaluatorTable({ projectId }: { projectId: string }) {},}),columnHelper.accessor("totalCost", {- header: "Total Cost (1d)",+ header: "Total Cost (7d)",id: "totalCost",size: 120,cell: (row) => {@@ -190,7 +190,7 @@ export default function EvaluatorTable({ projectId }: { projectId: string }) {if (!costs.data) return <Skeleton className="h-4 w-16" />;- if (totalCost != null) return usdFormatter(totalCost, 2, 6);+ if (totalCost != null) return usdFormatter(totalCost, 2, 4);return "–";},