🪢 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
Add typing of observations
Marc Klingende646ecbbe52
diff --git a/prisma/schema.prisma b/prisma/schema.prismaindex f059194d62..e252d5c6d1 100644--- a/prisma/schema.prisma+++ b/prisma/schema.prisma@@ -83,7 +83,7 @@ model Observation {type ObservationTypename StringstartTime DateTime @map("start_time")- endTime DateTime @map("end_time")+ endTime DateTime? @map("end_time")attributes JsonparentObservationId String? @map("parent_observation_id")parent Observation? @relation("ParentChilds", fields: [parentObservationId], references: [id])diff --git a/src/utils/types.ts b/src/utils/types.tsindex eee42dfd42..73af94dc09 100644--- a/src/utils/types.ts+++ b/src/utils/types.ts@@ -6,7 +6,19 @@ export type NestedObservation = Observation & {// TODO: Marc add types for span and event+export type TypedObservation = Event | Span | LlmCall;++export type Event = Observation & {+ type: "EVENT";+};++export type Span = Observation & {+ type: "SPAN";+ endTime: Date; // not null+};+export type LlmCall = Observation & {+ type: "LLMCALL";attributes: {prompt?: string;completion?: string;