From 7d81c4d9c97135070a05ec97f544e4973f13f222 Mon Sep 17 00:00:00 2001 From: Justin Torre Date: Fri, 20 Dec 2024 15:18:45 -0800 Subject: [PATCH] Pi (#3087) --- bifrost/app/pi/first_page/page.tsx | 45 +- bifrost/app/pi/page.tsx | 12 +- bifrost/app/pi/setup/page.tsx | 6 +- bifrost/app/pi/total-cost/page.tsx | 135 + bifrost/app/pi/total-requests/page.tsx | 180 ++ bifrost/app/pi/useHeliconeLogin.ts | 1 + bifrost/lib/clients/jawn.ts | 5 +- bifrost/lib/clients/jawnHook.tsx | 4 +- bifrost/lib/clients/jawnTypes/private.ts | 476 ++-- bifrost/lib/clients/jawnTypes/public.ts | 518 ++-- bifrost/public/static/pi/arrow-left.webp | Bin 0 -> 618 bytes bifrost/public/static/pi/arrow-right.webp | Bin 0 -> 610 bytes bifrost/public/static/pi/intro-image.png | Bin 34814 -> 0 bytes bifrost/public/static/pi/intro-image.webp | Bin 0 -> 23586 bytes docs/swagger.json | 2161 +++++++++-------- .../src/controllers/public/piController.ts | 156 +- .../jawn/src/tsoa-build/private/routes.ts | 693 +++--- .../jawn/src/tsoa-build/private/swagger.json | 1641 +++++++------ valhalla/jawn/src/tsoa-build/public/routes.ts | 713 +++--- .../jawn/src/tsoa-build/public/swagger.json | 2161 +++++++++-------- web/lib/clients/jawnTypes/private.ts | 476 ++-- web/lib/clients/jawnTypes/public.ts | 518 ++-- 22 files changed, 5700 insertions(+), 4201 deletions(-) create mode 100644 bifrost/app/pi/total-cost/page.tsx create mode 100644 bifrost/app/pi/total-requests/page.tsx create mode 100644 bifrost/public/static/pi/arrow-left.webp create mode 100644 bifrost/public/static/pi/arrow-right.webp delete mode 100644 bifrost/public/static/pi/intro-image.png create mode 100644 bifrost/public/static/pi/intro-image.webp diff --git a/bifrost/app/pi/first_page/page.tsx b/bifrost/app/pi/first_page/page.tsx index b4ba9481c8..5132be0a4e 100644 --- a/bifrost/app/pi/first_page/page.tsx +++ b/bifrost/app/pi/first_page/page.tsx @@ -6,30 +6,51 @@ import { useRouter } from "next/navigation"; import { Suspense } from "react"; import { useHeliconeLogin } from "./../useHeliconeLogin"; import { useTestAPIKey } from "./useTestApiKey"; +import { useQuery } from "@tanstack/react-query"; const jetbrainsMono = JetBrains_Mono({ subsets: ["latin"] }); const FirstPageContent = () => { - const jawn = useJawnClient(); const { apiKey, sessionUUID } = useHeliconeLogin(); const { data, isLoading } = useTestAPIKey(apiKey.data ?? ""); + const jawn = useJawnClient(apiKey.data ?? ""); const router = useRouter(); - if ((!data && !isLoading) || !apiKey.data) { + router.push("/pi/total-requests"); + const orgName = useQuery({ + queryKey: ["org-name", apiKey.data], + queryFn: () => jawn.POST("/v1/pi/org-name/query"), + }); + + const totalCosts = useQuery({ + queryKey: ["total-costs", apiKey.data], + queryFn: () => jawn.POST("/v1/pi/total-costs"), + }); + + const costsOverTime = useQuery({ + queryKey: ["costs-over-time", apiKey.data], + queryFn: () => + jawn.POST("/v1/pi/costs-over-time/query", { + body: { + userFilter: "all", + dbIncrement: "day", + timeZoneDifference: new Date().getTimezoneOffset(), + timeFilter: { + start: new Date( + Date.now() - 30 * 24 * 60 * 60 * 1000 + ).toISOString(), + end: new Date().toISOString(), + }, + }, + }), + }); + + if (!data && !isLoading && !apiKey.data && !apiKey.isLoading) { router.push("/pi/setup?invalid_api_key=true"); return
Loading...
; } - return ( -
-

- LOGGED IN! WOOOHOO -

- {data && JSON.stringify(data).slice(0, 100)} -
- ); + return
; }; const PiPage = () => { diff --git a/bifrost/app/pi/page.tsx b/bifrost/app/pi/page.tsx index ac6607ad4a..42b9e4d829 100644 --- a/bifrost/app/pi/page.tsx +++ b/bifrost/app/pi/page.tsx @@ -13,16 +13,16 @@ const jetbrainsMono = JetBrains_Mono({ subsets: ["latin"] }); const PiPageContent = () => { return ( -
-

+
+

Welcome to Helicone!

Helicone Logo { Start diff --git a/bifrost/app/pi/setup/page.tsx b/bifrost/app/pi/setup/page.tsx index d61b6a8afa..1cb9b565c1 100644 --- a/bifrost/app/pi/setup/page.tsx +++ b/bifrost/app/pi/setup/page.tsx @@ -19,8 +19,8 @@ const PiPageContent = () => { ); const { data, isLoading } = useTestAPIKey(apiKey.data ?? ""); - if (apiKey.data && data && !isLoading) { - router.push("/pi/first_page"); + if (apiKey.data && data && !isLoading && !apiKey.isLoading) { + router.push("/pi/total-requests"); return
Loading...
; } @@ -34,7 +34,7 @@ const PiPageContent = () => {
Helicone Logo { + const { apiKey } = useHeliconeLogin(); + const { data, isLoading } = useTestAPIKey(apiKey.data ?? ""); + const router = useRouter(); + + const jawn = useJawnClient(apiKey.data ?? ""); + + const totalRequests = useQuery({ + queryKey: ["total-requests", apiKey.data], + queryFn: () => jawn.POST("/v1/pi/total_requests"), + }); + + const costsOverTime = useQuery({ + queryKey: ["costs-over-time", apiKey.data], + queryFn: () => + jawn.POST("/v1/pi/costs-over-time/query", { + body: { + userFilter: "all", + dbIncrement: "day", + timeZoneDifference: new Date().getTimezoneOffset(), + timeFilter: { + start: new Date( + Date.now() - 30 * 24 * 60 * 60 * 1000 + ).toISOString(), + end: new Date().toISOString(), + }, + }, + }), + }); + const costsOverTimeData = costsOverTime.data?.data?.data; + + if (!data && !isLoading && !apiKey.data && !apiKey.isLoading) { + router.push("/pi/setup?invalid_api_key=true"); + return null; + } + + return ( +
+
+
+
Total Cost
+
+ $ + {costsOverTimeData + ?.reduce((sum, item) => sum + item.cost, 0) + ?.toFixed(2) ?? "0.00"} +
+
+
+
+
costs
+
+ + + + + new Date(value).toLocaleDateString(undefined, { + month: "numeric", + day: "numeric", + year: "2-digit", + }) + } + includeHidden + interval={6} + tickSize={14} + padding={{ left: 16, right: 16 }} + tickMargin={8} + fontSize={12} + strokeWidth={1.52} + stroke="#000000" + /> + {/* */} + + + +
+
+ + {/* eslint-disable-next-line @next/next/no-img-element */} + arrow-left + + + + {/* eslint-disable-next-line @next/next/no-img-element */} + arrow-right + +
+
+ ); +}; + +export default TotalCost; diff --git a/bifrost/app/pi/total-requests/page.tsx b/bifrost/app/pi/total-requests/page.tsx new file mode 100644 index 0000000000..f427a4cbf0 --- /dev/null +++ b/bifrost/app/pi/total-requests/page.tsx @@ -0,0 +1,180 @@ +"use client"; + +import { useRouter } from "next/navigation"; +import { useHeliconeLogin } from "../useHeliconeLogin"; + +import { JetBrains_Mono } from "next/font/google"; +import { useTestAPIKey } from "../first_page/useTestApiKey"; +import { useJawnClient } from "@/lib/clients/jawnHook"; +import { useQuery } from "@tanstack/react-query"; +import Link from "next/link"; +const jetbrainsMono = JetBrains_Mono({ subsets: ["latin"] }); + +const formatNumber = ( + number: number +): [ + number | null, + number | null, + "." | "," | number | null, + number | null | ".", + number | null, + number | null | "B" | "M" +] => { + if (number < 10) { + return [null, null, null, null, null, number]; + } else if (number < 100) { + return [ + null, + null, + null, + null, + Number(number.toString().split("")[0]), + Number(number.toString().split("")[1]), + ]; + } else if (number < 1000) { + return [ + null, + null, + null, + Number(number.toString().split("")[0]), + Number(number.toString().split("")[1]), + Number(number.toString().split("")[2]), + ]; + } else if (number < 10000) { + return [ + null, + Number(number.toString().split("")[0]), + ",", + Number(number.toString().split("")[1]), + Number(number.toString().split("")[2]), + Number(number.toString().split("")[3]), + ]; + } else if (number < 100_000) { + return [ + Number(number.toString().split("")[0]), + Number(number.toString().split("")[1]), + ",", + Number(number.toString().split("")[2]), + Number(number.toString().split("")[3]), + Number(number.toString().split("")[4]), + ]; + } else if (number < 1_000_000) { + // 2,345,678 = _,2,.,3,4,M + return [ + null, + Number(number.toString().split("")[0]), + ".", + Number(number.toString().split("")[1]), + Number(number.toString().split("")[2]), + "M", + ]; + } else if (number < 10_000_000) { + // 23,456,789 = 2,3,.,4,5,M + return [ + Number(number.toString().split("")[0]), + Number(number.toString().split("")[1]), + ".", + Number(number.toString().split("")[2]), + Number(number.toString().split("")[3]), + "M", + ]; + } else if (number < 100_000_000) { + // 234,567,890 = 2,3,4,.,5,M + return [ + Number(number.toString().split("")[0]), + Number(number.toString().split("")[1]), + Number(number.toString().split("")[2]), + ".", + Number(number.toString().split("")[3]), + "M", + ]; + } else if (number < 1_000_000_000) { + // 245,678,901 = _,_,2,4,5,M + return [ + null, + null, + Number(number.toString().split("")[0]), + Number(number.toString().split("")[1]), + Number(number.toString().split("")[2]), + "M", + ]; + } else if (number < 10_000_000_000) { + // 1,234,567,890 = _,1,.,2,3,B + return [ + null, + Number(number.toString().split("")[0]), + ".", + Number(number.toString().split("")[1]), + Number(number.toString().split("")[2]), + "B", + ]; + } else { + return [null, null, null, null, null, null]; + } +}; + +const TotalRequestsPage = () => { + const { apiKey } = useHeliconeLogin(); + const { data, isLoading } = useTestAPIKey(apiKey.data ?? ""); + const router = useRouter(); + + const jawn = useJawnClient(apiKey.data ?? ""); + + const totalRequests = useQuery({ + queryKey: ["total-requests", apiKey.data], + queryFn: () => jawn.POST("/v1/pi/total_requests"), + }); + + if (!data && !isLoading && !apiKey.data && !apiKey.isLoading) { + router.push("/pi/setup?invalid_api_key=true"); + return null; + } + + return ( +
+
+
+ Total Requests +
{" "} +
+ {formatNumber(totalRequests.data?.data?.data ?? 0).map( + (num, index) => ( +
+ {num} +
+ ) + )} +
+
+ Last 30 days +
+ {/* {JSON.stringify(formatNumber(totalRequests.data?.data?.data ?? 0))} */} +
+
+ + {/* eslint-disable-next-line @next/next/no-img-element */} + arrow-left + + + {/* eslint-disable-next-line @next/next/no-img-element */} + arrow-left + +
+
+ ); +}; + +export default TotalRequestsPage; diff --git a/bifrost/app/pi/useHeliconeLogin.ts b/bifrost/app/pi/useHeliconeLogin.ts index 81cfb7f08c..0358474c6f 100644 --- a/bifrost/app/pi/useHeliconeLogin.ts +++ b/bifrost/app/pi/useHeliconeLogin.ts @@ -78,6 +78,7 @@ export const useHeliconeLogin = (invalid_api_key?: boolean) => { return apiKey.data?.data?.apiKey; }, refetchInterval: 10_000, // 1 second + staleTime: 0, }); return { diff --git a/bifrost/lib/clients/jawn.ts b/bifrost/lib/clients/jawn.ts index c8903e11e5..39114f488d 100644 --- a/bifrost/lib/clients/jawn.ts +++ b/bifrost/lib/clients/jawn.ts @@ -3,7 +3,7 @@ import type { paths as privatePaths } from "./jawnTypes/private"; import createClient from "openapi-fetch"; export type JawnFilterNode = any; -export function getJawnClient(orgId?: string | "none") { +export function getJawnClient(apiKey?: string) { // const jwtToken = getHeliconeCookie().data?.jwtToken; // const headers = // orgId !== "none" @@ -19,6 +19,9 @@ export function getJawnClient(orgId?: string | "none") { return createClient({ baseUrl: process.env.NEXT_PUBLIC_HELICONE_JAWN_SERVICE ?? "http://localhost:8585", + headers: { + Authorization: `Bearer ${apiKey}`, + }, }); } diff --git a/bifrost/lib/clients/jawnHook.tsx b/bifrost/lib/clients/jawnHook.tsx index 5265eb3185..ec6d63be4c 100644 --- a/bifrost/lib/clients/jawnHook.tsx +++ b/bifrost/lib/clients/jawnHook.tsx @@ -1,6 +1,6 @@ import { getJawnClient } from "./jawn"; -export const useJawnClient = () => { +export const useJawnClient = (apiKey?: string) => { // const org = useOrg(); - return getJawnClient(); + return getJawnClient(apiKey); }; diff --git a/bifrost/lib/clients/jawnTypes/private.ts b/bifrost/lib/clients/jawnTypes/private.ts index 9edb00ad0b..1ae4e696aa 100644 --- a/bifrost/lib/clients/jawnTypes/private.ts +++ b/bifrost/lib/clients/jawnTypes/private.ts @@ -301,27 +301,6 @@ export interface paths { "/v1/integration/slack/channels": { get: operations["GetSlackChannels"]; }; - "/v1/experiment/dataset": { - post: operations["AddDataset"]; - }; - "/v1/experiment/dataset/random": { - post: operations["AddRandomDataset"]; - }; - "/v1/experiment/dataset/query": { - post: operations["GetDatasets"]; - }; - "/v1/experiment/dataset/{datasetId}/row/insert": { - post: operations["InsertDatasetRow"]; - }; - "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { - post: operations["CreateDatasetRow"]; - }; - "/v1/experiment/dataset/{datasetId}/inputs/query": { - post: operations["GetDataset"]; - }; - "/v1/experiment/dataset/{datasetId}/mutate": { - post: operations["MutateDataset"]; - }; "/v1/experiment/new-empty": { post: operations["CreateNewEmptyExperiment"]; }; @@ -378,6 +357,27 @@ export interface paths { "/v1/experiment/query": { post: operations["GetExperimentsOld"]; }; + "/v1/experiment/dataset": { + post: operations["AddDataset"]; + }; + "/v1/experiment/dataset/random": { + post: operations["AddRandomDataset"]; + }; + "/v1/experiment/dataset/query": { + post: operations["GetDatasets"]; + }; + "/v1/experiment/dataset/{datasetId}/row/insert": { + post: operations["InsertDatasetRow"]; + }; + "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { + post: operations["CreateDatasetRow"]; + }; + "/v1/experiment/dataset/{datasetId}/inputs/query": { + post: operations["GetDataset"]; + }; + "/v1/experiment/dataset/{datasetId}/mutate": { + post: operations["MutateDataset"]; + }; "/v1/helicone-dataset": { post: operations["AddHeliconeDataset"]; }; @@ -523,6 +523,18 @@ export interface paths { "/v1/pi/session": { post: operations["AddSession"]; }; + "/v1/pi/org-name/query": { + post: operations["GetOrgName"]; + }; + "/v1/pi/total-costs": { + post: operations["GetTotalCosts"]; + }; + "/v1/pi/total_requests": { + post: operations["GetTotalRequests"]; + }; + "/v1/pi/costs-over-time/query": { + post: operations["GetCostsOverTime"]; + }; "/v1/settings/query": { get: operations["GetSettings"]; }; @@ -2372,64 +2384,6 @@ Json: JsonObject; error: null; }; "Result_Array__id-string--name-string__.string_": components["schemas"]["ResultSuccess_Array__id-string--name-string___"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__datasetId-string__": { - data: { - datasetId: string; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__datasetId-string_.string_": components["schemas"]["ResultSuccess__datasetId-string__"] | components["schemas"]["ResultError_string_"]; - DatasetMetadata: { - promptVersionId?: string; - inputRecordsIds?: string[]; - }; - NewDatasetParams: { - datasetName: string; - requestIds: string[]; - /** @enum {string} */ - datasetType: "experiment" | "helicone"; - meta?: components["schemas"]["DatasetMetadata"]; - }; - /** @description From T, pick a set of properties whose keys are in the union K */ - "Pick_FilterLeaf.request-or-prompts_versions_": { - request?: components["schemas"]["Partial_RequestTableToOperators_"]; - prompts_versions?: components["schemas"]["Partial_PromptVersionsToOperators_"]; - }; - "FilterLeafSubset_request-or-prompts_versions_": components["schemas"]["Pick_FilterLeaf.request-or-prompts_versions_"]; - DatasetFilterNode: components["schemas"]["FilterLeafSubset_request-or-prompts_versions_"] | components["schemas"]["DatasetFilterBranch"] | "all"; - DatasetFilterBranch: { - right: components["schemas"]["DatasetFilterNode"]; - /** @enum {string} */ - operator: "or" | "and"; - left: components["schemas"]["DatasetFilterNode"]; - }; - RandomDatasetParams: { - datasetName: string; - filter: components["schemas"]["DatasetFilterNode"]; - /** Format: double */ - offset?: number; - /** Format: double */ - limit?: number; - }; - DatasetResult: { - id: string; - name: string; - created_at: string; - meta?: components["schemas"]["DatasetMetadata"]; - }; - "ResultSuccess_DatasetResult-Array_": { - data: components["schemas"]["DatasetResult"][]; - /** @enum {number|null} */ - error: null; - }; - "Result_DatasetResult-Array.string_": components["schemas"]["ResultSuccess_DatasetResult-Array_"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess___-Array_": { - data: Record[]; - /** @enum {number|null} */ - error: null; - }; - "Result___-Array.string_": components["schemas"]["ResultSuccess___-Array_"] | components["schemas"]["ResultError_string_"]; "ResultSuccess__tableId-string--experimentId-string__": { data: { experimentId: string; @@ -2659,6 +2613,64 @@ Json: JsonObject; /** @enum {boolean} */ score?: true; }; + "ResultSuccess__datasetId-string__": { + data: { + datasetId: string; + }; + /** @enum {number|null} */ + error: null; + }; + "Result__datasetId-string_.string_": components["schemas"]["ResultSuccess__datasetId-string__"] | components["schemas"]["ResultError_string_"]; + DatasetMetadata: { + promptVersionId?: string; + inputRecordsIds?: string[]; + }; + NewDatasetParams: { + datasetName: string; + requestIds: string[]; + /** @enum {string} */ + datasetType: "experiment" | "helicone"; + meta?: components["schemas"]["DatasetMetadata"]; + }; + /** @description From T, pick a set of properties whose keys are in the union K */ + "Pick_FilterLeaf.request-or-prompts_versions_": { + request?: components["schemas"]["Partial_RequestTableToOperators_"]; + prompts_versions?: components["schemas"]["Partial_PromptVersionsToOperators_"]; + }; + "FilterLeafSubset_request-or-prompts_versions_": components["schemas"]["Pick_FilterLeaf.request-or-prompts_versions_"]; + DatasetFilterNode: components["schemas"]["FilterLeafSubset_request-or-prompts_versions_"] | components["schemas"]["DatasetFilterBranch"] | "all"; + DatasetFilterBranch: { + right: components["schemas"]["DatasetFilterNode"]; + /** @enum {string} */ + operator: "or" | "and"; + left: components["schemas"]["DatasetFilterNode"]; + }; + RandomDatasetParams: { + datasetName: string; + filter: components["schemas"]["DatasetFilterNode"]; + /** Format: double */ + offset?: number; + /** Format: double */ + limit?: number; + }; + DatasetResult: { + id: string; + name: string; + created_at: string; + meta?: components["schemas"]["DatasetMetadata"]; + }; + "ResultSuccess_DatasetResult-Array_": { + data: components["schemas"]["DatasetResult"][]; + /** @enum {number|null} */ + error: null; + }; + "Result_DatasetResult-Array.string_": components["schemas"]["ResultSuccess_DatasetResult-Array_"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess___-Array_": { + data: Record[]; + /** @enum {number|null} */ + error: null; + }; + "Result___-Array.string_": components["schemas"]["ResultSuccess___-Array_"] | components["schemas"]["ResultError_string_"]; HeliconeDatasetMetadata: { promptVersionId?: string; inputRecordsIds?: string[]; @@ -3138,6 +3150,16 @@ Json: JsonObject; error: null; }; "Result__apiKey-string_.string_": components["schemas"]["ResultSuccess__apiKey-string__"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + data: { + created_at_trunc: string; + /** Format: double */ + cost: number; + }[]; + /** @enum {number|null} */ + error: null; + }; + "Result__cost-number--created_at_trunc-string_-Array.string_": components["schemas"]["ResultSuccess__cost-number--created_at_trunc-string_-Array_"] | components["schemas"]["ResultError_string_"]; }; responses: { }; @@ -5023,134 +5045,6 @@ export interface operations { }; }; }; - AddDataset: { - requestBody: { - content: { - "application/json": components["schemas"]["NewDatasetParams"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__datasetId-string_.string_"]; - }; - }; - }; - }; - AddRandomDataset: { - requestBody: { - content: { - "application/json": components["schemas"]["RandomDatasetParams"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__datasetId-string_.string_"]; - }; - }; - }; - }; - GetDatasets: { - requestBody: { - content: { - "application/json": { - promptVersionId?: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_DatasetResult-Array.string_"]; - }; - }; - }; - }; - InsertDatasetRow: { - parameters: { - path: { - datasetId: string; - }; - }; - requestBody: { - content: { - "application/json": { - originalColumnId?: string; - inputs: components["schemas"]["Record_string.string_"]; - inputRecordId: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_string.string_"]; - }; - }; - }; - }; - CreateDatasetRow: { - parameters: { - path: { - datasetId: string; - promptVersionId: string; - }; - }; - requestBody: { - content: { - "application/json": { - sourceRequest?: string; - inputs: components["schemas"]["Record_string.string_"]; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_string.string_"]; - }; - }; - }; - }; - GetDataset: { - parameters: { - path: { - datasetId: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_PromptInputRecord-Array.string_"]; - }; - }; - }; - }; - MutateDataset: { - requestBody: { - content: { - "application/json": { - removeRequests: string[]; - addRequests: string[]; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result___-Array.string_"]; - }; - }; - }; - }; CreateNewEmptyExperiment: { requestBody: { content: { @@ -5514,6 +5408,134 @@ export interface operations { }; }; }; + AddDataset: { + requestBody: { + content: { + "application/json": components["schemas"]["NewDatasetParams"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__datasetId-string_.string_"]; + }; + }; + }; + }; + AddRandomDataset: { + requestBody: { + content: { + "application/json": components["schemas"]["RandomDatasetParams"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__datasetId-string_.string_"]; + }; + }; + }; + }; + GetDatasets: { + requestBody: { + content: { + "application/json": { + promptVersionId?: string; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_DatasetResult-Array.string_"]; + }; + }; + }; + }; + InsertDatasetRow: { + parameters: { + path: { + datasetId: string; + }; + }; + requestBody: { + content: { + "application/json": { + originalColumnId?: string; + inputs: components["schemas"]["Record_string.string_"]; + inputRecordId: string; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + CreateDatasetRow: { + parameters: { + path: { + datasetId: string; + promptVersionId: string; + }; + }; + requestBody: { + content: { + "application/json": { + sourceRequest?: string; + inputs: components["schemas"]["Record_string.string_"]; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + GetDataset: { + parameters: { + path: { + datasetId: string; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_PromptInputRecord-Array.string_"]; + }; + }; + }; + }; + MutateDataset: { + requestBody: { + content: { + "application/json": { + removeRequests: string[]; + addRequests: string[]; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result___-Array.string_"]; + }; + }; + }; + }; AddHeliconeDataset: { requestBody: { content: { @@ -5661,11 +5683,6 @@ export interface operations { }; }; GetTotalRequests: { - requestBody: { - content: { - "application/json": components["schemas"]["DataIsBeautifulRequestBody"]; - }; - }; responses: { /** @description Ok */ 200: { @@ -6304,6 +6321,41 @@ export interface operations { }; }; }; + GetOrgName: { + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + GetTotalCosts: { + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_number.string_"]; + }; + }; + }; + }; + GetCostsOverTime: { + requestBody: { + content: { + "application/json": components["schemas"]["DataOverTimeRequest"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__cost-number--created_at_trunc-string_-Array.string_"]; + }; + }; + }; + }; GetSettings: { responses: { /** @description Ok */ diff --git a/bifrost/lib/clients/jawnTypes/public.ts b/bifrost/lib/clients/jawnTypes/public.ts index 5b20d59eef..0f7b89456e 100644 --- a/bifrost/lib/clients/jawnTypes/public.ts +++ b/bifrost/lib/clients/jawnTypes/public.ts @@ -256,6 +256,27 @@ export interface paths { "/v1/integration/slack/channels": { get: operations["GetSlackChannels"]; }; + "/v1/experiment/dataset": { + post: operations["AddDataset"]; + }; + "/v1/experiment/dataset/random": { + post: operations["AddRandomDataset"]; + }; + "/v1/experiment/dataset/query": { + post: operations["GetDatasets"]; + }; + "/v1/experiment/dataset/{datasetId}/row/insert": { + post: operations["InsertDatasetRow"]; + }; + "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { + post: operations["CreateDatasetRow"]; + }; + "/v1/experiment/dataset/{datasetId}/inputs/query": { + post: operations["GetDataset"]; + }; + "/v1/experiment/dataset/{datasetId}/mutate": { + post: operations["MutateDataset"]; + }; "/v1/experiment/new-empty": { post: operations["CreateNewEmptyExperiment"]; }; @@ -312,27 +333,6 @@ export interface paths { "/v1/experiment/query": { post: operations["GetExperimentsOld"]; }; - "/v1/experiment/dataset": { - post: operations["AddDataset"]; - }; - "/v1/experiment/dataset/random": { - post: operations["AddRandomDataset"]; - }; - "/v1/experiment/dataset/query": { - post: operations["GetDatasets"]; - }; - "/v1/experiment/dataset/{datasetId}/row/insert": { - post: operations["InsertDatasetRow"]; - }; - "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { - post: operations["CreateDatasetRow"]; - }; - "/v1/experiment/dataset/{datasetId}/inputs/query": { - post: operations["GetDataset"]; - }; - "/v1/experiment/dataset/{datasetId}/mutate": { - post: operations["MutateDataset"]; - }; "/v1/helicone-dataset": { post: operations["AddHeliconeDataset"]; }; @@ -478,6 +478,18 @@ export interface paths { "/v1/pi/session": { post: operations["AddSession"]; }; + "/v1/pi/org-name/query": { + post: operations["GetOrgName"]; + }; + "/v1/pi/total-costs": { + post: operations["GetTotalCosts"]; + }; + "/v1/pi/total_requests": { + post: operations["GetTotalRequests"]; + }; + "/v1/pi/costs-over-time/query": { + post: operations["GetCostsOverTime"]; + }; "/v1/settings/query": { get: operations["GetSettings"]; }; @@ -1943,6 +1955,85 @@ Json: JsonObject; error: null; }; "Result_Array__id-string--name-string__.string_": components["schemas"]["ResultSuccess_Array__id-string--name-string___"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess__datasetId-string__": { + data: { + datasetId: string; + }; + /** @enum {number|null} */ + error: null; + }; + "Result__datasetId-string_.string_": components["schemas"]["ResultSuccess__datasetId-string__"] | components["schemas"]["ResultError_string_"]; + DatasetMetadata: { + promptVersionId?: string; + inputRecordsIds?: string[]; + }; + NewDatasetParams: { + datasetName: string; + requestIds: string[]; + /** @enum {string} */ + datasetType: "experiment" | "helicone"; + meta?: components["schemas"]["DatasetMetadata"]; + }; + /** @description Make all properties in T optional */ + Partial_TimestampOperators_: { + gte?: string; + lte?: string; + lt?: string; + gt?: string; + }; + /** @description Make all properties in T optional */ + Partial_RequestTableToOperators_: { + prompt?: components["schemas"]["Partial_TextOperators_"]; + created_at?: components["schemas"]["Partial_TimestampOperators_"]; + user_id?: components["schemas"]["Partial_TextOperators_"]; + auth_hash?: components["schemas"]["Partial_TextOperators_"]; + org_id?: components["schemas"]["Partial_TextOperators_"]; + id?: components["schemas"]["Partial_TextOperators_"]; + node_id?: components["schemas"]["Partial_TextOperators_"]; + model?: components["schemas"]["Partial_TextOperators_"]; + modelOverride?: components["schemas"]["Partial_TextOperators_"]; + path?: components["schemas"]["Partial_TextOperators_"]; + prompt_id?: components["schemas"]["Partial_TextOperators_"]; + }; + /** @description From T, pick a set of properties whose keys are in the union K */ + "Pick_FilterLeaf.request-or-prompts_versions_": { + request?: components["schemas"]["Partial_RequestTableToOperators_"]; + prompts_versions?: components["schemas"]["Partial_PromptVersionsToOperators_"]; + }; + "FilterLeafSubset_request-or-prompts_versions_": components["schemas"]["Pick_FilterLeaf.request-or-prompts_versions_"]; + DatasetFilterNode: components["schemas"]["FilterLeafSubset_request-or-prompts_versions_"] | components["schemas"]["DatasetFilterBranch"] | "all"; + DatasetFilterBranch: { + right: components["schemas"]["DatasetFilterNode"]; + /** @enum {string} */ + operator: "or" | "and"; + left: components["schemas"]["DatasetFilterNode"]; + }; + RandomDatasetParams: { + datasetName: string; + filter: components["schemas"]["DatasetFilterNode"]; + /** Format: double */ + offset?: number; + /** Format: double */ + limit?: number; + }; + DatasetResult: { + id: string; + name: string; + created_at: string; + meta?: components["schemas"]["DatasetMetadata"]; + }; + "ResultSuccess_DatasetResult-Array_": { + data: components["schemas"]["DatasetResult"][]; + /** @enum {number|null} */ + error: null; + }; + "Result_DatasetResult-Array.string_": components["schemas"]["ResultSuccess_DatasetResult-Array_"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess___-Array_": { + data: Record[]; + /** @enum {number|null} */ + error: null; + }; + "Result___-Array.string_": components["schemas"]["ResultSuccess___-Array_"] | components["schemas"]["ResultError_string_"]; "ResultSuccess__tableId-string--experimentId-string__": { data: { experimentId: string; @@ -2172,85 +2263,6 @@ Json: JsonObject; /** @enum {boolean} */ score?: true; }; - "ResultSuccess__datasetId-string__": { - data: { - datasetId: string; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__datasetId-string_.string_": components["schemas"]["ResultSuccess__datasetId-string__"] | components["schemas"]["ResultError_string_"]; - DatasetMetadata: { - promptVersionId?: string; - inputRecordsIds?: string[]; - }; - NewDatasetParams: { - datasetName: string; - requestIds: string[]; - /** @enum {string} */ - datasetType: "experiment" | "helicone"; - meta?: components["schemas"]["DatasetMetadata"]; - }; - /** @description Make all properties in T optional */ - Partial_TimestampOperators_: { - gte?: string; - lte?: string; - lt?: string; - gt?: string; - }; - /** @description Make all properties in T optional */ - Partial_RequestTableToOperators_: { - prompt?: components["schemas"]["Partial_TextOperators_"]; - created_at?: components["schemas"]["Partial_TimestampOperators_"]; - user_id?: components["schemas"]["Partial_TextOperators_"]; - auth_hash?: components["schemas"]["Partial_TextOperators_"]; - org_id?: components["schemas"]["Partial_TextOperators_"]; - id?: components["schemas"]["Partial_TextOperators_"]; - node_id?: components["schemas"]["Partial_TextOperators_"]; - model?: components["schemas"]["Partial_TextOperators_"]; - modelOverride?: components["schemas"]["Partial_TextOperators_"]; - path?: components["schemas"]["Partial_TextOperators_"]; - prompt_id?: components["schemas"]["Partial_TextOperators_"]; - }; - /** @description From T, pick a set of properties whose keys are in the union K */ - "Pick_FilterLeaf.request-or-prompts_versions_": { - request?: components["schemas"]["Partial_RequestTableToOperators_"]; - prompts_versions?: components["schemas"]["Partial_PromptVersionsToOperators_"]; - }; - "FilterLeafSubset_request-or-prompts_versions_": components["schemas"]["Pick_FilterLeaf.request-or-prompts_versions_"]; - DatasetFilterNode: components["schemas"]["FilterLeafSubset_request-or-prompts_versions_"] | components["schemas"]["DatasetFilterBranch"] | "all"; - DatasetFilterBranch: { - right: components["schemas"]["DatasetFilterNode"]; - /** @enum {string} */ - operator: "or" | "and"; - left: components["schemas"]["DatasetFilterNode"]; - }; - RandomDatasetParams: { - datasetName: string; - filter: components["schemas"]["DatasetFilterNode"]; - /** Format: double */ - offset?: number; - /** Format: double */ - limit?: number; - }; - DatasetResult: { - id: string; - name: string; - created_at: string; - meta?: components["schemas"]["DatasetMetadata"]; - }; - "ResultSuccess_DatasetResult-Array_": { - data: components["schemas"]["DatasetResult"][]; - /** @enum {number|null} */ - error: null; - }; - "Result_DatasetResult-Array.string_": components["schemas"]["ResultSuccess_DatasetResult-Array_"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess___-Array_": { - data: Record[]; - /** @enum {number|null} */ - error: null; - }; - "Result___-Array.string_": components["schemas"]["ResultSuccess___-Array_"] | components["schemas"]["ResultError_string_"]; HeliconeDatasetMetadata: { promptVersionId?: string; inputRecordsIds?: string[]; @@ -2730,6 +2742,16 @@ Json: JsonObject; error: null; }; "Result__apiKey-string_.string_": components["schemas"]["ResultSuccess__apiKey-string__"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + data: { + created_at_trunc: string; + /** Format: double */ + cost: number; + }[]; + /** @enum {number|null} */ + error: null; + }; + "Result__cost-number--created_at_trunc-string_-Array.string_": components["schemas"]["ResultSuccess__cost-number--created_at_trunc-string_-Array_"] | components["schemas"]["ResultError_string_"]; /** @enum {string} */ LlmType: "chat" | "completion"; FunctionCall: { @@ -4780,6 +4802,134 @@ export interface operations { }; }; }; + AddDataset: { + requestBody: { + content: { + "application/json": components["schemas"]["NewDatasetParams"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__datasetId-string_.string_"]; + }; + }; + }; + }; + AddRandomDataset: { + requestBody: { + content: { + "application/json": components["schemas"]["RandomDatasetParams"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__datasetId-string_.string_"]; + }; + }; + }; + }; + GetDatasets: { + requestBody: { + content: { + "application/json": { + promptVersionId?: string; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_DatasetResult-Array.string_"]; + }; + }; + }; + }; + InsertDatasetRow: { + parameters: { + path: { + datasetId: string; + }; + }; + requestBody: { + content: { + "application/json": { + originalColumnId?: string; + inputs: components["schemas"]["Record_string.string_"]; + inputRecordId: string; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + CreateDatasetRow: { + parameters: { + path: { + datasetId: string; + promptVersionId: string; + }; + }; + requestBody: { + content: { + "application/json": { + sourceRequest?: string; + inputs: components["schemas"]["Record_string.string_"]; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + GetDataset: { + parameters: { + path: { + datasetId: string; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_PromptInputRecord-Array.string_"]; + }; + }; + }; + }; + MutateDataset: { + requestBody: { + content: { + "application/json": { + removeRequests: string[]; + addRequests: string[]; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result___-Array.string_"]; + }; + }; + }; + }; CreateNewEmptyExperiment: { requestBody: { content: { @@ -5143,134 +5293,6 @@ export interface operations { }; }; }; - AddDataset: { - requestBody: { - content: { - "application/json": components["schemas"]["NewDatasetParams"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__datasetId-string_.string_"]; - }; - }; - }; - }; - AddRandomDataset: { - requestBody: { - content: { - "application/json": components["schemas"]["RandomDatasetParams"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__datasetId-string_.string_"]; - }; - }; - }; - }; - GetDatasets: { - requestBody: { - content: { - "application/json": { - promptVersionId?: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_DatasetResult-Array.string_"]; - }; - }; - }; - }; - InsertDatasetRow: { - parameters: { - path: { - datasetId: string; - }; - }; - requestBody: { - content: { - "application/json": { - originalColumnId?: string; - inputs: components["schemas"]["Record_string.string_"]; - inputRecordId: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_string.string_"]; - }; - }; - }; - }; - CreateDatasetRow: { - parameters: { - path: { - datasetId: string; - promptVersionId: string; - }; - }; - requestBody: { - content: { - "application/json": { - sourceRequest?: string; - inputs: components["schemas"]["Record_string.string_"]; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_string.string_"]; - }; - }; - }; - }; - GetDataset: { - parameters: { - path: { - datasetId: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_PromptInputRecord-Array.string_"]; - }; - }; - }; - }; - MutateDataset: { - requestBody: { - content: { - "application/json": { - removeRequests: string[]; - addRequests: string[]; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result___-Array.string_"]; - }; - }; - }; - }; AddHeliconeDataset: { requestBody: { content: { @@ -5418,11 +5440,6 @@ export interface operations { }; }; GetTotalRequests: { - requestBody: { - content: { - "application/json": components["schemas"]["DataIsBeautifulRequestBody"]; - }; - }; responses: { /** @description Ok */ 200: { @@ -6061,6 +6078,41 @@ export interface operations { }; }; }; + GetOrgName: { + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + GetTotalCosts: { + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_number.string_"]; + }; + }; + }; + }; + GetCostsOverTime: { + requestBody: { + content: { + "application/json": components["schemas"]["DataOverTimeRequest"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__cost-number--created_at_trunc-string_-Array.string_"]; + }; + }; + }; + }; GetSettings: { responses: { /** @description Ok */ diff --git a/bifrost/public/static/pi/arrow-left.webp b/bifrost/public/static/pi/arrow-left.webp new file mode 100644 index 0000000000000000000000000000000000000000..76223ec3e04d1a9a52ea8b3894a07ac070fd370a GIT binary patch literal 618 zcmV-w0+szzNk&Fu0ssJ4MM6+kP&il$0000G0000&002Dz06|PpNWcI9009P9wQa>s zBve8qL;@0!fP_fE32{&fNQi_d0STSQOZYx7A|`;ohr~&4yATd9X5XKz?lRluF-+Kn z!-@raQVUHbUp_phP}t?tRM z5${7xG`Vuo@55SXaue7ftl66!V1p17dcY_ITo2|!z&+_f7z7{XJAgqadGBVUFx1T{~Ue_rFxv-+Y{~wNb@gLms zG4$$k_lW=C&q5R1MEaK<+?_TpJfaGV%$0%v5j#+FMLX#30cLD!NKNjVW!@L63 zr_fA5F!?Y3t!Kx7)8?@?Ow&AC?TcVK>)dU*|4jRBO(BpvU7GL& z!PBL042T`$n;=)z`MT#^Cjo_NW}GO@kIf(J=1c7nZ|HvBQ|ojISQ{}9)euI;Gt>Y8 E0K7R8%m4rY literal 0 HcmV?d00001 diff --git a/bifrost/public/static/pi/arrow-right.webp b/bifrost/public/static/pi/arrow-right.webp new file mode 100644 index 0000000000000000000000000000000000000000..0ca8e9d7bceebc1200b2bc89238764774fd20f72 GIT binary patch literal 610 zcmV-o0-gO*Nk&Fm0ssJ4MM6+kP&il$0000G0000#002Dz06|PpNX7sF00D165C}3t z2Jg=~L_}oVIsn{i+maGSXJg76*9unYFciUoNVJGX<$33r>=Mc{ARktaz&{qdI)fJpOzXU|o z^=m8`b=#qv1O(L08Z12ge}AND1LT0{+SXhoBciLAV@1RkBAK%}MVDE#`f}I?>*Eh> zx<{OtIp7st#&VMua(-U?`Wv`y5k%eqpXf46H|ash<@5_h|DnI}} z06vj8nn$IhBB3r6olvk6326Wml53({is$p`4?9$jvKeY^k26@!IRLLhlBzTV5&kjD z-h(+YeBBRuWYN9Ji|UV>%tHZy0RH>q>iz5fu@xHAezg+ME~E0?og``cZ98X-|9U?| z5g?_|N;6;n+rK-6X=273m-+9z^3+{q$^V=xfAY0S|N12N{}Ug=d4WS=u9o8gR-LdD zctLxAMnRsUMoIlc;9tFFCUSg`n;({S)^DlgQGARv?b~-HEgla$uN~q3doJgpP0)A4 zA9n*mKmMhXg7c?=UWtii3*T;7O7h@h25Y?mhN&J)3nL zr*d6@krV&*?hsav>AJiMdg%=5a()BiJ_F;oa&qkMJXvJYmt4;GPX9UY^P+&HaW7Jk(fc2 z5iu>6V_yb?DHDUCF=LsA@9U$^x$o<`@B90`+`pecj>qXyeCEBpUeE3Id3a9$)CM65 zAruO=LFe?ZhA7lZG77aKdhKfX6VF+@yC_shjn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di!AGFR8&Eui zRamRiNmA5Ap0n+fCr-9`Y}%TY4`$#2pI+t)o;`(xt&S_c|1B6Yb^|AHX~X2gLTzWI z?$_BXAEH0@P@o1JU>krWYbWwb7hwZ3_|5ug--Xi+=WYl*ND$_?ki3OWB?%|p%|vrX zr~%zg{wq*DU$IB0)q&~U&5My%#E^CYJ7wN7R>owHUIVrlgF=}${%5RO9^k^qPW+8| zL!6RA*#w3AaKdW)y0~4L)w8hFamt;xg%ykJh)L{Uj|#sC=BpRF!MRt__Qz!?0>VCQ z>N2wj9Ku6e$?V5Ig*Tn>^rreysOKMhxKKYx`<{-4#R}OagJN+g2w&RuTKOWVr}ULx zj)p*{czN3zh5DfZoOl?!S7!G=9aDy1mx@A_@c!rM-?((%2!(Ry_Vh#@1OWb;y!<2+ h>aZ24A^y?|ucvC67&D<6Y~?~(m|6c+eE8(0{|8Pw)yDt; diff --git a/bifrost/public/static/pi/intro-image.webp b/bifrost/public/static/pi/intro-image.webp new file mode 100644 index 0000000000000000000000000000000000000000..c62fd9ba8c263c9da3f1c00c3eced1119834e918 GIT binary patch literal 23586 zcmZs?V|Zm(>CE5|jXwC<7r;<*kggyBt!J$Z*7v5>fOu<2GAg>Zk!D5roTT zLweDb2uSG%&j%|TGB5oJ{6Jv}n`*qqf1cU?C4>D*I~2+8_)g&UNcj%_xd5}S`p9~! z&({?E)$98>KG0%-VH1`k8uUeAf5h)B76zI8kqPk$)^`yx;8pqwGPFAbvKL6)?<)_2 zo;w4-gfp*MMjm%iL^^cj{tVAc+UC(BR_MUez|oHAOGflC)dsXsRi_xB;OnDg?IMr$ z87TJ)Rz-JivhdX;t$!UKTS$j9b(yF%%S+{VP4Zai*N$A$#KV+b!Un70rT7y%uy@SB z*PmZr&+rL@Y7QMc@?L|H>hzRsjvp#7=abY_iC-ui#B9vHz5t|ZIElrYh()BtiTI+0 z)#!leCS+fU<$+&*5W{&+mc`$u6J8jpI~SChEsC^u`L1(*3TTv1gxJPgERG)x_ySO> zsRz5p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-c3gbCzb^;aM(5iM;`*`J% zd230{L2LUYj<1bp&$p@3I~FuD6W<+iTMf<6Xi5wpmS6Fus%FBbI&E}<*W-iz6y79V z={P5y1O3{izqCVUn}t`M{;UzI|DXH-f-z8fB!cOSFbMv!+l(K^>|P8#{< z=ogL`h}|k4goZB!=txa2?6o*VL<63k zmIME6Nf#Vx6b140rQ7B&dJsui>otAW*3%M>feh8^c$x{pxv;9cvopfkf2AD=?f09# z!F00T^GO!HdyvD|_KswlP}8YsoZqxaEUkzCSn8EeqC990)m(w5wF$tHsfltXxw% r`c(3ksX0U>BlU5XLSZtjpYYB=Y!S#bcL2$=;*xz}00>U--~a#s6rK)R literal 0 HcmV?d00001 diff --git a/docs/swagger.json b/docs/swagger.json index bab2b06d5e..bde361282f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -4567,20 +4567,16 @@ } ] }, - "ResultSuccess__tableId-string--experimentId-string__": { + "ResultSuccess__datasetId-string__": { "properties": { "data": { "properties": { - "experimentId": { - "type": "string" - }, - "tableId": { + "datasetId": { "type": "string" } }, "required": [ - "experimentId", - "tableId" + "datasetId" ], "type": "object" }, @@ -4599,109 +4595,197 @@ "type": "object", "additionalProperties": false }, - "Result__tableId-string--experimentId-string_.string_": { + "Result__datasetId-string_.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess__tableId-string--experimentId-string__" + "$ref": "#/components/schemas/ResultSuccess__datasetId-string__" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "CreateExperimentTableParams": { + "DatasetMetadata": { "properties": { - "datasetId": { - "type": "string" - }, - "experimentMetadata": { - "$ref": "#/components/schemas/Record_string.any_" - }, "promptVersionId": { "type": "string" }, - "newHeliconeTemplate": { + "inputRecordsIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "NewDatasetParams": { + "properties": { + "datasetName": { "type": "string" }, - "isMajorVersion": { - "type": "boolean" + "requestIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "promptSubversionMetadata": { - "$ref": "#/components/schemas/Record_string.any_" + "datasetType": { + "type": "string", + "enum": [ + "experiment", + "helicone" + ] }, - "experimentTableMetadata": { - "$ref": "#/components/schemas/Record_string.any_" + "meta": { + "$ref": "#/components/schemas/DatasetMetadata" } }, "required": [ - "datasetId", - "experimentMetadata", - "promptVersionId", - "newHeliconeTemplate", - "isMajorVersion", - "promptSubversionMetadata" + "datasetName", + "requestIds", + "datasetType" ], "type": "object", "additionalProperties": false }, - "ExperimentTableColumn": { + "Partial_TimestampOperators_": { "properties": { - "id": { + "gte": { "type": "string" }, - "columnName": { + "lte": { "type": "string" }, - "columnType": { + "lt": { "type": "string" }, - "hypothesisId": { + "gt": { "type": "string" + } + }, + "type": "object", + "description": "Make all properties in T optional" + }, + "Partial_RequestTableToOperators_": { + "properties": { + "prompt": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "cells": { - "items": { - "properties": { - "metadata": { - "$ref": "#/components/schemas/Record_string.any_" - }, - "value": { - "type": "string", - "nullable": true - }, - "requestId": { - "type": "string" - }, - "rowIndex": { - "type": "number", - "format": "double" - }, - "id": { - "type": "string" - } - }, - "required": [ - "value", - "rowIndex", - "id" - ], - "type": "object" - }, - "type": "array" + "created_at": { + "$ref": "#/components/schemas/Partial_TimestampOperators_" }, - "metadata": { - "$ref": "#/components/schemas/Record_string.any_" + "user_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "auth_hash": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "org_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "node_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "model": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "modelOverride": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "path": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "prompt_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + } + }, + "type": "object", + "description": "Make all properties in T optional" + }, + "Pick_FilterLeaf.request-or-prompts_versions_": { + "properties": { + "request": { + "$ref": "#/components/schemas/Partial_RequestTableToOperators_" + }, + "prompts_versions": { + "$ref": "#/components/schemas/Partial_PromptVersionsToOperators_" + } + }, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "FilterLeafSubset_request-or-prompts_versions_": { + "$ref": "#/components/schemas/Pick_FilterLeaf.request-or-prompts_versions_" + }, + "DatasetFilterNode": { + "anyOf": [ + { + "$ref": "#/components/schemas/FilterLeafSubset_request-or-prompts_versions_" + }, + { + "$ref": "#/components/schemas/DatasetFilterBranch" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + }, + "DatasetFilterBranch": { + "properties": { + "right": { + "$ref": "#/components/schemas/DatasetFilterNode" + }, + "operator": { + "type": "string", + "enum": [ + "or", + "and" + ] + }, + "left": { + "$ref": "#/components/schemas/DatasetFilterNode" } }, "required": [ - "id", - "columnName", - "columnType", - "cells" + "right", + "operator", + "left" + ], + "type": "object" + }, + "RandomDatasetParams": { + "properties": { + "datasetName": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/DatasetFilterNode" + }, + "offset": { + "type": "number", + "format": "double" + }, + "limit": { + "type": "number", + "format": "double" + } + }, + "required": [ + "datasetName", + "filter" ], "type": "object", "additionalProperties": false }, - "ExperimentTable": { + "DatasetResult": { "properties": { "id": { "type": "string" @@ -4709,32 +4793,28 @@ "name": { "type": "string" }, - "experimentId": { + "created_at": { "type": "string" }, - "columns": { - "items": { - "$ref": "#/components/schemas/ExperimentTableColumn" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/Record_string.any_" + "meta": { + "$ref": "#/components/schemas/DatasetMetadata" } }, "required": [ "id", "name", - "experimentId", - "columns" + "created_at" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_ExperimentTable_": { + "ResultSuccess_DatasetResult-Array_": { "properties": { "data": { - "$ref": "#/components/schemas/ExperimentTable" + "items": { + "$ref": "#/components/schemas/DatasetResult" + }, + "type": "array" }, "error": { "type": "number", @@ -4751,22 +4831,250 @@ "type": "object", "additionalProperties": false }, - "Result_ExperimentTable.string_": { + "Result_DatasetResult-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_ExperimentTable_" + "$ref": "#/components/schemas/ResultSuccess_DatasetResult-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "ExperimentTableSimplified": { + "ResultSuccess___-Array_": { "properties": { - "id": { - "type": "string" - }, - "name": { + "data": { + "items": { + "properties": {}, + "type": "object" + }, + "type": "array" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result___-Array.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess___-Array_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "ResultSuccess__tableId-string--experimentId-string__": { + "properties": { + "data": { + "properties": { + "experimentId": { + "type": "string" + }, + "tableId": { + "type": "string" + } + }, + "required": [ + "experimentId", + "tableId" + ], + "type": "object" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result__tableId-string--experimentId-string_.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess__tableId-string--experimentId-string__" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "CreateExperimentTableParams": { + "properties": { + "datasetId": { + "type": "string" + }, + "experimentMetadata": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "promptVersionId": { + "type": "string" + }, + "newHeliconeTemplate": { + "type": "string" + }, + "isMajorVersion": { + "type": "boolean" + }, + "promptSubversionMetadata": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "experimentTableMetadata": { + "$ref": "#/components/schemas/Record_string.any_" + } + }, + "required": [ + "datasetId", + "experimentMetadata", + "promptVersionId", + "newHeliconeTemplate", + "isMajorVersion", + "promptSubversionMetadata" + ], + "type": "object", + "additionalProperties": false + }, + "ExperimentTableColumn": { + "properties": { + "id": { + "type": "string" + }, + "columnName": { + "type": "string" + }, + "columnType": { + "type": "string" + }, + "hypothesisId": { + "type": "string" + }, + "cells": { + "items": { + "properties": { + "metadata": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "value": { + "type": "string", + "nullable": true + }, + "requestId": { + "type": "string" + }, + "rowIndex": { + "type": "number", + "format": "double" + }, + "id": { + "type": "string" + } + }, + "required": [ + "value", + "rowIndex", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/Record_string.any_" + } + }, + "required": [ + "id", + "columnName", + "columnType", + "cells" + ], + "type": "object", + "additionalProperties": false + }, + "ExperimentTable": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "experimentId": { + "type": "string" + }, + "columns": { + "items": { + "$ref": "#/components/schemas/ExperimentTableColumn" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/Record_string.any_" + } + }, + "required": [ + "id", + "name", + "experimentId", + "columns" + ], + "type": "object", + "additionalProperties": false + }, + "ResultSuccess_ExperimentTable_": { + "properties": { + "data": { + "$ref": "#/components/schemas/ExperimentTable" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result_ExperimentTable.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess_ExperimentTable_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "ExperimentTableSimplified": { + "properties": { + "id": { + "type": "string" + }, + "name": { "type": "string" }, "experimentId": { @@ -5335,404 +5643,33 @@ "allOf": [ { "$ref": "#/components/schemas/ExperimentScores" - } - ], - "nullable": true - }, - "tableId": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "organization", - "dataset", - "meta", - "createdAt", - "hypotheses", - "scores", - "tableId" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess_Experiment-Array_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/Experiment" - }, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result_Experiment-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_Experiment-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "Partial_ExperimentToOperators_": { - "properties": { - "id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "prompt_v2": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Pick_FilterLeaf.experiment_": { - "properties": { - "experiment": { - "$ref": "#/components/schemas/Partial_ExperimentToOperators_" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "FilterLeafSubset_experiment_": { - "$ref": "#/components/schemas/Pick_FilterLeaf.experiment_" - }, - "ExperimentFilterNode": { - "anyOf": [ - { - "$ref": "#/components/schemas/FilterLeafSubset_experiment_" - }, - { - "$ref": "#/components/schemas/ExperimentFilterBranch" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "ExperimentFilterBranch": { - "properties": { - "right": { - "$ref": "#/components/schemas/ExperimentFilterNode" - }, - "operator": { - "type": "string", - "enum": [ - "or", - "and" - ] - }, - "left": { - "$ref": "#/components/schemas/ExperimentFilterNode" - } - }, - "required": [ - "right", - "operator", - "left" - ], - "type": "object" - }, - "IncludeExperimentKeys": { - "properties": { - "inputs": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false - }, - "promptVersion": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false - }, - "responseBodies": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false - }, - "score": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false - } - }, - "type": "object", - "additionalProperties": false - }, - "ResultSuccess__datasetId-string__": { - "properties": { - "data": { - "properties": { - "datasetId": { - "type": "string" - } - }, - "required": [ - "datasetId" - ], - "type": "object" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__datasetId-string_.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__datasetId-string__" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "DatasetMetadata": { - "properties": { - "promptVersionId": { - "type": "string" - }, - "inputRecordsIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "NewDatasetParams": { - "properties": { - "datasetName": { - "type": "string" - }, - "requestIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "datasetType": { - "type": "string", - "enum": [ - "experiment", - "helicone" - ] - }, - "meta": { - "$ref": "#/components/schemas/DatasetMetadata" - } - }, - "required": [ - "datasetName", - "requestIds", - "datasetType" - ], - "type": "object", - "additionalProperties": false - }, - "Partial_TimestampOperators_": { - "properties": { - "gte": { - "type": "string" - }, - "lte": { - "type": "string" - }, - "lt": { - "type": "string" - }, - "gt": { - "type": "string" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_RequestTableToOperators_": { - "properties": { - "prompt": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "created_at": { - "$ref": "#/components/schemas/Partial_TimestampOperators_" - }, - "user_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "auth_hash": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "org_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "node_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "model": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "modelOverride": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "path": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "prompt_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Pick_FilterLeaf.request-or-prompts_versions_": { - "properties": { - "request": { - "$ref": "#/components/schemas/Partial_RequestTableToOperators_" - }, - "prompts_versions": { - "$ref": "#/components/schemas/Partial_PromptVersionsToOperators_" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "FilterLeafSubset_request-or-prompts_versions_": { - "$ref": "#/components/schemas/Pick_FilterLeaf.request-or-prompts_versions_" - }, - "DatasetFilterNode": { - "anyOf": [ - { - "$ref": "#/components/schemas/FilterLeafSubset_request-or-prompts_versions_" - }, - { - "$ref": "#/components/schemas/DatasetFilterBranch" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "DatasetFilterBranch": { - "properties": { - "right": { - "$ref": "#/components/schemas/DatasetFilterNode" - }, - "operator": { - "type": "string", - "enum": [ - "or", - "and" - ] - }, - "left": { - "$ref": "#/components/schemas/DatasetFilterNode" - } - }, - "required": [ - "right", - "operator", - "left" - ], - "type": "object" - }, - "RandomDatasetParams": { - "properties": { - "datasetName": { - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/DatasetFilterNode" - }, - "offset": { - "type": "number", - "format": "double" - }, - "limit": { - "type": "number", - "format": "double" - } - }, - "required": [ - "datasetName", - "filter" - ], - "type": "object", - "additionalProperties": false - }, - "DatasetResult": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "created_at": { - "type": "string" + } + ], + "nullable": true }, - "meta": { - "$ref": "#/components/schemas/DatasetMetadata" + "tableId": { + "type": "string", + "nullable": true } }, "required": [ "id", - "name", - "created_at" + "organization", + "dataset", + "meta", + "createdAt", + "hypotheses", + "scores", + "tableId" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_DatasetResult-Array_": { + "ResultSuccess_Experiment-Array_": { "properties": { "data": { "items": { - "$ref": "#/components/schemas/DatasetResult" + "$ref": "#/components/schemas/Experiment" }, "type": "array" }, @@ -5751,50 +5688,113 @@ "type": "object", "additionalProperties": false }, - "Result_DatasetResult-Array.string_": { + "Result_Experiment-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_DatasetResult-Array_" + "$ref": "#/components/schemas/ResultSuccess_Experiment-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "ResultSuccess___-Array_": { + "Partial_ExperimentToOperators_": { "properties": { - "data": { - "items": { - "properties": {}, - "type": "object" - }, - "type": "array" + "id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true + "prompt_v2": { + "$ref": "#/components/schemas/Partial_TextOperators_" } }, - "required": [ - "data", - "error" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "Result___-Array.string_": { + "Pick_FilterLeaf.experiment_": { + "properties": { + "experiment": { + "$ref": "#/components/schemas/Partial_ExperimentToOperators_" + } + }, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "FilterLeafSubset_experiment_": { + "$ref": "#/components/schemas/Pick_FilterLeaf.experiment_" + }, + "ExperimentFilterNode": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess___-Array_" + "$ref": "#/components/schemas/FilterLeafSubset_experiment_" }, { - "$ref": "#/components/schemas/ResultError_string_" + "$ref": "#/components/schemas/ExperimentFilterBranch" + }, + { + "type": "string", + "enum": [ + "all" + ] } ] }, + "ExperimentFilterBranch": { + "properties": { + "right": { + "$ref": "#/components/schemas/ExperimentFilterNode" + }, + "operator": { + "type": "string", + "enum": [ + "or", + "and" + ] + }, + "left": { + "$ref": "#/components/schemas/ExperimentFilterNode" + } + }, + "required": [ + "right", + "operator", + "left" + ], + "type": "object" + }, + "IncludeExperimentKeys": { + "properties": { + "inputs": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false + }, + "promptVersion": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false + }, + "responseBodies": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false + }, + "score": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false + } + }, + "type": "object", + "additionalProperties": false + }, "HeliconeDatasetMetadata": { "properties": { "promptVersionId": { @@ -7713,6 +7713,52 @@ } ] }, + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + "properties": { + "data": { + "items": { + "properties": { + "created_at_trunc": { + "type": "string" + }, + "cost": { + "type": "number", + "format": "double" + } + }, + "required": [ + "created_at_trunc", + "cost" + ], + "type": "object" + }, + "type": "array" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result__cost-number--created_at_trunc-string_-Array.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess__cost-number--created_at_trunc-string_-Array_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, "LlmType": { "type": "string", "enum": [ @@ -13390,206 +13436,139 @@ "api_key": [] } ], - "parameters": [] - } - }, - "/v1/experiment/new-empty": { - "post": { - "operationId": "CreateNewEmptyExperiment", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__experimentId-string_.string_" - } - } - } - } - }, - "tags": [ - "Experiment" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "datasetId": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/Record_string.string_" - } - }, - "required": [ - "datasetId", - "metadata" - ], - "type": "object" - } - } - } - } - } - }, - "/v1/experiment/table/new": { - "post": { - "operationId": "CreateNewExperimentTable", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__tableId-string--experimentId-string_.string_" - } - } - } - } - }, - "tags": [ - "Experiment" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateExperimentTableParams" - } - } - } - } + "parameters": [] } }, - "/v1/experiment/table/{experimentTableId}/query": { + "/v1/experiment/dataset": { "post": { - "operationId": "GetExperimentTableById", + "operationId": "AddDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ExperimentTable.string_" + "$ref": "#/components/schemas/Result__datasetId-string_.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { "api_key": [] } ], - "parameters": [ - { - "in": "path", - "name": "experimentTableId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewDatasetParams" + } } } - ] + } } }, - "/v1/experiment/table/{experimentTableId}/metadata/query": { + "/v1/experiment/dataset/random": { "post": { - "operationId": "GetExperimentTableMetadata", + "operationId": "AddRandomDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ExperimentTableSimplified.string_" + "$ref": "#/components/schemas/Result__datasetId-string_.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { "api_key": [] } ], - "parameters": [ - { - "in": "path", - "name": "experimentTableId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RandomDatasetParams" + } } } - ] + } } }, - "/v1/experiment/tables/query": { + "/v1/experiment/dataset/query": { "post": { - "operationId": "GetExperimentTables", + "operationId": "GetDatasets", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ExperimentTableSimplified-Array.string_" + "$ref": "#/components/schemas/Result_DatasetResult-Array.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { "api_key": [] } ], - "parameters": [] + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "promptVersionId": { + "type": "string" + } + }, + "type": "object" + } + } + } + } } }, - "/v1/experiment/table/{experimentTableId}/cell": { + "/v1/experiment/dataset/{datasetId}/row/insert": { "post": { - "operationId": "CreateExperimentCell", + "operationId": "InsertDatasetRow", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_string.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -13599,7 +13578,7 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "datasetId", "required": true, "schema": { "type": "string" @@ -13612,45 +13591,44 @@ "application/json": { "schema": { "properties": { - "value": { - "type": "string", - "nullable": true + "originalColumnId": { + "type": "string" }, - "rowIndex": { - "type": "number", - "format": "double" + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" }, - "columnId": { + "inputRecordId": { "type": "string" } }, "required": [ - "value", - "rowIndex", - "columnId" + "inputs", + "inputRecordId" ], "type": "object" } } } } - }, - "patch": { - "operationId": "UpdateExperimentCell", + } + }, + "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { + "post": { + "operationId": "CreateDatasetRow", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_string.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -13660,7 +13638,15 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "datasetId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "promptVersionId", "required": true, "schema": { "type": "string" @@ -13673,24 +13659,15 @@ "application/json": { "schema": { "properties": { - "updateInputs": { - "type": "boolean" - }, - "metadata": { - "type": "string" - }, - "value": { - "type": "string" - }, - "status": { + "sourceRequest": { "type": "string" }, - "cellId": { - "type": "string" + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" } }, "required": [ - "cellId" + "inputs" ], "type": "object" } @@ -13699,23 +13676,23 @@ } } }, - "/v1/experiment/table/{experimentTableId}/column": { + "/v1/experiment/dataset/{datasetId}/inputs/query": { "post": { - "operationId": "CreateExperimentColumn", + "operationId": "GetDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_PromptInputRecord-Array.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -13725,41 +13702,61 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "datasetId", "required": true, "schema": { "type": "string" } } + ] + } + }, + "/v1/experiment/dataset/{datasetId}/mutate": { + "post": { + "operationId": "MutateDataset", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result___-Array.string_" + } + } + } + } + }, + "tags": [ + "Dataset" + ], + "security": [ + { + "api_key": [] + } ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { - "inputKeys": { + "removeRequests": { "items": { "type": "string" }, "type": "array" }, - "promptVersionId": { - "type": "string" - }, - "hypothesisId": { - "type": "string" - }, - "columnType": { - "type": "string" - }, - "columnName": { - "type": "string" + "addRequests": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "columnType", - "columnName" + "removeRequests", + "addRequests" ], "type": "object" } @@ -13768,16 +13765,16 @@ } } }, - "/v1/experiment/table/{experimentTableId}/row/new": { + "/v1/experiment/new-empty": { "post": { - "operationId": "CreateExperimentTableRow", + "operationId": "CreateNewEmptyExperiment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result__experimentId-string_.string_" } } } @@ -13791,34 +13788,23 @@ "api_key": [] } ], - "parameters": [ - { - "in": "path", - "name": "experimentTableId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "sourceRequest": { + "datasetId": { "type": "string" }, - "promptVersionId": { - "type": "string" + "metadata": { + "$ref": "#/components/schemas/Record_string.string_" } }, "required": [ - "promptVersionId" + "datasetId", + "metadata" ], "type": "object" } @@ -13827,16 +13813,52 @@ } } }, - "/v1/experiment/table/{experimentTableId}/row/{rowIndex}": { - "delete": { - "operationId": "DeleteExperimentTableRow", + "/v1/experiment/table/new": { + "post": { + "operationId": "CreateNewExperimentTable", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result__tableId-string--experimentId-string_.string_" + } + } + } + } + }, + "tags": [ + "Experiment" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExperimentTableParams" + } + } + } + } + } + }, + "/v1/experiment/table/{experimentTableId}/query": { + "post": { + "operationId": "GetExperimentTableById", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_ExperimentTable.string_" } } } @@ -13858,29 +13880,20 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "rowIndex", - "required": true, - "schema": { - "format": "double", - "type": "number" - } } ] } }, - "/v1/experiment/table/{experimentTableId}/row/insert/batch": { + "/v1/experiment/table/{experimentTableId}/metadata/query": { "post": { - "operationId": "CreateExperimentTableRowWithCellsBatch", + "operationId": "GetExperimentTableMetadata", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_ExperimentTableSimplified.string_" } } } @@ -13903,87 +13916,19 @@ "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "rows": { - "items": { - "properties": { - "sourceRequest": { - "type": "string" - }, - "cells": { - "items": { - "properties": { - "metadata": {}, - "value": { - "type": "string", - "nullable": true - }, - "columnId": { - "type": "string" - } - }, - "required": [ - "value", - "columnId" - ], - "type": "object" - }, - "type": "array" - }, - "datasetId": { - "type": "string" - }, - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "inputRecordId": { - "type": "string" - } - }, - "required": [ - "cells", - "datasetId", - "inputs", - "inputRecordId" - ], - "type": "object" - }, - "type": "array" - } - }, - "required": [ - "rows" - ], - "type": "object" - } - } - } - } + ] } }, - "/v1/experiment/update-meta": { + "/v1/experiment/tables/query": { "post": { - "operationId": "UpdateExperimentMeta", + "operationId": "GetExperimentTables", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_unknown_" - }, - { - "$ref": "#/components/schemas/ResultError_PostgrestError_" - } - ] + "$ref": "#/components/schemas/Result_ExperimentTableSimplified-Array.string_" } } } @@ -13997,41 +13942,19 @@ "api_key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "meta": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "experimentId": { - "type": "string" - } - }, - "required": [ - "meta", - "experimentId" - ], - "type": "object" - } - } - } - } + "parameters": [] } }, - "/v1/experiment": { + "/v1/experiment/table/{experimentTableId}/cell": { "post": { - "operationId": "CreateNewExperimentOld", + "operationId": "CreateExperimentCell", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__experimentId-string_.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } @@ -14045,29 +13968,54 @@ "api_key": [] } ], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "experimentTableId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewExperimentParams" + "properties": { + "value": { + "type": "string", + "nullable": true + }, + "rowIndex": { + "type": "number", + "format": "double" + }, + "columnId": { + "type": "string" + } + }, + "required": [ + "value", + "rowIndex", + "columnId" + ], + "type": "object" } } } } - } - }, - "/v1/experiment/hypothesis": { - "post": { - "operationId": "CreateNewExperimentHypothesis", + }, + "patch": { + "operationId": "UpdateExperimentCell", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__hypothesisId-string_.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } @@ -14081,41 +14029,40 @@ "api_key": [] } ], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "experimentTableId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { - "status": { - "type": "string", - "enum": [ - "PENDING", - "RUNNING", - "COMPLETED", - "FAILED" - ] + "updateInputs": { + "type": "boolean" }, - "providerKeyId": { + "metadata": { "type": "string" }, - "promptVersion": { + "value": { "type": "string" }, - "model": { + "status": { "type": "string" }, - "experimentId": { + "cellId": { "type": "string" } }, "required": [ - "status", - "providerKeyId", - "promptVersion", - "model", - "experimentId" + "cellId" ], "type": "object" } @@ -14124,16 +14071,16 @@ } } }, - "/v1/experiment/hypothesis/{hypothesisId}/scores/query": { + "/v1/experiment/table/{experimentTableId}/column": { "post": { - "operationId": "GetExperimentHypothesisScores", + "operationId": "CreateExperimentColumn", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__runsCount-number--scores-Record_string.Score__.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } @@ -14150,51 +14097,52 @@ "parameters": [ { "in": "path", - "name": "hypothesisId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "inputKeys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "promptVersionId": { + "type": "string" + }, + "hypothesisId": { + "type": "string" + }, + "columnType": { + "type": "string" + }, + "columnName": { + "type": "string" + } + }, + "required": [ + "columnType", + "columnName" + ], + "type": "object" + } + } + } + } } }, - "/v1/experiment/{experimentId}/evaluators": { - "get": { - "operationId": "GetExperimentEvaluators", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_EvaluatorResult-Array.string_" - } - } - } - } - }, - "tags": [ - "Experiment" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "experimentId", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, + "/v1/experiment/table/{experimentTableId}/row/new": { "post": { - "operationId": "CreateExperimentEvaluatorOld", + "operationId": "CreateExperimentTableRow", "responses": { "200": { "description": "Ok", @@ -14218,7 +14166,7 @@ "parameters": [ { "in": "path", - "name": "experimentId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" @@ -14231,12 +14179,18 @@ "application/json": { "schema": { "properties": { - "evaluatorId": { + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "sourceRequest": { + "type": "string" + }, + "promptVersionId": { "type": "string" } }, "required": [ - "evaluatorId" + "promptVersionId" ], "type": "object" } @@ -14245,9 +14199,9 @@ } } }, - "/v1/experiment/{experimentId}/evaluators/run": { - "post": { - "operationId": "RunExperimentEvaluatorsOld", + "/v1/experiment/table/{experimentTableId}/row/{rowIndex}": { + "delete": { + "operationId": "DeleteExperimentTableRow", "responses": { "200": { "description": "Ok", @@ -14271,18 +14225,27 @@ "parameters": [ { "in": "path", - "name": "experimentId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" } + }, + { + "in": "path", + "name": "rowIndex", + "required": true, + "schema": { + "format": "double", + "type": "number" + } } ] } }, - "/v1/experiment/{experimentId}/evaluators/{evaluatorId}": { - "delete": { - "operationId": "DeleteExperimentEvaluatorOld", + "/v1/experiment/table/{experimentTableId}/row/insert/batch": { + "post": { + "operationId": "CreateExperimentTableRowWithCellsBatch", "responses": { "200": { "description": "Ok", @@ -14306,33 +14269,93 @@ "parameters": [ { "in": "path", - "name": "experimentId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" } - }, - { - "in": "path", - "name": "evaluatorId", - "required": true, - "schema": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "rows": { + "items": { + "properties": { + "sourceRequest": { + "type": "string" + }, + "cells": { + "items": { + "properties": { + "metadata": {}, + "value": { + "type": "string", + "nullable": true + }, + "columnId": { + "type": "string" + } + }, + "required": [ + "value", + "columnId" + ], + "type": "object" + }, + "type": "array" + }, + "datasetId": { + "type": "string" + }, + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "inputRecordId": { + "type": "string" + } + }, + "required": [ + "cells", + "datasetId", + "inputs", + "inputRecordId" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "rows" + ], + "type": "object" + } } } - ] + } } }, - "/v1/experiment/query": { + "/v1/experiment/update-meta": { "post": { - "operationId": "GetExperimentsOld", + "operationId": "UpdateExperimentMeta", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_Experiment-Array.string_" + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess_unknown_" + }, + { + "$ref": "#/components/schemas/ResultError_PostgrestError_" + } + ] } } } @@ -14353,15 +14376,16 @@ "application/json": { "schema": { "properties": { - "include": { - "$ref": "#/components/schemas/IncludeExperimentKeys" + "meta": { + "$ref": "#/components/schemas/Record_string.string_" }, - "filter": { - "$ref": "#/components/schemas/ExperimentFilterNode" + "experimentId": { + "type": "string" } }, "required": [ - "filter" + "meta", + "experimentId" ], "type": "object" } @@ -14370,23 +14394,23 @@ } } }, - "/v1/experiment/dataset": { + "/v1/experiment": { "post": { - "operationId": "AddDataset", + "operationId": "CreateNewExperimentOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__datasetId-string_.string_" + "$ref": "#/components/schemas/Result__experimentId-string_.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14399,30 +14423,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewDatasetParams" + "$ref": "#/components/schemas/NewExperimentParams" } } } } } }, - "/v1/experiment/dataset/random": { + "/v1/experiment/hypothesis": { "post": { - "operationId": "AddRandomDataset", + "operationId": "CreateNewExperimentHypothesis", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__datasetId-string_.string_" + "$ref": "#/components/schemas/Result__hypothesisId-string_.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14435,71 +14459,128 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RandomDatasetParams" + "properties": { + "status": { + "type": "string", + "enum": [ + "PENDING", + "RUNNING", + "COMPLETED", + "FAILED" + ] + }, + "providerKeyId": { + "type": "string" + }, + "promptVersion": { + "type": "string" + }, + "model": { + "type": "string" + }, + "experimentId": { + "type": "string" + } + }, + "required": [ + "status", + "providerKeyId", + "promptVersion", + "model", + "experimentId" + ], + "type": "object" } } } } } }, - "/v1/experiment/dataset/query": { + "/v1/experiment/hypothesis/{hypothesisId}/scores/query": { "post": { - "operationId": "GetDatasets", + "operationId": "GetExperimentHypothesisScores", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result__runsCount-number--scores-Record_string.Score__.string_" + } + } + } + } + }, + "tags": [ + "Experiment" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "hypothesisId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/v1/experiment/{experimentId}/evaluators": { + "get": { + "operationId": "GetExperimentEvaluators", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_DatasetResult-Array.string_" + "$ref": "#/components/schemas/Result_EvaluatorResult-Array.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { "api_key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "promptVersionId": { - "type": "string" - } - }, - "type": "object" - } + "parameters": [ + { + "in": "path", + "name": "experimentId", + "required": true, + "schema": { + "type": "string" } } - } - } - }, - "/v1/experiment/dataset/{datasetId}/row/insert": { + ] + }, "post": { - "operationId": "InsertDatasetRow", + "operationId": "CreateExperimentEvaluatorOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_string.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14509,7 +14590,7 @@ "parameters": [ { "in": "path", - "name": "datasetId", + "name": "experimentId", "required": true, "schema": { "type": "string" @@ -14522,19 +14603,12 @@ "application/json": { "schema": { "properties": { - "originalColumnId": { - "type": "string" - }, - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "inputRecordId": { + "evaluatorId": { "type": "string" } }, "required": [ - "inputs", - "inputRecordId" + "evaluatorId" ], "type": "object" } @@ -14543,23 +14617,23 @@ } } }, - "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { + "/v1/experiment/{experimentId}/evaluators/run": { "post": { - "operationId": "CreateDatasetRow", + "operationId": "RunExperimentEvaluatorsOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_string.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14569,61 +14643,32 @@ "parameters": [ { "in": "path", - "name": "datasetId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "promptVersionId", + "name": "experimentId", "required": true, "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "sourceRequest": { - "type": "string" - }, - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - } - }, - "required": [ - "inputs" - ], - "type": "object" - } - } - } - } + ] } }, - "/v1/experiment/dataset/{datasetId}/inputs/query": { - "post": { - "operationId": "GetDataset", + "/v1/experiment/{experimentId}/evaluators/{evaluatorId}": { + "delete": { + "operationId": "DeleteExperimentEvaluatorOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_PromptInputRecord-Array.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14633,7 +14678,15 @@ "parameters": [ { "in": "path", - "name": "datasetId", + "name": "experimentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "evaluatorId", "required": true, "schema": { "type": "string" @@ -14642,23 +14695,23 @@ ] } }, - "/v1/experiment/dataset/{datasetId}/mutate": { + "/v1/experiment/query": { "post": { - "operationId": "MutateDataset", + "operationId": "GetExperimentsOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result___-Array.string_" + "$ref": "#/components/schemas/Result_Experiment-Array.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14672,22 +14725,15 @@ "application/json": { "schema": { "properties": { - "removeRequests": { - "items": { - "type": "string" - }, - "type": "array" + "include": { + "$ref": "#/components/schemas/IncludeExperimentKeys" }, - "addRequests": { - "items": { - "type": "string" - }, - "type": "array" + "filter": { + "$ref": "#/components/schemas/ExperimentFilterNode" } }, "required": [ - "removeRequests", - "addRequests" + "filter" ], "type": "object" } @@ -16753,6 +16799,133 @@ } } }, + "/v1/pi/org-name/query": { + "post": { + "operationId": "GetOrgName", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_string.string_" + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] + } + }, + "/v1/pi/total-costs": { + "post": { + "operationId": "GetTotalCosts", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_number.string_" + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] + } + }, + "/v1/pi/total_requests": { + "post": { + "operationId": "GetTotalRequests", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_number.string_" + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] + } + }, + "/v1/pi/costs-over-time/query": { + "post": { + "operationId": "GetCostsOverTime", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result__cost-number--created_at_trunc-string_-Array.string_" + }, + "examples": { + "Example 1": { + "value": { + "userFilter": "all", + "timeFilter": { + "start": "2024-01-01", + "end": "2024-01-31" + }, + "dbIncrement": "day", + "timeZoneDifference": 0 + } + } + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataOverTimeRequest" + } + } + } + } + } + }, "/v1/settings/query": { "get": { "operationId": "GetSettings", diff --git a/valhalla/jawn/src/controllers/public/piController.ts b/valhalla/jawn/src/controllers/public/piController.ts index 01df61c9d4..e21f4f1d41 100644 --- a/valhalla/jawn/src/controllers/public/piController.ts +++ b/valhalla/jawn/src/controllers/public/piController.ts @@ -1,8 +1,26 @@ -import { Body, Controller, Post, Request, Route, Security, Tags } from "tsoa"; +import { + Body, + Controller, + Example, + Post, + Request, + Route, + Security, + Tags, +} from "tsoa"; import { Result, err, ok } from "../../lib/shared/result"; import { JawnAuthenticatedRequest } from "../../types/request"; import { supabaseServer } from "../../lib/db/supabase"; +import { RequestManager } from "../../managers/request/RequestManager"; +import { buildFilterWithAuthClickHouse } from "../../lib/shared/filters/filters"; +import { timeFilterToFilterNode } from "../../lib/shared/filters/filterDefs"; +import { dbQueryClickhouse } from "../../lib/shared/db/dbExecute"; +import { clickhousePriceCalc } from "../../packages/cost"; +import { + DataOverTimeRequest, + getXOverTime, +} from "../../managers/helpers/getXOverTime"; @Route("/v1/pi") @Tags("PI") @@ -40,4 +58,140 @@ export class PiController extends Controller { return ok("success"); } } + + @Post("/org-name/query") + public async getOrgName( + @Request() request: JawnAuthenticatedRequest + ): Promise> { + const result = await supabaseServer.client + .from("organization") + .select("*") + .eq("id", request.authParams.organizationId); + + if (result.error) { + this.setStatus(500); + console.error(result.error); + return err(result.error?.message || "Failed to fetch evals"); + } + + return ok(result.data?.[0]?.name || "Unknown"); + } + + @Post("/total-costs") + public async getTotalCosts( + @Request() request: JawnAuthenticatedRequest + ): Promise> { + const startTime = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000); // 30 days ago + const endTime = new Date(Date.now()); + + const { filter: filterString, argsAcc } = + await buildFilterWithAuthClickHouse({ + org_id: request.authParams.organizationId, + filter: { + left: timeFilterToFilterNode( + { + start: startTime, + end: endTime, + }, + "request_response_rmt" + ), + right: "all", + operator: "and", + }, + argsAcc: [], + }); + + const query = ` + WITH total_cost AS ( + SELECT ${clickhousePriceCalc("request_response_rmt")} as cost + FROM request_response_rmt + WHERE ( + (${filterString}) + ) + ) + SELECT coalesce(sum(cost), 0) as cost + FROM total_cost +`; + + const result = await dbQueryClickhouse<{ + cost: number; + }>(query, argsAcc); + + return ok(result.data?.[0]?.cost || 0); + } + + @Post("/total_requests") + public async getTotalRequests( + @Request() request: JawnAuthenticatedRequest + ): Promise> { + const startTime = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000); // 30 days ago + const endTime = new Date(Date.now()); + + const { filter: filterString, argsAcc } = + await buildFilterWithAuthClickHouse({ + org_id: request.authParams.organizationId, + filter: { + left: timeFilterToFilterNode( + { + start: startTime, + end: endTime, + }, + "request_response_rmt" + ), + right: "all", + operator: "and", + }, + argsAcc: [], + }); + + const query = ` + WITH total_count AS ( + SELECT count(*) as count + FROM request_response_rmt + WHERE ( + (${filterString}) + ) + ) + SELECT coalesce(sum(count), 0) as count + FROM total_count +`; + + const result = await dbQueryClickhouse<{ + count: number; + }>(query, argsAcc); + + return ok(result.data?.[0]?.count || 0); + } + + @Post("/costs-over-time/query") + @Example({ + userFilter: "all", + timeFilter: { + start: "2024-01-01", + end: "2024-01-31", + }, + dbIncrement: "day", + timeZoneDifference: 0, + }) + public async getCostsOverTime( + @Body() + requestBody: DataOverTimeRequest, + @Request() request: JawnAuthenticatedRequest + ): Promise< + Result< + { + cost: number; + created_at_trunc: string; + }[], + string + > + > { + return await getXOverTime<{ + cost: number; + }>(requestBody, { + orgId: request.authParams.organizationId, + countColumn: `${clickhousePriceCalc("request_response_rmt")} as cost`, + groupByColumns: ["created_at_trunc"], + }); + } } diff --git a/valhalla/jawn/src/tsoa-build/private/routes.ts b/valhalla/jawn/src/tsoa-build/private/routes.ts index 8c93a91fbb..65950358e0 100644 --- a/valhalla/jawn/src/tsoa-build/private/routes.ts +++ b/valhalla/jawn/src/tsoa-build/private/routes.ts @@ -44,10 +44,10 @@ import { PropertyController } from './../../controllers/public/propertyControlle // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { IntegrationController } from './../../controllers/public/integrationController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { ExperimentDatasetController } from './../../controllers/public/experimentDatasetController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { ExperimentController } from './../../controllers/public/experimentController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { ExperimentDatasetController } from './../../controllers/public/experimentDatasetController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { HeliconeDatasetController } from './../../controllers/public/heliconeDatasetController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { DataIsBeautifulRouter } from './../../controllers/public/dataIsBeautifulController'; @@ -2145,110 +2145,6 @@ const models: TsoaRoute.Models = { "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_Array__id-string--name-string___"},{"ref":"ResultError_string_"}],"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess__datasetId-string__": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"datasetId":{"dataType":"string","required":true}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result__datasetId-string_.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__datasetId-string__"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DatasetMetadata": { - "dataType": "refObject", - "properties": { - "promptVersionId": {"dataType":"string"}, - "inputRecordsIds": {"dataType":"array","array":{"dataType":"string"}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "NewDatasetParams": { - "dataType": "refObject", - "properties": { - "datasetName": {"dataType":"string","required":true}, - "requestIds": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "datasetType": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["experiment"]},{"dataType":"enum","enums":["helicone"]}],"required":true}, - "meta": {"ref":"DatasetMetadata"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Pick_FilterLeaf.request-or-prompts_versions_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"request":{"ref":"Partial_RequestTableToOperators_"},"prompts_versions":{"ref":"Partial_PromptVersionsToOperators_"}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "FilterLeafSubset_request-or-prompts_versions_": { - "dataType": "refAlias", - "type": {"ref":"Pick_FilterLeaf.request-or-prompts_versions_","validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DatasetFilterNode": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"FilterLeafSubset_request-or-prompts_versions_"},{"ref":"DatasetFilterBranch"},{"dataType":"enum","enums":["all"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DatasetFilterBranch": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"right":{"ref":"DatasetFilterNode","required":true},"operator":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["or"]},{"dataType":"enum","enums":["and"]}],"required":true},"left":{"ref":"DatasetFilterNode","required":true}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "RandomDatasetParams": { - "dataType": "refObject", - "properties": { - "datasetName": {"dataType":"string","required":true}, - "filter": {"ref":"DatasetFilterNode","required":true}, - "offset": {"dataType":"double"}, - "limit": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DatasetResult": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "name": {"dataType":"string","required":true}, - "created_at": {"dataType":"string","required":true}, - "meta": {"ref":"DatasetMetadata"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess_DatasetResult-Array_": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"array","array":{"dataType":"refObject","ref":"DatasetResult"},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result_DatasetResult-Array.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_DatasetResult-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess___-Array_": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result___-Array.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess___-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "ResultSuccess__tableId-string--experimentId-string__": { "dataType": "refObject", "properties": { @@ -2541,6 +2437,110 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ResultSuccess__datasetId-string__": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"datasetId":{"dataType":"string","required":true}},"required":true}, + "error": {"dataType":"enum","enums":[null],"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Result__datasetId-string_.string_": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__datasetId-string__"},{"ref":"ResultError_string_"}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DatasetMetadata": { + "dataType": "refObject", + "properties": { + "promptVersionId": {"dataType":"string"}, + "inputRecordsIds": {"dataType":"array","array":{"dataType":"string"}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "NewDatasetParams": { + "dataType": "refObject", + "properties": { + "datasetName": {"dataType":"string","required":true}, + "requestIds": {"dataType":"array","array":{"dataType":"string"},"required":true}, + "datasetType": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["experiment"]},{"dataType":"enum","enums":["helicone"]}],"required":true}, + "meta": {"ref":"DatasetMetadata"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Pick_FilterLeaf.request-or-prompts_versions_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"request":{"ref":"Partial_RequestTableToOperators_"},"prompts_versions":{"ref":"Partial_PromptVersionsToOperators_"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "FilterLeafSubset_request-or-prompts_versions_": { + "dataType": "refAlias", + "type": {"ref":"Pick_FilterLeaf.request-or-prompts_versions_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DatasetFilterNode": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"FilterLeafSubset_request-or-prompts_versions_"},{"ref":"DatasetFilterBranch"},{"dataType":"enum","enums":["all"]}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DatasetFilterBranch": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"right":{"ref":"DatasetFilterNode","required":true},"operator":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["or"]},{"dataType":"enum","enums":["and"]}],"required":true},"left":{"ref":"DatasetFilterNode","required":true}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RandomDatasetParams": { + "dataType": "refObject", + "properties": { + "datasetName": {"dataType":"string","required":true}, + "filter": {"ref":"DatasetFilterNode","required":true}, + "offset": {"dataType":"double"}, + "limit": {"dataType":"double"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DatasetResult": { + "dataType": "refObject", + "properties": { + "id": {"dataType":"string","required":true}, + "name": {"dataType":"string","required":true}, + "created_at": {"dataType":"string","required":true}, + "meta": {"ref":"DatasetMetadata"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ResultSuccess_DatasetResult-Array_": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"array","array":{"dataType":"refObject","ref":"DatasetResult"},"required":true}, + "error": {"dataType":"enum","enums":[null],"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Result_DatasetResult-Array.string_": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_DatasetResult-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ResultSuccess___-Array_": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{}},"required":true}, + "error": {"dataType":"enum","enums":[null],"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Result___-Array.string_": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess___-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "HeliconeDatasetMetadata": { "dataType": "refObject", "properties": { @@ -3125,6 +3125,20 @@ const models: TsoaRoute.Models = { "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__apiKey-string__"},{"ref":"ResultError_string_"}],"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"created_at_trunc":{"dataType":"string","required":true},"cost":{"dataType":"double","required":true}}},"required":true}, + "error": {"dataType":"enum","enums":[null],"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Result__cost-number--created_at_trunc-string_-Array.string_": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__cost-number--created_at_trunc-string_-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa }; const templateService = new ExpressTemplateService(models, {"noImplicitAdditionalProperties":"throw-on-extras","bodyCoercion":true}); @@ -6489,14 +6503,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset', + app.post('/v1/experiment/new-empty', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.addDataset)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.createNewEmptyExperiment)), - async function ExperimentDatasetController_addDataset(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createNewEmptyExperiment(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"NewDatasetParams"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"datasetId":{"dataType":"string","required":true},"metadata":{"ref":"Record_string.string_","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6506,10 +6520,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'addDataset', + methodName: 'createNewEmptyExperiment', controller, response, next, @@ -6521,14 +6535,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/random', + app.post('/v1/experiment/table/new', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.addRandomDataset)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentTable)), - async function ExperimentDatasetController_addRandomDataset(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createNewExperimentTable(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"RandomDatasetParams"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateExperimentTableParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6538,10 +6552,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'addRandomDataset', + methodName: 'createNewExperimentTable', controller, response, next, @@ -6553,14 +6567,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/query', + app.post('/v1/experiment/table/:experimentTableId/query', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.getDatasets)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTableById)), - async function ExperimentDatasetController_getDatasets(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentTableById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"promptVersionId":{"dataType":"string"}}}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6570,10 +6584,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getDatasets', + methodName: 'getExperimentTableById', controller, response, next, @@ -6585,16 +6599,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/:datasetId/row/insert', + app.post('/v1/experiment/table/:experimentTableId/metadata/query', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.insertDatasetRow)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTableMetadata)), - async function ExperimentDatasetController_insertDatasetRow(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentTableMetadata(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"originalColumnId":{"dataType":"string"},"inputs":{"ref":"Record_string.string_","required":true},"inputRecordId":{"dataType":"string","required":true}}}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, - datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -6603,10 +6616,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'insertDatasetRow', + methodName: 'getExperimentTableMetadata', controller, response, next, @@ -6618,17 +6631,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/:datasetId/version/:promptVersionId/row/new', + app.post('/v1/experiment/tables/query', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.createDatasetRow)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTables)), - async function ExperimentDatasetController_createDatasetRow(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentTables(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"sourceRequest":{"dataType":"string"},"inputs":{"ref":"Record_string.string_","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, - datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, - promptVersionId: {"in":"path","name":"promptVersionId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -6637,10 +6647,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createDatasetRow', + methodName: 'getExperimentTables', controller, response, next, @@ -6652,15 +6662,16 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/:datasetId/inputs/query', + app.post('/v1/experiment/table/:experimentTableId/cell', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.getDataset)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentCell)), - async function ExperimentDatasetController_getDataset(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentCell(request: ExRequest, response: ExResponse, next: any) { const args: Record = { + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"value":{"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"enum","enums":[null]}],"required":true},"rowIndex":{"dataType":"double","required":true},"columnId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, - datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -6669,10 +6680,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getDataset', + methodName: 'createExperimentCell', controller, response, next, @@ -6684,14 +6695,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/:datasetId/mutate', + app.patch('/v1/experiment/table/:experimentTableId/cell', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.mutateDataset)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.updateExperimentCell)), - async function ExperimentDatasetController_mutateDataset(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_updateExperimentCell(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"removeRequests":{"dataType":"array","array":{"dataType":"string"},"required":true},"addRequests":{"dataType":"array","array":{"dataType":"string"},"required":true}}}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"updateInputs":{"dataType":"boolean"},"metadata":{"dataType":"string"},"value":{"dataType":"string"},"status":{"dataType":"string"},"cellId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6701,10 +6713,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'mutateDataset', + methodName: 'updateExperimentCell', controller, response, next, @@ -6716,14 +6728,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/new-empty', + app.post('/v1/experiment/table/:experimentTableId/column', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createNewEmptyExperiment)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentColumn)), - async function ExperimentController_createNewEmptyExperiment(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentColumn(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"datasetId":{"dataType":"string","required":true},"metadata":{"ref":"Record_string.string_","required":true}}}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"inputKeys":{"dataType":"array","array":{"dataType":"string"}},"promptVersionId":{"dataType":"string"},"hypothesisId":{"dataType":"string"},"columnType":{"dataType":"string","required":true},"columnName":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6736,7 +6749,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createNewEmptyExperiment', + methodName: 'createExperimentColumn', controller, response, next, @@ -6748,14 +6761,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/new', + app.post('/v1/experiment/table/:experimentTableId/row/new', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentTable)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentTableRow)), - async function ExperimentController_createNewExperimentTable(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentTableRow(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateExperimentTableParams"}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"inputs":{"ref":"Record_string.string_"},"sourceRequest":{"dataType":"string"},"promptVersionId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6768,7 +6782,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createNewExperimentTable', + methodName: 'createExperimentTableRow', controller, response, next, @@ -6780,14 +6794,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/query', + app.delete('/v1/experiment/table/:experimentTableId/row/:rowIndex', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTableById)), + ...(fetchMiddlewares(ExperimentController.prototype.deleteExperimentTableRow)), - async function ExperimentController_getExperimentTableById(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_deleteExperimentTableRow(request: ExRequest, response: ExResponse, next: any) { const args: Record = { experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + rowIndex: {"in":"path","name":"rowIndex","required":true,"dataType":"double"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6800,7 +6815,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getExperimentTableById', + methodName: 'deleteExperimentTableRow', controller, response, next, @@ -6812,14 +6827,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/metadata/query', + app.post('/v1/experiment/table/:experimentTableId/row/insert/batch', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTableMetadata)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentTableRowWithCellsBatch)), - async function ExperimentController_getExperimentTableMetadata(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentTableRowWithCellsBatch(request: ExRequest, response: ExResponse, next: any) { const args: Record = { experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"rows":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"sourceRequest":{"dataType":"string"},"cells":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"metadata":{"dataType":"any"},"value":{"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"enum","enums":[null]}],"required":true},"columnId":{"dataType":"string","required":true}}},"required":true},"datasetId":{"dataType":"string","required":true},"inputs":{"ref":"Record_string.string_","required":true},"inputRecordId":{"dataType":"string","required":true}}},"required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6832,7 +6848,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getExperimentTableMetadata', + methodName: 'createExperimentTableRowWithCellsBatch', controller, response, next, @@ -6844,13 +6860,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/tables/query', + app.post('/v1/experiment/update-meta', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTables)), + ...(fetchMiddlewares(ExperimentController.prototype.updateExperimentMeta)), - async function ExperimentController_getExperimentTables(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_updateExperimentMeta(request: ExRequest, response: ExResponse, next: any) { const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"meta":{"ref":"Record_string.string_","required":true},"experimentId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6863,7 +6880,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getExperimentTables', + methodName: 'updateExperimentMeta', controller, response, next, @@ -6875,15 +6892,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/cell', + app.post('/v1/experiment', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentCell)), + ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentOld)), - async function ExperimentController_createExperimentCell(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createNewExperimentOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"value":{"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"enum","enums":[null]}],"required":true},"rowIndex":{"dataType":"double","required":true},"columnId":{"dataType":"string","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"NewExperimentParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6896,7 +6912,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createExperimentCell', + methodName: 'createNewExperimentOld', controller, response, next, @@ -6908,15 +6924,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/v1/experiment/table/:experimentTableId/cell', + app.post('/v1/experiment/hypothesis', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.updateExperimentCell)), + ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentHypothesis)), - async function ExperimentController_updateExperimentCell(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createNewExperimentHypothesis(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"updateInputs":{"dataType":"boolean"},"metadata":{"dataType":"string"},"value":{"dataType":"string"},"status":{"dataType":"string"},"cellId":{"dataType":"string","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"status":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["PENDING"]},{"dataType":"enum","enums":["RUNNING"]},{"dataType":"enum","enums":["COMPLETED"]},{"dataType":"enum","enums":["FAILED"]}],"required":true},"providerKeyId":{"dataType":"string","required":true},"promptVersion":{"dataType":"string","required":true},"model":{"dataType":"string","required":true},"experimentId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6929,7 +6944,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'updateExperimentCell', + methodName: 'createNewExperimentHypothesis', controller, response, next, @@ -6941,15 +6956,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/column', + app.post('/v1/experiment/hypothesis/:hypothesisId/scores/query', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentColumn)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentHypothesisScores)), - async function ExperimentController_createExperimentColumn(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentHypothesisScores(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"inputKeys":{"dataType":"array","array":{"dataType":"string"}},"promptVersionId":{"dataType":"string"},"hypothesisId":{"dataType":"string"},"columnType":{"dataType":"string","required":true},"columnName":{"dataType":"string","required":true}}}, + hypothesisId: {"in":"path","name":"hypothesisId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6962,7 +6976,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createExperimentColumn', + methodName: 'getExperimentHypothesisScores', controller, response, next, @@ -6974,15 +6988,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/row/new', + app.get('/v1/experiment/:experimentId/evaluators', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentTableRow)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentEvaluators)), - async function ExperimentController_createExperimentTableRow(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentEvaluators(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"inputs":{"ref":"Record_string.string_"},"sourceRequest":{"dataType":"string"},"promptVersionId":{"dataType":"string","required":true}}}, + experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6995,7 +7008,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createExperimentTableRow', + methodName: 'getExperimentEvaluators', controller, response, next, @@ -7007,15 +7020,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.delete('/v1/experiment/table/:experimentTableId/row/:rowIndex', + app.post('/v1/experiment/:experimentId/evaluators/run', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.deleteExperimentTableRow)), + ...(fetchMiddlewares(ExperimentController.prototype.runExperimentEvaluatorsOld)), - async function ExperimentController_deleteExperimentTableRow(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_runExperimentEvaluatorsOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - rowIndex: {"in":"path","name":"rowIndex","required":true,"dataType":"double"}, + experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -7028,7 +7040,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'deleteExperimentTableRow', + methodName: 'runExperimentEvaluatorsOld', controller, response, next, @@ -7040,15 +7052,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/row/insert/batch', + app.post('/v1/experiment/:experimentId/evaluators', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentTableRowWithCellsBatch)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentEvaluatorOld)), - async function ExperimentController_createExperimentTableRowWithCellsBatch(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentEvaluatorOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"rows":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"sourceRequest":{"dataType":"string"},"cells":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"metadata":{"dataType":"any"},"value":{"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"enum","enums":[null]}],"required":true},"columnId":{"dataType":"string","required":true}}},"required":true},"datasetId":{"dataType":"string","required":true},"inputs":{"ref":"Record_string.string_","required":true},"inputRecordId":{"dataType":"string","required":true}}},"required":true}}}, + experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"evaluatorId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -7061,7 +7073,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createExperimentTableRowWithCellsBatch', + methodName: 'createExperimentEvaluatorOld', controller, response, next, @@ -7073,14 +7085,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/update-meta', + app.delete('/v1/experiment/:experimentId/evaluators/:evaluatorId', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.updateExperimentMeta)), + ...(fetchMiddlewares(ExperimentController.prototype.deleteExperimentEvaluatorOld)), - async function ExperimentController_updateExperimentMeta(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_deleteExperimentEvaluatorOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"meta":{"ref":"Record_string.string_","required":true},"experimentId":{"dataType":"string","required":true}}}, + experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, + evaluatorId: {"in":"path","name":"evaluatorId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -7093,7 +7106,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'updateExperimentMeta', + methodName: 'deleteExperimentEvaluatorOld', controller, response, next, @@ -7105,14 +7118,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment', + app.post('/v1/experiment/query', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentOld)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentsOld)), - async function ExperimentController_createNewExperimentOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentsOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"NewExperimentParams"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"include":{"ref":"IncludeExperimentKeys"},"filter":{"ref":"ExperimentFilterNode","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -7125,7 +7138,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createNewExperimentOld', + methodName: 'getExperimentsOld', controller, response, next, @@ -7137,14 +7150,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/hypothesis', + app.post('/v1/experiment/dataset', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentHypothesis)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.addDataset)), - async function ExperimentController_createNewExperimentHypothesis(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_addDataset(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"status":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["PENDING"]},{"dataType":"enum","enums":["RUNNING"]},{"dataType":"enum","enums":["COMPLETED"]},{"dataType":"enum","enums":["FAILED"]}],"required":true},"providerKeyId":{"dataType":"string","required":true},"promptVersion":{"dataType":"string","required":true},"model":{"dataType":"string","required":true},"experimentId":{"dataType":"string","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"NewDatasetParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -7154,10 +7167,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'createNewExperimentHypothesis', + methodName: 'addDataset', controller, response, next, @@ -7169,14 +7182,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/hypothesis/:hypothesisId/scores/query', + app.post('/v1/experiment/dataset/random', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentHypothesisScores)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.addRandomDataset)), - async function ExperimentController_getExperimentHypothesisScores(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_addRandomDataset(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - hypothesisId: {"in":"path","name":"hypothesisId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"RandomDatasetParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -7186,10 +7199,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'getExperimentHypothesisScores', + methodName: 'addRandomDataset', controller, response, next, @@ -7201,14 +7214,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/v1/experiment/:experimentId/evaluators', + app.post('/v1/experiment/dataset/query', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentEvaluators)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.getDatasets)), - async function ExperimentController_getExperimentEvaluators(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_getDatasets(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"promptVersionId":{"dataType":"string"}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -7218,10 +7231,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'getExperimentEvaluators', + methodName: 'getDatasets', controller, response, next, @@ -7233,15 +7246,16 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/:experimentId/evaluators/run', + app.post('/v1/experiment/dataset/:datasetId/row/insert', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.runExperimentEvaluatorsOld)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.insertDatasetRow)), - async function ExperimentController_runExperimentEvaluatorsOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_insertDatasetRow(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"originalColumnId":{"dataType":"string"},"inputs":{"ref":"Record_string.string_","required":true},"inputRecordId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, + datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -7250,10 +7264,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'runExperimentEvaluatorsOld', + methodName: 'insertDatasetRow', controller, response, next, @@ -7265,16 +7279,17 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/:experimentId/evaluators', + app.post('/v1/experiment/dataset/:datasetId/version/:promptVersionId/row/new', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentEvaluatorOld)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.createDatasetRow)), - async function ExperimentController_createExperimentEvaluatorOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_createDatasetRow(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"evaluatorId":{"dataType":"string","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"sourceRequest":{"dataType":"string"},"inputs":{"ref":"Record_string.string_","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, + datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, + promptVersionId: {"in":"path","name":"promptVersionId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -7283,10 +7298,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'createExperimentEvaluatorOld', + methodName: 'createDatasetRow', controller, response, next, @@ -7298,16 +7313,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.delete('/v1/experiment/:experimentId/evaluators/:evaluatorId', + app.post('/v1/experiment/dataset/:datasetId/inputs/query', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.deleteExperimentEvaluatorOld)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.getDataset)), - async function ExperimentController_deleteExperimentEvaluatorOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_getDataset(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, - evaluatorId: {"in":"path","name":"evaluatorId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, + datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -7316,10 +7330,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'deleteExperimentEvaluatorOld', + methodName: 'getDataset', controller, response, next, @@ -7331,14 +7345,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/query', + app.post('/v1/experiment/dataset/:datasetId/mutate', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentsOld)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.mutateDataset)), - async function ExperimentController_getExperimentsOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_mutateDataset(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"include":{"ref":"IncludeExperimentKeys"},"filter":{"ref":"ExperimentFilterNode","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"removeRequests":{"dataType":"array","array":{"dataType":"string"},"required":true},"addRequests":{"dataType":"array","array":{"dataType":"string"},"required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -7348,10 +7362,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'getExperimentsOld', + methodName: 'mutateDataset', controller, response, next, @@ -8930,6 +8944,131 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/v1/pi/org-name/query', + authenticateMiddleware([{"api_key":[]}]), + ...(fetchMiddlewares(PiController)), + ...(fetchMiddlewares(PiController.prototype.getOrgName)), + + async function PiController_getOrgName(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PiController(); + + await templateService.apiHandler({ + methodName: 'getOrgName', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/v1/pi/total-costs', + authenticateMiddleware([{"api_key":[]}]), + ...(fetchMiddlewares(PiController)), + ...(fetchMiddlewares(PiController.prototype.getTotalCosts)), + + async function PiController_getTotalCosts(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PiController(); + + await templateService.apiHandler({ + methodName: 'getTotalCosts', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/v1/pi/total_requests', + authenticateMiddleware([{"api_key":[]}]), + ...(fetchMiddlewares(PiController)), + ...(fetchMiddlewares(PiController.prototype.getTotalRequests)), + + async function PiController_getTotalRequests(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PiController(); + + await templateService.apiHandler({ + methodName: 'getTotalRequests', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/v1/pi/costs-over-time/query', + authenticateMiddleware([{"api_key":[]}]), + ...(fetchMiddlewares(PiController)), + ...(fetchMiddlewares(PiController.prototype.getCostsOverTime)), + + async function PiController_getCostsOverTime(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DataOverTimeRequest"}, + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PiController(); + + await templateService.apiHandler({ + methodName: 'getCostsOverTime', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa app.get('/v1/settings/query', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(SettingController)), diff --git a/valhalla/jawn/src/tsoa-build/private/swagger.json b/valhalla/jawn/src/tsoa-build/private/swagger.json index 906a5d6b46..3ee4c99cd7 100644 --- a/valhalla/jawn/src/tsoa-build/private/swagger.json +++ b/valhalla/jawn/src/tsoa-build/private/swagger.json @@ -6105,257 +6105,6 @@ } ] }, - "ResultSuccess__datasetId-string__": { - "properties": { - "data": { - "properties": { - "datasetId": { - "type": "string" - } - }, - "required": [ - "datasetId" - ], - "type": "object" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__datasetId-string_.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__datasetId-string__" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "DatasetMetadata": { - "properties": { - "promptVersionId": { - "type": "string" - }, - "inputRecordsIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "NewDatasetParams": { - "properties": { - "datasetName": { - "type": "string" - }, - "requestIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "datasetType": { - "type": "string", - "enum": [ - "experiment", - "helicone" - ] - }, - "meta": { - "$ref": "#/components/schemas/DatasetMetadata" - } - }, - "required": [ - "datasetName", - "requestIds", - "datasetType" - ], - "type": "object", - "additionalProperties": false - }, - "Pick_FilterLeaf.request-or-prompts_versions_": { - "properties": { - "request": { - "$ref": "#/components/schemas/Partial_RequestTableToOperators_" - }, - "prompts_versions": { - "$ref": "#/components/schemas/Partial_PromptVersionsToOperators_" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "FilterLeafSubset_request-or-prompts_versions_": { - "$ref": "#/components/schemas/Pick_FilterLeaf.request-or-prompts_versions_" - }, - "DatasetFilterNode": { - "anyOf": [ - { - "$ref": "#/components/schemas/FilterLeafSubset_request-or-prompts_versions_" - }, - { - "$ref": "#/components/schemas/DatasetFilterBranch" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "DatasetFilterBranch": { - "properties": { - "right": { - "$ref": "#/components/schemas/DatasetFilterNode" - }, - "operator": { - "type": "string", - "enum": [ - "or", - "and" - ] - }, - "left": { - "$ref": "#/components/schemas/DatasetFilterNode" - } - }, - "required": [ - "right", - "operator", - "left" - ], - "type": "object" - }, - "RandomDatasetParams": { - "properties": { - "datasetName": { - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/DatasetFilterNode" - }, - "offset": { - "type": "number", - "format": "double" - }, - "limit": { - "type": "number", - "format": "double" - } - }, - "required": [ - "datasetName", - "filter" - ], - "type": "object", - "additionalProperties": false - }, - "DatasetResult": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "meta": { - "$ref": "#/components/schemas/DatasetMetadata" - } - }, - "required": [ - "id", - "name", - "created_at" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess_DatasetResult-Array_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/DatasetResult" - }, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result_DatasetResult-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_DatasetResult-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "ResultSuccess___-Array_": { - "properties": { - "data": { - "items": { - "properties": {}, - "type": "object" - }, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result___-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess___-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, "ResultSuccess__tableId-string--experimentId-string__": { "properties": { "data": { @@ -7276,11 +7025,262 @@ "type": "object", "additionalProperties": false }, - "HeliconeDatasetMetadata": { + "ResultSuccess__datasetId-string__": { "properties": { - "promptVersionId": { - "type": "string" - }, + "data": { + "properties": { + "datasetId": { + "type": "string" + } + }, + "required": [ + "datasetId" + ], + "type": "object" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result__datasetId-string_.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess__datasetId-string__" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "DatasetMetadata": { + "properties": { + "promptVersionId": { + "type": "string" + }, + "inputRecordsIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "NewDatasetParams": { + "properties": { + "datasetName": { + "type": "string" + }, + "requestIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "datasetType": { + "type": "string", + "enum": [ + "experiment", + "helicone" + ] + }, + "meta": { + "$ref": "#/components/schemas/DatasetMetadata" + } + }, + "required": [ + "datasetName", + "requestIds", + "datasetType" + ], + "type": "object", + "additionalProperties": false + }, + "Pick_FilterLeaf.request-or-prompts_versions_": { + "properties": { + "request": { + "$ref": "#/components/schemas/Partial_RequestTableToOperators_" + }, + "prompts_versions": { + "$ref": "#/components/schemas/Partial_PromptVersionsToOperators_" + } + }, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "FilterLeafSubset_request-or-prompts_versions_": { + "$ref": "#/components/schemas/Pick_FilterLeaf.request-or-prompts_versions_" + }, + "DatasetFilterNode": { + "anyOf": [ + { + "$ref": "#/components/schemas/FilterLeafSubset_request-or-prompts_versions_" + }, + { + "$ref": "#/components/schemas/DatasetFilterBranch" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + }, + "DatasetFilterBranch": { + "properties": { + "right": { + "$ref": "#/components/schemas/DatasetFilterNode" + }, + "operator": { + "type": "string", + "enum": [ + "or", + "and" + ] + }, + "left": { + "$ref": "#/components/schemas/DatasetFilterNode" + } + }, + "required": [ + "right", + "operator", + "left" + ], + "type": "object" + }, + "RandomDatasetParams": { + "properties": { + "datasetName": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/DatasetFilterNode" + }, + "offset": { + "type": "number", + "format": "double" + }, + "limit": { + "type": "number", + "format": "double" + } + }, + "required": [ + "datasetName", + "filter" + ], + "type": "object", + "additionalProperties": false + }, + "DatasetResult": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "meta": { + "$ref": "#/components/schemas/DatasetMetadata" + } + }, + "required": [ + "id", + "name", + "created_at" + ], + "type": "object", + "additionalProperties": false + }, + "ResultSuccess_DatasetResult-Array_": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/DatasetResult" + }, + "type": "array" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result_DatasetResult-Array.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess_DatasetResult-Array_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "ResultSuccess___-Array_": { + "properties": { + "data": { + "items": { + "properties": {}, + "type": "object" + }, + "type": "array" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result___-Array.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess___-Array_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "HeliconeDatasetMetadata": { + "properties": { + "promptVersionId": { + "type": "string" + }, "inputRecordsIds": { "items": { "type": "string" @@ -9193,8 +9193,54 @@ "$ref": "#/components/schemas/ResultError_string_" } ] - } - }, + }, + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + "properties": { + "data": { + "items": { + "properties": { + "created_at_trunc": { + "type": "string" + }, + "cost": { + "type": "number", + "format": "double" + } + }, + "required": [ + "created_at_trunc", + "cost" + ], + "type": "object" + }, + "type": "array" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result__cost-number--created_at_trunc-string_-Array.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess__cost-number--created_at_trunc-string_-Array_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + } + }, "securitySchemes": { "api_key": { "type": "apiKey", @@ -14086,23 +14132,23 @@ "parameters": [] } }, - "/v1/experiment/dataset": { + "/v1/experiment/new-empty": { "post": { - "operationId": "AddDataset", + "operationId": "CreateNewEmptyExperiment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__datasetId-string_.string_" + "$ref": "#/components/schemas/Result__experimentId-string_.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14115,30 +14161,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewDatasetParams" + "properties": { + "datasetId": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Record_string.string_" + } + }, + "required": [ + "datasetId", + "metadata" + ], + "type": "object" } } } } } }, - "/v1/experiment/dataset/random": { + "/v1/experiment/table/new": { "post": { - "operationId": "AddRandomDataset", + "operationId": "CreateNewExperimentTable", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__datasetId-string_.string_" + "$ref": "#/components/schemas/Result__tableId-string--experimentId-string_.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14151,71 +14209,65 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RandomDatasetParams" + "$ref": "#/components/schemas/CreateExperimentTableParams" } } } } } }, - "/v1/experiment/dataset/query": { + "/v1/experiment/table/{experimentTableId}/query": { "post": { - "operationId": "GetDatasets", + "operationId": "GetExperimentTableById", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_DatasetResult-Array.string_" + "$ref": "#/components/schemas/Result_ExperimentTable.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { "api_key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "promptVersionId": { - "type": "string" - } - }, - "type": "object" - } + "parameters": [ + { + "in": "path", + "name": "experimentTableId", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, - "/v1/experiment/dataset/{datasetId}/row/insert": { + "/v1/experiment/table/{experimentTableId}/metadata/query": { "post": { - "operationId": "InsertDatasetRow", + "operationId": "GetExperimentTableMetadata", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_string.string_" + "$ref": "#/components/schemas/Result_ExperimentTableSimplified.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14225,57 +14277,58 @@ "parameters": [ { "in": "path", - "name": "datasetId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "originalColumnId": { - "type": "string" - }, - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "inputRecordId": { - "type": "string" - } - }, - "required": [ - "inputs", - "inputRecordId" - ], - "type": "object" + ] + } + }, + "/v1/experiment/tables/query": { + "post": { + "operationId": "GetExperimentTables", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_ExperimentTableSimplified-Array.string_" + } } } } - } + }, + "tags": [ + "Experiment" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] } }, - "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { + "/v1/experiment/table/{experimentTableId}/cell": { "post": { - "operationId": "CreateDatasetRow", + "operationId": "CreateExperimentCell", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_string.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14285,15 +14338,7 @@ "parameters": [ { "in": "path", - "name": "datasetId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "promptVersionId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" @@ -14306,40 +14351,45 @@ "application/json": { "schema": { "properties": { - "sourceRequest": { - "type": "string" + "value": { + "type": "string", + "nullable": true }, - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" + "rowIndex": { + "type": "number", + "format": "double" + }, + "columnId": { + "type": "string" } }, "required": [ - "inputs" + "value", + "rowIndex", + "columnId" ], "type": "object" } } } } - } - }, - "/v1/experiment/dataset/{datasetId}/inputs/query": { - "post": { - "operationId": "GetDataset", + }, + "patch": { + "operationId": "UpdateExperimentCell", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_PromptInputRecord-Array.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14349,61 +14399,106 @@ "parameters": [ { "in": "path", - "name": "datasetId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "updateInputs": { + "type": "boolean" + }, + "metadata": { + "type": "string" + }, + "value": { + "type": "string" + }, + "status": { + "type": "string" + }, + "cellId": { + "type": "string" + } + }, + "required": [ + "cellId" + ], + "type": "object" + } + } + } + } } }, - "/v1/experiment/dataset/{datasetId}/mutate": { + "/v1/experiment/table/{experimentTableId}/column": { "post": { - "operationId": "MutateDataset", + "operationId": "CreateExperimentColumn", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result___-Array.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { "api_key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { + "parameters": [ + { + "in": "path", + "name": "experimentTableId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "properties": { - "removeRequests": { + "inputKeys": { "items": { "type": "string" }, "type": "array" }, - "addRequests": { - "items": { - "type": "string" - }, - "type": "array" + "promptVersionId": { + "type": "string" + }, + "hypothesisId": { + "type": "string" + }, + "columnType": { + "type": "string" + }, + "columnName": { + "type": "string" } }, "required": [ - "removeRequests", - "addRequests" + "columnType", + "columnName" ], "type": "object" } @@ -14412,16 +14507,16 @@ } } }, - "/v1/experiment/new-empty": { + "/v1/experiment/table/{experimentTableId}/row/new": { "post": { - "operationId": "CreateNewEmptyExperiment", + "operationId": "CreateExperimentTableRow", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__experimentId-string_.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } @@ -14435,23 +14530,34 @@ "api_key": [] } ], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "experimentTableId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { - "datasetId": { + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "sourceRequest": { "type": "string" }, - "metadata": { - "$ref": "#/components/schemas/Record_string.string_" + "promptVersionId": { + "type": "string" } }, "required": [ - "datasetId", - "metadata" + "promptVersionId" ], "type": "object" } @@ -14460,52 +14566,16 @@ } } }, - "/v1/experiment/table/new": { - "post": { - "operationId": "CreateNewExperimentTable", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__tableId-string--experimentId-string_.string_" - } - } - } - } - }, - "tags": [ - "Experiment" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateExperimentTableParams" - } - } - } - } - } - }, - "/v1/experiment/table/{experimentTableId}/query": { - "post": { - "operationId": "GetExperimentTableById", + "/v1/experiment/table/{experimentTableId}/row/{rowIndex}": { + "delete": { + "operationId": "DeleteExperimentTableRow", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ExperimentTable.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } @@ -14527,20 +14597,29 @@ "schema": { "type": "string" } + }, + { + "in": "path", + "name": "rowIndex", + "required": true, + "schema": { + "format": "double", + "type": "number" + } } ] } }, - "/v1/experiment/table/{experimentTableId}/metadata/query": { + "/v1/experiment/table/{experimentTableId}/row/insert/batch": { "post": { - "operationId": "GetExperimentTableMetadata", + "operationId": "CreateExperimentTableRowWithCellsBatch", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ExperimentTableSimplified.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } @@ -14563,19 +14642,87 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "rows": { + "items": { + "properties": { + "sourceRequest": { + "type": "string" + }, + "cells": { + "items": { + "properties": { + "metadata": {}, + "value": { + "type": "string", + "nullable": true + }, + "columnId": { + "type": "string" + } + }, + "required": [ + "value", + "columnId" + ], + "type": "object" + }, + "type": "array" + }, + "datasetId": { + "type": "string" + }, + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "inputRecordId": { + "type": "string" + } + }, + "required": [ + "cells", + "datasetId", + "inputs", + "inputRecordId" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "rows" + ], + "type": "object" + } + } + } + } } }, - "/v1/experiment/tables/query": { + "/v1/experiment/update-meta": { "post": { - "operationId": "GetExperimentTables", + "operationId": "UpdateExperimentMeta", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ExperimentTableSimplified-Array.string_" + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess_unknown_" + }, + { + "$ref": "#/components/schemas/ResultError_PostgrestError_" + } + ] } } } @@ -14589,19 +14736,41 @@ "api_key": [] } ], - "parameters": [] + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "experimentId": { + "type": "string" + } + }, + "required": [ + "meta", + "experimentId" + ], + "type": "object" + } + } + } + } } }, - "/v1/experiment/table/{experimentTableId}/cell": { + "/v1/experiment": { "post": { - "operationId": "CreateExperimentCell", + "operationId": "CreateNewExperimentOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result__experimentId-string_.string_" } } } @@ -14615,54 +14784,29 @@ "api_key": [] } ], - "parameters": [ - { - "in": "path", - "name": "experimentTableId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "value": { - "type": "string", - "nullable": true - }, - "rowIndex": { - "type": "number", - "format": "double" - }, - "columnId": { - "type": "string" - } - }, - "required": [ - "value", - "rowIndex", - "columnId" - ], - "type": "object" + "$ref": "#/components/schemas/NewExperimentParams" } } } } - }, - "patch": { - "operationId": "UpdateExperimentCell", + } + }, + "/v1/experiment/hypothesis": { + "post": { + "operationId": "CreateNewExperimentHypothesis", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result__hypothesisId-string_.string_" } } } @@ -14676,40 +14820,41 @@ "api_key": [] } ], - "parameters": [ - { - "in": "path", - "name": "experimentTableId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { - "updateInputs": { - "type": "boolean" + "status": { + "type": "string", + "enum": [ + "PENDING", + "RUNNING", + "COMPLETED", + "FAILED" + ] }, - "metadata": { + "providerKeyId": { "type": "string" }, - "value": { + "promptVersion": { "type": "string" }, - "status": { + "model": { "type": "string" }, - "cellId": { + "experimentId": { "type": "string" } }, "required": [ - "cellId" + "status", + "providerKeyId", + "promptVersion", + "model", + "experimentId" ], "type": "object" } @@ -14718,16 +14863,16 @@ } } }, - "/v1/experiment/table/{experimentTableId}/column": { + "/v1/experiment/hypothesis/{hypothesisId}/scores/query": { "post": { - "operationId": "CreateExperimentColumn", + "operationId": "GetExperimentHypothesisScores", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result__runsCount-number--scores-Record_string.Score__.string_" } } } @@ -14744,52 +14889,51 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "hypothesisId", "required": true, "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "inputKeys": { - "items": { - "type": "string" - }, - "type": "array" - }, - "promptVersionId": { - "type": "string" - }, - "hypothesisId": { - "type": "string" - }, - "columnType": { - "type": "string" - }, - "columnName": { - "type": "string" - } - }, - "required": [ - "columnType", - "columnName" - ], - "type": "object" + ] + } + }, + "/v1/experiment/{experimentId}/evaluators": { + "get": { + "operationId": "GetExperimentEvaluators", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_EvaluatorResult-Array.string_" + } } } } - } - } - }, - "/v1/experiment/table/{experimentTableId}/row/new": { + }, + "tags": [ + "Experiment" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "experimentId", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, "post": { - "operationId": "CreateExperimentTableRow", + "operationId": "CreateExperimentEvaluatorOld", "responses": { "200": { "description": "Ok", @@ -14813,7 +14957,7 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "experimentId", "required": true, "schema": { "type": "string" @@ -14826,18 +14970,12 @@ "application/json": { "schema": { "properties": { - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "sourceRequest": { - "type": "string" - }, - "promptVersionId": { + "evaluatorId": { "type": "string" } }, "required": [ - "promptVersionId" + "evaluatorId" ], "type": "object" } @@ -14846,9 +14984,9 @@ } } }, - "/v1/experiment/table/{experimentTableId}/row/{rowIndex}": { - "delete": { - "operationId": "DeleteExperimentTableRow", + "/v1/experiment/{experimentId}/evaluators/run": { + "post": { + "operationId": "RunExperimentEvaluatorsOld", "responses": { "200": { "description": "Ok", @@ -14872,27 +15010,18 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "experimentId", "required": true, "schema": { "type": "string" } - }, - { - "in": "path", - "name": "rowIndex", - "required": true, - "schema": { - "format": "double", - "type": "number" - } } ] } }, - "/v1/experiment/table/{experimentTableId}/row/insert/batch": { - "post": { - "operationId": "CreateExperimentTableRowWithCellsBatch", + "/v1/experiment/{experimentId}/evaluators/{evaluatorId}": { + "delete": { + "operationId": "DeleteExperimentEvaluatorOld", "responses": { "200": { "description": "Ok", @@ -14916,93 +15045,33 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "experimentId", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "rows": { - "items": { - "properties": { - "sourceRequest": { - "type": "string" - }, - "cells": { - "items": { - "properties": { - "metadata": {}, - "value": { - "type": "string", - "nullable": true - }, - "columnId": { - "type": "string" - } - }, - "required": [ - "value", - "columnId" - ], - "type": "object" - }, - "type": "array" - }, - "datasetId": { - "type": "string" - }, - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "inputRecordId": { - "type": "string" - } - }, - "required": [ - "cells", - "datasetId", - "inputs", - "inputRecordId" - ], - "type": "object" - }, - "type": "array" - } - }, - "required": [ - "rows" - ], - "type": "object" - } + }, + { + "in": "path", + "name": "evaluatorId", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, - "/v1/experiment/update-meta": { + "/v1/experiment/query": { "post": { - "operationId": "UpdateExperimentMeta", + "operationId": "GetExperimentsOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_unknown_" - }, - { - "$ref": "#/components/schemas/ResultError_PostgrestError_" - } - ] + "$ref": "#/components/schemas/Result_Experiment-Array.string_" } } } @@ -15023,16 +15092,15 @@ "application/json": { "schema": { "properties": { - "meta": { - "$ref": "#/components/schemas/Record_string.string_" + "include": { + "$ref": "#/components/schemas/IncludeExperimentKeys" }, - "experimentId": { - "type": "string" + "filter": { + "$ref": "#/components/schemas/ExperimentFilterNode" } }, "required": [ - "meta", - "experimentId" + "filter" ], "type": "object" } @@ -15041,23 +15109,23 @@ } } }, - "/v1/experiment": { + "/v1/experiment/dataset": { "post": { - "operationId": "CreateNewExperimentOld", + "operationId": "AddDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__experimentId-string_.string_" + "$ref": "#/components/schemas/Result__datasetId-string_.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -15070,30 +15138,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewExperimentParams" + "$ref": "#/components/schemas/NewDatasetParams" } } } } } }, - "/v1/experiment/hypothesis": { + "/v1/experiment/dataset/random": { "post": { - "operationId": "CreateNewExperimentHypothesis", + "operationId": "AddRandomDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__hypothesisId-string_.string_" + "$ref": "#/components/schemas/Result__datasetId-string_.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -15106,128 +15174,71 @@ "content": { "application/json": { "schema": { - "properties": { - "status": { - "type": "string", - "enum": [ - "PENDING", - "RUNNING", - "COMPLETED", - "FAILED" - ] - }, - "providerKeyId": { - "type": "string" - }, - "promptVersion": { - "type": "string" - }, - "model": { - "type": "string" - }, - "experimentId": { - "type": "string" - } - }, - "required": [ - "status", - "providerKeyId", - "promptVersion", - "model", - "experimentId" - ], - "type": "object" + "$ref": "#/components/schemas/RandomDatasetParams" } } } } } }, - "/v1/experiment/hypothesis/{hypothesisId}/scores/query": { - "post": { - "operationId": "GetExperimentHypothesisScores", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__runsCount-number--scores-Record_string.Score__.string_" - } - } - } - } - }, - "tags": [ - "Experiment" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "hypothesisId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/experiment/{experimentId}/evaluators": { - "get": { - "operationId": "GetExperimentEvaluators", + "/v1/experiment/dataset/query": { + "post": { + "operationId": "GetDatasets", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_EvaluatorResult-Array.string_" + "$ref": "#/components/schemas/Result_DatasetResult-Array.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { "api_key": [] } ], - "parameters": [ - { - "in": "path", - "name": "experimentId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "promptVersionId": { + "type": "string" + } + }, + "type": "object" + } } } - ] - }, + } + } + }, + "/v1/experiment/dataset/{datasetId}/row/insert": { "post": { - "operationId": "CreateExperimentEvaluatorOld", + "operationId": "InsertDatasetRow", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_string.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -15237,7 +15248,7 @@ "parameters": [ { "in": "path", - "name": "experimentId", + "name": "datasetId", "required": true, "schema": { "type": "string" @@ -15250,12 +15261,19 @@ "application/json": { "schema": { "properties": { - "evaluatorId": { + "originalColumnId": { + "type": "string" + }, + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "inputRecordId": { "type": "string" } }, "required": [ - "evaluatorId" + "inputs", + "inputRecordId" ], "type": "object" } @@ -15264,23 +15282,23 @@ } } }, - "/v1/experiment/{experimentId}/evaluators/run": { + "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { "post": { - "operationId": "RunExperimentEvaluatorsOld", + "operationId": "CreateDatasetRow", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_string.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -15290,32 +15308,61 @@ "parameters": [ { "in": "path", - "name": "experimentId", + "name": "datasetId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "promptVersionId", "required": true, "schema": { "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "sourceRequest": { + "type": "string" + }, + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" + } + }, + "required": [ + "inputs" + ], + "type": "object" + } + } + } + } } }, - "/v1/experiment/{experimentId}/evaluators/{evaluatorId}": { - "delete": { - "operationId": "DeleteExperimentEvaluatorOld", + "/v1/experiment/dataset/{datasetId}/inputs/query": { + "post": { + "operationId": "GetDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_PromptInputRecord-Array.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -15325,15 +15372,7 @@ "parameters": [ { "in": "path", - "name": "experimentId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "evaluatorId", + "name": "datasetId", "required": true, "schema": { "type": "string" @@ -15342,23 +15381,23 @@ ] } }, - "/v1/experiment/query": { + "/v1/experiment/dataset/{datasetId}/mutate": { "post": { - "operationId": "GetExperimentsOld", + "operationId": "MutateDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_Experiment-Array.string_" + "$ref": "#/components/schemas/Result___-Array.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -15372,15 +15411,22 @@ "application/json": { "schema": { "properties": { - "include": { - "$ref": "#/components/schemas/IncludeExperimentKeys" + "removeRequests": { + "items": { + "type": "string" + }, + "type": "array" }, - "filter": { - "$ref": "#/components/schemas/ExperimentFilterNode" + "addRequests": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "filter" + "removeRequests", + "addRequests" ], "type": "object" } @@ -17446,6 +17492,133 @@ } } }, + "/v1/pi/org-name/query": { + "post": { + "operationId": "GetOrgName", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_string.string_" + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] + } + }, + "/v1/pi/total-costs": { + "post": { + "operationId": "GetTotalCosts", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_number.string_" + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] + } + }, + "/v1/pi/total_requests": { + "post": { + "operationId": "GetTotalRequests", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_number.string_" + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] + } + }, + "/v1/pi/costs-over-time/query": { + "post": { + "operationId": "GetCostsOverTime", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result__cost-number--created_at_trunc-string_-Array.string_" + }, + "examples": { + "Example 1": { + "value": { + "userFilter": "all", + "timeFilter": { + "start": "2024-01-01", + "end": "2024-01-31" + }, + "dbIncrement": "day", + "timeZoneDifference": 0 + } + } + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataOverTimeRequest" + } + } + } + } + } + }, "/v1/settings/query": { "get": { "operationId": "GetSettings", diff --git a/valhalla/jawn/src/tsoa-build/public/routes.ts b/valhalla/jawn/src/tsoa-build/public/routes.ts index ea338fe281..722d791dc4 100644 --- a/valhalla/jawn/src/tsoa-build/public/routes.ts +++ b/valhalla/jawn/src/tsoa-build/public/routes.ts @@ -38,10 +38,10 @@ import { PropertyController } from './../../controllers/public/propertyControlle // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { IntegrationController } from './../../controllers/public/integrationController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { ExperimentController } from './../../controllers/public/experimentController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { ExperimentDatasetController } from './../../controllers/public/experimentDatasetController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { ExperimentController } from './../../controllers/public/experimentController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { HeliconeDatasetController } from './../../controllers/public/heliconeDatasetController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { DataIsBeautifulRouter } from './../../controllers/public/dataIsBeautifulController'; @@ -1624,6 +1624,120 @@ const models: TsoaRoute.Models = { "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_Array__id-string--name-string___"},{"ref":"ResultError_string_"}],"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ResultSuccess__datasetId-string__": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"datasetId":{"dataType":"string","required":true}},"required":true}, + "error": {"dataType":"enum","enums":[null],"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Result__datasetId-string_.string_": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__datasetId-string__"},{"ref":"ResultError_string_"}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DatasetMetadata": { + "dataType": "refObject", + "properties": { + "promptVersionId": {"dataType":"string"}, + "inputRecordsIds": {"dataType":"array","array":{"dataType":"string"}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "NewDatasetParams": { + "dataType": "refObject", + "properties": { + "datasetName": {"dataType":"string","required":true}, + "requestIds": {"dataType":"array","array":{"dataType":"string"},"required":true}, + "datasetType": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["experiment"]},{"dataType":"enum","enums":["helicone"]}],"required":true}, + "meta": {"ref":"DatasetMetadata"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Partial_TimestampOperators_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"gte":{"dataType":"string"},"lte":{"dataType":"string"},"lt":{"dataType":"string"},"gt":{"dataType":"string"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Partial_RequestTableToOperators_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"prompt":{"ref":"Partial_TextOperators_"},"created_at":{"ref":"Partial_TimestampOperators_"},"user_id":{"ref":"Partial_TextOperators_"},"auth_hash":{"ref":"Partial_TextOperators_"},"org_id":{"ref":"Partial_TextOperators_"},"id":{"ref":"Partial_TextOperators_"},"node_id":{"ref":"Partial_TextOperators_"},"model":{"ref":"Partial_TextOperators_"},"modelOverride":{"ref":"Partial_TextOperators_"},"path":{"ref":"Partial_TextOperators_"},"prompt_id":{"ref":"Partial_TextOperators_"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Pick_FilterLeaf.request-or-prompts_versions_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"request":{"ref":"Partial_RequestTableToOperators_"},"prompts_versions":{"ref":"Partial_PromptVersionsToOperators_"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "FilterLeafSubset_request-or-prompts_versions_": { + "dataType": "refAlias", + "type": {"ref":"Pick_FilterLeaf.request-or-prompts_versions_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DatasetFilterNode": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"FilterLeafSubset_request-or-prompts_versions_"},{"ref":"DatasetFilterBranch"},{"dataType":"enum","enums":["all"]}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DatasetFilterBranch": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"right":{"ref":"DatasetFilterNode","required":true},"operator":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["or"]},{"dataType":"enum","enums":["and"]}],"required":true},"left":{"ref":"DatasetFilterNode","required":true}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RandomDatasetParams": { + "dataType": "refObject", + "properties": { + "datasetName": {"dataType":"string","required":true}, + "filter": {"ref":"DatasetFilterNode","required":true}, + "offset": {"dataType":"double"}, + "limit": {"dataType":"double"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DatasetResult": { + "dataType": "refObject", + "properties": { + "id": {"dataType":"string","required":true}, + "name": {"dataType":"string","required":true}, + "created_at": {"dataType":"string","required":true}, + "meta": {"ref":"DatasetMetadata"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ResultSuccess_DatasetResult-Array_": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"array","array":{"dataType":"refObject","ref":"DatasetResult"},"required":true}, + "error": {"dataType":"enum","enums":[null],"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Result_DatasetResult-Array.string_": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_DatasetResult-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ResultSuccess___-Array_": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{}},"required":true}, + "error": {"dataType":"enum","enums":[null],"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Result___-Array.string_": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess___-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "ResultSuccess__tableId-string--experimentId-string__": { "dataType": "refObject", "properties": { @@ -1916,120 +2030,6 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess__datasetId-string__": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"datasetId":{"dataType":"string","required":true}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result__datasetId-string_.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__datasetId-string__"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DatasetMetadata": { - "dataType": "refObject", - "properties": { - "promptVersionId": {"dataType":"string"}, - "inputRecordsIds": {"dataType":"array","array":{"dataType":"string"}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "NewDatasetParams": { - "dataType": "refObject", - "properties": { - "datasetName": {"dataType":"string","required":true}, - "requestIds": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "datasetType": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["experiment"]},{"dataType":"enum","enums":["helicone"]}],"required":true}, - "meta": {"ref":"DatasetMetadata"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Partial_TimestampOperators_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"gte":{"dataType":"string"},"lte":{"dataType":"string"},"lt":{"dataType":"string"},"gt":{"dataType":"string"}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Partial_RequestTableToOperators_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"prompt":{"ref":"Partial_TextOperators_"},"created_at":{"ref":"Partial_TimestampOperators_"},"user_id":{"ref":"Partial_TextOperators_"},"auth_hash":{"ref":"Partial_TextOperators_"},"org_id":{"ref":"Partial_TextOperators_"},"id":{"ref":"Partial_TextOperators_"},"node_id":{"ref":"Partial_TextOperators_"},"model":{"ref":"Partial_TextOperators_"},"modelOverride":{"ref":"Partial_TextOperators_"},"path":{"ref":"Partial_TextOperators_"},"prompt_id":{"ref":"Partial_TextOperators_"}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Pick_FilterLeaf.request-or-prompts_versions_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"request":{"ref":"Partial_RequestTableToOperators_"},"prompts_versions":{"ref":"Partial_PromptVersionsToOperators_"}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "FilterLeafSubset_request-or-prompts_versions_": { - "dataType": "refAlias", - "type": {"ref":"Pick_FilterLeaf.request-or-prompts_versions_","validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DatasetFilterNode": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"FilterLeafSubset_request-or-prompts_versions_"},{"ref":"DatasetFilterBranch"},{"dataType":"enum","enums":["all"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DatasetFilterBranch": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"right":{"ref":"DatasetFilterNode","required":true},"operator":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["or"]},{"dataType":"enum","enums":["and"]}],"required":true},"left":{"ref":"DatasetFilterNode","required":true}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "RandomDatasetParams": { - "dataType": "refObject", - "properties": { - "datasetName": {"dataType":"string","required":true}, - "filter": {"ref":"DatasetFilterNode","required":true}, - "offset": {"dataType":"double"}, - "limit": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DatasetResult": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "name": {"dataType":"string","required":true}, - "created_at": {"dataType":"string","required":true}, - "meta": {"ref":"DatasetMetadata"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess_DatasetResult-Array_": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"array","array":{"dataType":"refObject","ref":"DatasetResult"},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result_DatasetResult-Array.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_DatasetResult-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess___-Array_": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result___-Array.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess___-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "HeliconeDatasetMetadata": { "dataType": "refObject", "properties": { @@ -2614,6 +2614,20 @@ const models: TsoaRoute.Models = { "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__apiKey-string__"},{"ref":"ResultError_string_"}],"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"created_at_trunc":{"dataType":"string","required":true},"cost":{"dataType":"double","required":true}}},"required":true}, + "error": {"dataType":"enum","enums":[null],"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Result__cost-number--created_at_trunc-string_-Array.string_": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__cost-number--created_at_trunc-string_-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "LlmType": { "dataType": "refAlias", "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["chat"]},{"dataType":"enum","enums":["completion"]}],"validators":{}}, @@ -6004,14 +6018,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/new-empty', + app.post('/v1/experiment/dataset', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createNewEmptyExperiment)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.addDataset)), - async function ExperimentController_createNewEmptyExperiment(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_addDataset(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"datasetId":{"dataType":"string","required":true},"metadata":{"ref":"Record_string.string_","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"NewDatasetParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6021,10 +6035,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'createNewEmptyExperiment', + methodName: 'addDataset', controller, response, next, @@ -6036,14 +6050,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/new', + app.post('/v1/experiment/dataset/random', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentTable)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.addRandomDataset)), - async function ExperimentController_createNewExperimentTable(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_addRandomDataset(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateExperimentTableParams"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"RandomDatasetParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6053,10 +6067,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'createNewExperimentTable', + methodName: 'addRandomDataset', controller, response, next, @@ -6068,14 +6082,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/query', + app.post('/v1/experiment/dataset/query', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTableById)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.getDatasets)), - async function ExperimentController_getExperimentTableById(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_getDatasets(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"promptVersionId":{"dataType":"string"}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6085,10 +6099,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'getExperimentTableById', + methodName: 'getDatasets', controller, response, next, @@ -6100,15 +6114,16 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/metadata/query', + app.post('/v1/experiment/dataset/:datasetId/row/insert', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTableMetadata)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.insertDatasetRow)), - async function ExperimentController_getExperimentTableMetadata(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_insertDatasetRow(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"originalColumnId":{"dataType":"string"},"inputs":{"ref":"Record_string.string_","required":true},"inputRecordId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, + datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -6117,10 +6132,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'getExperimentTableMetadata', + methodName: 'insertDatasetRow', controller, response, next, @@ -6132,14 +6147,17 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/tables/query', + app.post('/v1/experiment/dataset/:datasetId/version/:promptVersionId/row/new', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTables)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.createDatasetRow)), - async function ExperimentController_getExperimentTables(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_createDatasetRow(request: ExRequest, response: ExResponse, next: any) { const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"sourceRequest":{"dataType":"string"},"inputs":{"ref":"Record_string.string_","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, + datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, + promptVersionId: {"in":"path","name":"promptVersionId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -6148,10 +6166,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'getExperimentTables', + methodName: 'createDatasetRow', controller, response, next, @@ -6163,16 +6181,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/cell', + app.post('/v1/experiment/dataset/:datasetId/inputs/query', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentCell)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.getDataset)), - async function ExperimentController_createExperimentCell(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_getDataset(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"value":{"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"enum","enums":[null]}],"required":true},"rowIndex":{"dataType":"double","required":true},"columnId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, + datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -6181,10 +6198,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'createExperimentCell', + methodName: 'getDataset', controller, response, next, @@ -6196,15 +6213,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/v1/experiment/table/:experimentTableId/cell', + app.post('/v1/experiment/dataset/:datasetId/mutate', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.updateExperimentCell)), + ...(fetchMiddlewares(ExperimentDatasetController)), + ...(fetchMiddlewares(ExperimentDatasetController.prototype.mutateDataset)), - async function ExperimentController_updateExperimentCell(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentDatasetController_mutateDataset(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"updateInputs":{"dataType":"boolean"},"metadata":{"dataType":"string"},"value":{"dataType":"string"},"status":{"dataType":"string"},"cellId":{"dataType":"string","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"removeRequests":{"dataType":"array","array":{"dataType":"string"},"required":true},"addRequests":{"dataType":"array","array":{"dataType":"string"},"required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6214,10 +6230,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentController(); + const controller = new ExperimentDatasetController(); await templateService.apiHandler({ - methodName: 'updateExperimentCell', + methodName: 'mutateDataset', controller, response, next, @@ -6229,15 +6245,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/column', + app.post('/v1/experiment/new-empty', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentColumn)), + ...(fetchMiddlewares(ExperimentController.prototype.createNewEmptyExperiment)), - async function ExperimentController_createExperimentColumn(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createNewEmptyExperiment(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"inputKeys":{"dataType":"array","array":{"dataType":"string"}},"promptVersionId":{"dataType":"string"},"hypothesisId":{"dataType":"string"},"columnType":{"dataType":"string","required":true},"columnName":{"dataType":"string","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"datasetId":{"dataType":"string","required":true},"metadata":{"ref":"Record_string.string_","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6250,7 +6265,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createExperimentColumn', + methodName: 'createNewEmptyExperiment', controller, response, next, @@ -6262,15 +6277,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/row/new', + app.post('/v1/experiment/table/new', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentTableRow)), + ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentTable)), - async function ExperimentController_createExperimentTableRow(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createNewExperimentTable(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"inputs":{"ref":"Record_string.string_"},"sourceRequest":{"dataType":"string"},"promptVersionId":{"dataType":"string","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateExperimentTableParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6283,7 +6297,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createExperimentTableRow', + methodName: 'createNewExperimentTable', controller, response, next, @@ -6295,15 +6309,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.delete('/v1/experiment/table/:experimentTableId/row/:rowIndex', + app.post('/v1/experiment/table/:experimentTableId/query', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.deleteExperimentTableRow)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTableById)), - async function ExperimentController_deleteExperimentTableRow(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentTableById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - rowIndex: {"in":"path","name":"rowIndex","required":true,"dataType":"double"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6316,7 +6329,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'deleteExperimentTableRow', + methodName: 'getExperimentTableById', controller, response, next, @@ -6328,15 +6341,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/table/:experimentTableId/row/insert/batch', + app.post('/v1/experiment/table/:experimentTableId/metadata/query', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentTableRowWithCellsBatch)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTableMetadata)), - async function ExperimentController_createExperimentTableRowWithCellsBatch(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentTableMetadata(request: ExRequest, response: ExResponse, next: any) { const args: Record = { experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"rows":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"sourceRequest":{"dataType":"string"},"cells":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"metadata":{"dataType":"any"},"value":{"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"enum","enums":[null]}],"required":true},"columnId":{"dataType":"string","required":true}}},"required":true},"datasetId":{"dataType":"string","required":true},"inputs":{"ref":"Record_string.string_","required":true},"inputRecordId":{"dataType":"string","required":true}}},"required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6349,7 +6361,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createExperimentTableRowWithCellsBatch', + methodName: 'getExperimentTableMetadata', controller, response, next, @@ -6361,14 +6373,13 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/update-meta', + app.post('/v1/experiment/tables/query', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.updateExperimentMeta)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentTables)), - async function ExperimentController_updateExperimentMeta(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentTables(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"meta":{"ref":"Record_string.string_","required":true},"experimentId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6381,7 +6392,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'updateExperimentMeta', + methodName: 'getExperimentTables', controller, response, next, @@ -6393,14 +6404,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment', + app.post('/v1/experiment/table/:experimentTableId/cell', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentOld)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentCell)), - async function ExperimentController_createNewExperimentOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentCell(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"NewExperimentParams"}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"value":{"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"enum","enums":[null]}],"required":true},"rowIndex":{"dataType":"double","required":true},"columnId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6413,7 +6425,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createNewExperimentOld', + methodName: 'createExperimentCell', controller, response, next, @@ -6425,14 +6437,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/hypothesis', + app.patch('/v1/experiment/table/:experimentTableId/cell', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentHypothesis)), + ...(fetchMiddlewares(ExperimentController.prototype.updateExperimentCell)), - async function ExperimentController_createNewExperimentHypothesis(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_updateExperimentCell(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"status":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["PENDING"]},{"dataType":"enum","enums":["RUNNING"]},{"dataType":"enum","enums":["COMPLETED"]},{"dataType":"enum","enums":["FAILED"]}],"required":true},"providerKeyId":{"dataType":"string","required":true},"promptVersion":{"dataType":"string","required":true},"model":{"dataType":"string","required":true},"experimentId":{"dataType":"string","required":true}}}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"updateInputs":{"dataType":"boolean"},"metadata":{"dataType":"string"},"value":{"dataType":"string"},"status":{"dataType":"string"},"cellId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6445,7 +6458,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createNewExperimentHypothesis', + methodName: 'updateExperimentCell', controller, response, next, @@ -6457,14 +6470,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/hypothesis/:hypothesisId/scores/query', + app.post('/v1/experiment/table/:experimentTableId/column', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentHypothesisScores)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentColumn)), - async function ExperimentController_getExperimentHypothesisScores(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentColumn(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - hypothesisId: {"in":"path","name":"hypothesisId","required":true,"dataType":"string"}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"inputKeys":{"dataType":"array","array":{"dataType":"string"}},"promptVersionId":{"dataType":"string"},"hypothesisId":{"dataType":"string"},"columnType":{"dataType":"string","required":true},"columnName":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6477,7 +6491,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getExperimentHypothesisScores', + methodName: 'createExperimentColumn', controller, response, next, @@ -6489,14 +6503,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/v1/experiment/:experimentId/evaluators', + app.post('/v1/experiment/table/:experimentTableId/row/new', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentEvaluators)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentTableRow)), - async function ExperimentController_getExperimentEvaluators(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentTableRow(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"inputs":{"ref":"Record_string.string_"},"sourceRequest":{"dataType":"string"},"promptVersionId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6509,7 +6524,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getExperimentEvaluators', + methodName: 'createExperimentTableRow', controller, response, next, @@ -6521,14 +6536,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/:experimentId/evaluators/run', + app.delete('/v1/experiment/table/:experimentTableId/row/:rowIndex', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.runExperimentEvaluatorsOld)), + ...(fetchMiddlewares(ExperimentController.prototype.deleteExperimentTableRow)), - async function ExperimentController_runExperimentEvaluatorsOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_deleteExperimentTableRow(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + rowIndex: {"in":"path","name":"rowIndex","required":true,"dataType":"double"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6541,7 +6557,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'runExperimentEvaluatorsOld', + methodName: 'deleteExperimentTableRow', controller, response, next, @@ -6553,15 +6569,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/:experimentId/evaluators', + app.post('/v1/experiment/table/:experimentTableId/row/insert/batch', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.createExperimentEvaluatorOld)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentTableRowWithCellsBatch)), - async function ExperimentController_createExperimentEvaluatorOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentTableRowWithCellsBatch(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"evaluatorId":{"dataType":"string","required":true}}}, + experimentTableId: {"in":"path","name":"experimentTableId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"rows":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"sourceRequest":{"dataType":"string"},"cells":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"metadata":{"dataType":"any"},"value":{"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"enum","enums":[null]}],"required":true},"columnId":{"dataType":"string","required":true}}},"required":true},"datasetId":{"dataType":"string","required":true},"inputs":{"ref":"Record_string.string_","required":true},"inputRecordId":{"dataType":"string","required":true}}},"required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6574,7 +6590,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createExperimentEvaluatorOld', + methodName: 'createExperimentTableRowWithCellsBatch', controller, response, next, @@ -6586,15 +6602,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.delete('/v1/experiment/:experimentId/evaluators/:evaluatorId', + app.post('/v1/experiment/update-meta', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.deleteExperimentEvaluatorOld)), + ...(fetchMiddlewares(ExperimentController.prototype.updateExperimentMeta)), - async function ExperimentController_deleteExperimentEvaluatorOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_updateExperimentMeta(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, - evaluatorId: {"in":"path","name":"evaluatorId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"meta":{"ref":"Record_string.string_","required":true},"experimentId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6607,7 +6622,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'deleteExperimentEvaluatorOld', + methodName: 'updateExperimentMeta', controller, response, next, @@ -6619,14 +6634,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/query', + app.post('/v1/experiment', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(ExperimentController)), - ...(fetchMiddlewares(ExperimentController.prototype.getExperimentsOld)), + ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentOld)), - async function ExperimentController_getExperimentsOld(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createNewExperimentOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"include":{"ref":"IncludeExperimentKeys"},"filter":{"ref":"ExperimentFilterNode","required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"NewExperimentParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6639,7 +6654,7 @@ export function RegisterRoutes(app: Router) { const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getExperimentsOld', + methodName: 'createNewExperimentOld', controller, response, next, @@ -6651,14 +6666,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset', + app.post('/v1/experiment/hypothesis', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.addDataset)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.createNewExperimentHypothesis)), - async function ExperimentDatasetController_addDataset(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createNewExperimentHypothesis(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"NewDatasetParams"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"status":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["PENDING"]},{"dataType":"enum","enums":["RUNNING"]},{"dataType":"enum","enums":["COMPLETED"]},{"dataType":"enum","enums":["FAILED"]}],"required":true},"providerKeyId":{"dataType":"string","required":true},"promptVersion":{"dataType":"string","required":true},"model":{"dataType":"string","required":true},"experimentId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6668,10 +6683,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'addDataset', + methodName: 'createNewExperimentHypothesis', controller, response, next, @@ -6683,14 +6698,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/random', + app.post('/v1/experiment/hypothesis/:hypothesisId/scores/query', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.addRandomDataset)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentHypothesisScores)), - async function ExperimentDatasetController_addRandomDataset(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentHypothesisScores(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"RandomDatasetParams"}, + hypothesisId: {"in":"path","name":"hypothesisId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6700,10 +6715,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'addRandomDataset', + methodName: 'getExperimentHypothesisScores', controller, response, next, @@ -6715,14 +6730,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/query', + app.get('/v1/experiment/:experimentId/evaluators', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.getDatasets)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentEvaluators)), - async function ExperimentDatasetController_getDatasets(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentEvaluators(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"promptVersionId":{"dataType":"string"}}}, + experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6732,10 +6747,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getDatasets', + methodName: 'getExperimentEvaluators', controller, response, next, @@ -6747,16 +6762,15 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/:datasetId/row/insert', + app.post('/v1/experiment/:experimentId/evaluators/run', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.insertDatasetRow)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.runExperimentEvaluatorsOld)), - async function ExperimentDatasetController_insertDatasetRow(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_runExperimentEvaluatorsOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"originalColumnId":{"dataType":"string"},"inputs":{"ref":"Record_string.string_","required":true},"inputRecordId":{"dataType":"string","required":true}}}, + experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, - datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -6765,10 +6779,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'insertDatasetRow', + methodName: 'runExperimentEvaluatorsOld', controller, response, next, @@ -6780,17 +6794,16 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/:datasetId/version/:promptVersionId/row/new', + app.post('/v1/experiment/:experimentId/evaluators', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.createDatasetRow)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.createExperimentEvaluatorOld)), - async function ExperimentDatasetController_createDatasetRow(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_createExperimentEvaluatorOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"sourceRequest":{"dataType":"string"},"inputs":{"ref":"Record_string.string_","required":true}}}, + experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"evaluatorId":{"dataType":"string","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, - datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, - promptVersionId: {"in":"path","name":"promptVersionId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -6799,10 +6812,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'createDatasetRow', + methodName: 'createExperimentEvaluatorOld', controller, response, next, @@ -6814,15 +6827,16 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/:datasetId/inputs/query', + app.delete('/v1/experiment/:experimentId/evaluators/:evaluatorId', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.getDataset)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.deleteExperimentEvaluatorOld)), - async function ExperimentDatasetController_getDataset(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_deleteExperimentEvaluatorOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { + experimentId: {"in":"path","name":"experimentId","required":true,"dataType":"string"}, + evaluatorId: {"in":"path","name":"evaluatorId","required":true,"dataType":"string"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, - datasetId: {"in":"path","name":"datasetId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -6831,10 +6845,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'getDataset', + methodName: 'deleteExperimentEvaluatorOld', controller, response, next, @@ -6846,14 +6860,14 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/v1/experiment/dataset/:datasetId/mutate', + app.post('/v1/experiment/query', authenticateMiddleware([{"api_key":[]}]), - ...(fetchMiddlewares(ExperimentDatasetController)), - ...(fetchMiddlewares(ExperimentDatasetController.prototype.mutateDataset)), + ...(fetchMiddlewares(ExperimentController)), + ...(fetchMiddlewares(ExperimentController.prototype.getExperimentsOld)), - async function ExperimentDatasetController_mutateDataset(request: ExRequest, response: ExResponse, next: any) { + async function ExperimentController_getExperimentsOld(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"removeRequests":{"dataType":"array","array":{"dataType":"string"},"required":true},"addRequests":{"dataType":"array","array":{"dataType":"string"},"required":true}}}, + requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"include":{"ref":"IncludeExperimentKeys"},"filter":{"ref":"ExperimentFilterNode","required":true}}}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -6863,10 +6877,10 @@ export function RegisterRoutes(app: Router) { try { validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new ExperimentDatasetController(); + const controller = new ExperimentController(); await templateService.apiHandler({ - methodName: 'mutateDataset', + methodName: 'getExperimentsOld', controller, response, next, @@ -8445,6 +8459,131 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/v1/pi/org-name/query', + authenticateMiddleware([{"api_key":[]}]), + ...(fetchMiddlewares(PiController)), + ...(fetchMiddlewares(PiController.prototype.getOrgName)), + + async function PiController_getOrgName(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PiController(); + + await templateService.apiHandler({ + methodName: 'getOrgName', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/v1/pi/total-costs', + authenticateMiddleware([{"api_key":[]}]), + ...(fetchMiddlewares(PiController)), + ...(fetchMiddlewares(PiController.prototype.getTotalCosts)), + + async function PiController_getTotalCosts(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PiController(); + + await templateService.apiHandler({ + methodName: 'getTotalCosts', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/v1/pi/total_requests', + authenticateMiddleware([{"api_key":[]}]), + ...(fetchMiddlewares(PiController)), + ...(fetchMiddlewares(PiController.prototype.getTotalRequests)), + + async function PiController_getTotalRequests(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PiController(); + + await templateService.apiHandler({ + methodName: 'getTotalRequests', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/v1/pi/costs-over-time/query', + authenticateMiddleware([{"api_key":[]}]), + ...(fetchMiddlewares(PiController)), + ...(fetchMiddlewares(PiController.prototype.getCostsOverTime)), + + async function PiController_getCostsOverTime(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DataOverTimeRequest"}, + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PiController(); + + await templateService.apiHandler({ + methodName: 'getCostsOverTime', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa app.get('/v1/settings/query', authenticateMiddleware([{"api_key":[]}]), ...(fetchMiddlewares(SettingController)), diff --git a/valhalla/jawn/src/tsoa-build/public/swagger.json b/valhalla/jawn/src/tsoa-build/public/swagger.json index bab2b06d5e..bde361282f 100644 --- a/valhalla/jawn/src/tsoa-build/public/swagger.json +++ b/valhalla/jawn/src/tsoa-build/public/swagger.json @@ -4567,20 +4567,16 @@ } ] }, - "ResultSuccess__tableId-string--experimentId-string__": { + "ResultSuccess__datasetId-string__": { "properties": { "data": { "properties": { - "experimentId": { - "type": "string" - }, - "tableId": { + "datasetId": { "type": "string" } }, "required": [ - "experimentId", - "tableId" + "datasetId" ], "type": "object" }, @@ -4599,109 +4595,197 @@ "type": "object", "additionalProperties": false }, - "Result__tableId-string--experimentId-string_.string_": { + "Result__datasetId-string_.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess__tableId-string--experimentId-string__" + "$ref": "#/components/schemas/ResultSuccess__datasetId-string__" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "CreateExperimentTableParams": { + "DatasetMetadata": { "properties": { - "datasetId": { - "type": "string" - }, - "experimentMetadata": { - "$ref": "#/components/schemas/Record_string.any_" - }, "promptVersionId": { "type": "string" }, - "newHeliconeTemplate": { + "inputRecordsIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "NewDatasetParams": { + "properties": { + "datasetName": { "type": "string" }, - "isMajorVersion": { - "type": "boolean" + "requestIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "promptSubversionMetadata": { - "$ref": "#/components/schemas/Record_string.any_" + "datasetType": { + "type": "string", + "enum": [ + "experiment", + "helicone" + ] }, - "experimentTableMetadata": { - "$ref": "#/components/schemas/Record_string.any_" + "meta": { + "$ref": "#/components/schemas/DatasetMetadata" } }, "required": [ - "datasetId", - "experimentMetadata", - "promptVersionId", - "newHeliconeTemplate", - "isMajorVersion", - "promptSubversionMetadata" + "datasetName", + "requestIds", + "datasetType" ], "type": "object", "additionalProperties": false }, - "ExperimentTableColumn": { + "Partial_TimestampOperators_": { "properties": { - "id": { + "gte": { "type": "string" }, - "columnName": { + "lte": { "type": "string" }, - "columnType": { + "lt": { "type": "string" }, - "hypothesisId": { + "gt": { "type": "string" + } + }, + "type": "object", + "description": "Make all properties in T optional" + }, + "Partial_RequestTableToOperators_": { + "properties": { + "prompt": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "cells": { - "items": { - "properties": { - "metadata": { - "$ref": "#/components/schemas/Record_string.any_" - }, - "value": { - "type": "string", - "nullable": true - }, - "requestId": { - "type": "string" - }, - "rowIndex": { - "type": "number", - "format": "double" - }, - "id": { - "type": "string" - } - }, - "required": [ - "value", - "rowIndex", - "id" - ], - "type": "object" - }, - "type": "array" + "created_at": { + "$ref": "#/components/schemas/Partial_TimestampOperators_" }, - "metadata": { - "$ref": "#/components/schemas/Record_string.any_" + "user_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "auth_hash": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "org_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "node_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "model": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "modelOverride": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "path": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "prompt_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + } + }, + "type": "object", + "description": "Make all properties in T optional" + }, + "Pick_FilterLeaf.request-or-prompts_versions_": { + "properties": { + "request": { + "$ref": "#/components/schemas/Partial_RequestTableToOperators_" + }, + "prompts_versions": { + "$ref": "#/components/schemas/Partial_PromptVersionsToOperators_" + } + }, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "FilterLeafSubset_request-or-prompts_versions_": { + "$ref": "#/components/schemas/Pick_FilterLeaf.request-or-prompts_versions_" + }, + "DatasetFilterNode": { + "anyOf": [ + { + "$ref": "#/components/schemas/FilterLeafSubset_request-or-prompts_versions_" + }, + { + "$ref": "#/components/schemas/DatasetFilterBranch" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + }, + "DatasetFilterBranch": { + "properties": { + "right": { + "$ref": "#/components/schemas/DatasetFilterNode" + }, + "operator": { + "type": "string", + "enum": [ + "or", + "and" + ] + }, + "left": { + "$ref": "#/components/schemas/DatasetFilterNode" } }, "required": [ - "id", - "columnName", - "columnType", - "cells" + "right", + "operator", + "left" + ], + "type": "object" + }, + "RandomDatasetParams": { + "properties": { + "datasetName": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/DatasetFilterNode" + }, + "offset": { + "type": "number", + "format": "double" + }, + "limit": { + "type": "number", + "format": "double" + } + }, + "required": [ + "datasetName", + "filter" ], "type": "object", "additionalProperties": false }, - "ExperimentTable": { + "DatasetResult": { "properties": { "id": { "type": "string" @@ -4709,32 +4793,28 @@ "name": { "type": "string" }, - "experimentId": { + "created_at": { "type": "string" }, - "columns": { - "items": { - "$ref": "#/components/schemas/ExperimentTableColumn" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/Record_string.any_" + "meta": { + "$ref": "#/components/schemas/DatasetMetadata" } }, "required": [ "id", "name", - "experimentId", - "columns" + "created_at" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_ExperimentTable_": { + "ResultSuccess_DatasetResult-Array_": { "properties": { "data": { - "$ref": "#/components/schemas/ExperimentTable" + "items": { + "$ref": "#/components/schemas/DatasetResult" + }, + "type": "array" }, "error": { "type": "number", @@ -4751,22 +4831,250 @@ "type": "object", "additionalProperties": false }, - "Result_ExperimentTable.string_": { + "Result_DatasetResult-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_ExperimentTable_" + "$ref": "#/components/schemas/ResultSuccess_DatasetResult-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "ExperimentTableSimplified": { + "ResultSuccess___-Array_": { "properties": { - "id": { - "type": "string" - }, - "name": { + "data": { + "items": { + "properties": {}, + "type": "object" + }, + "type": "array" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result___-Array.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess___-Array_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "ResultSuccess__tableId-string--experimentId-string__": { + "properties": { + "data": { + "properties": { + "experimentId": { + "type": "string" + }, + "tableId": { + "type": "string" + } + }, + "required": [ + "experimentId", + "tableId" + ], + "type": "object" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result__tableId-string--experimentId-string_.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess__tableId-string--experimentId-string__" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "CreateExperimentTableParams": { + "properties": { + "datasetId": { + "type": "string" + }, + "experimentMetadata": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "promptVersionId": { + "type": "string" + }, + "newHeliconeTemplate": { + "type": "string" + }, + "isMajorVersion": { + "type": "boolean" + }, + "promptSubversionMetadata": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "experimentTableMetadata": { + "$ref": "#/components/schemas/Record_string.any_" + } + }, + "required": [ + "datasetId", + "experimentMetadata", + "promptVersionId", + "newHeliconeTemplate", + "isMajorVersion", + "promptSubversionMetadata" + ], + "type": "object", + "additionalProperties": false + }, + "ExperimentTableColumn": { + "properties": { + "id": { + "type": "string" + }, + "columnName": { + "type": "string" + }, + "columnType": { + "type": "string" + }, + "hypothesisId": { + "type": "string" + }, + "cells": { + "items": { + "properties": { + "metadata": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "value": { + "type": "string", + "nullable": true + }, + "requestId": { + "type": "string" + }, + "rowIndex": { + "type": "number", + "format": "double" + }, + "id": { + "type": "string" + } + }, + "required": [ + "value", + "rowIndex", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/Record_string.any_" + } + }, + "required": [ + "id", + "columnName", + "columnType", + "cells" + ], + "type": "object", + "additionalProperties": false + }, + "ExperimentTable": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "experimentId": { + "type": "string" + }, + "columns": { + "items": { + "$ref": "#/components/schemas/ExperimentTableColumn" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/Record_string.any_" + } + }, + "required": [ + "id", + "name", + "experimentId", + "columns" + ], + "type": "object", + "additionalProperties": false + }, + "ResultSuccess_ExperimentTable_": { + "properties": { + "data": { + "$ref": "#/components/schemas/ExperimentTable" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result_ExperimentTable.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess_ExperimentTable_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "ExperimentTableSimplified": { + "properties": { + "id": { + "type": "string" + }, + "name": { "type": "string" }, "experimentId": { @@ -5335,404 +5643,33 @@ "allOf": [ { "$ref": "#/components/schemas/ExperimentScores" - } - ], - "nullable": true - }, - "tableId": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "organization", - "dataset", - "meta", - "createdAt", - "hypotheses", - "scores", - "tableId" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess_Experiment-Array_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/Experiment" - }, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result_Experiment-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_Experiment-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "Partial_ExperimentToOperators_": { - "properties": { - "id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "prompt_v2": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Pick_FilterLeaf.experiment_": { - "properties": { - "experiment": { - "$ref": "#/components/schemas/Partial_ExperimentToOperators_" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "FilterLeafSubset_experiment_": { - "$ref": "#/components/schemas/Pick_FilterLeaf.experiment_" - }, - "ExperimentFilterNode": { - "anyOf": [ - { - "$ref": "#/components/schemas/FilterLeafSubset_experiment_" - }, - { - "$ref": "#/components/schemas/ExperimentFilterBranch" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "ExperimentFilterBranch": { - "properties": { - "right": { - "$ref": "#/components/schemas/ExperimentFilterNode" - }, - "operator": { - "type": "string", - "enum": [ - "or", - "and" - ] - }, - "left": { - "$ref": "#/components/schemas/ExperimentFilterNode" - } - }, - "required": [ - "right", - "operator", - "left" - ], - "type": "object" - }, - "IncludeExperimentKeys": { - "properties": { - "inputs": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false - }, - "promptVersion": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false - }, - "responseBodies": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false - }, - "score": { - "type": "boolean", - "enum": [ - true - ], - "nullable": false - } - }, - "type": "object", - "additionalProperties": false - }, - "ResultSuccess__datasetId-string__": { - "properties": { - "data": { - "properties": { - "datasetId": { - "type": "string" - } - }, - "required": [ - "datasetId" - ], - "type": "object" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__datasetId-string_.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__datasetId-string__" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "DatasetMetadata": { - "properties": { - "promptVersionId": { - "type": "string" - }, - "inputRecordsIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "NewDatasetParams": { - "properties": { - "datasetName": { - "type": "string" - }, - "requestIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "datasetType": { - "type": "string", - "enum": [ - "experiment", - "helicone" - ] - }, - "meta": { - "$ref": "#/components/schemas/DatasetMetadata" - } - }, - "required": [ - "datasetName", - "requestIds", - "datasetType" - ], - "type": "object", - "additionalProperties": false - }, - "Partial_TimestampOperators_": { - "properties": { - "gte": { - "type": "string" - }, - "lte": { - "type": "string" - }, - "lt": { - "type": "string" - }, - "gt": { - "type": "string" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_RequestTableToOperators_": { - "properties": { - "prompt": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "created_at": { - "$ref": "#/components/schemas/Partial_TimestampOperators_" - }, - "user_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "auth_hash": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "org_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "node_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "model": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "modelOverride": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "path": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "prompt_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Pick_FilterLeaf.request-or-prompts_versions_": { - "properties": { - "request": { - "$ref": "#/components/schemas/Partial_RequestTableToOperators_" - }, - "prompts_versions": { - "$ref": "#/components/schemas/Partial_PromptVersionsToOperators_" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "FilterLeafSubset_request-or-prompts_versions_": { - "$ref": "#/components/schemas/Pick_FilterLeaf.request-or-prompts_versions_" - }, - "DatasetFilterNode": { - "anyOf": [ - { - "$ref": "#/components/schemas/FilterLeafSubset_request-or-prompts_versions_" - }, - { - "$ref": "#/components/schemas/DatasetFilterBranch" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "DatasetFilterBranch": { - "properties": { - "right": { - "$ref": "#/components/schemas/DatasetFilterNode" - }, - "operator": { - "type": "string", - "enum": [ - "or", - "and" - ] - }, - "left": { - "$ref": "#/components/schemas/DatasetFilterNode" - } - }, - "required": [ - "right", - "operator", - "left" - ], - "type": "object" - }, - "RandomDatasetParams": { - "properties": { - "datasetName": { - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/DatasetFilterNode" - }, - "offset": { - "type": "number", - "format": "double" - }, - "limit": { - "type": "number", - "format": "double" - } - }, - "required": [ - "datasetName", - "filter" - ], - "type": "object", - "additionalProperties": false - }, - "DatasetResult": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "created_at": { - "type": "string" + } + ], + "nullable": true }, - "meta": { - "$ref": "#/components/schemas/DatasetMetadata" + "tableId": { + "type": "string", + "nullable": true } }, "required": [ "id", - "name", - "created_at" + "organization", + "dataset", + "meta", + "createdAt", + "hypotheses", + "scores", + "tableId" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_DatasetResult-Array_": { + "ResultSuccess_Experiment-Array_": { "properties": { "data": { "items": { - "$ref": "#/components/schemas/DatasetResult" + "$ref": "#/components/schemas/Experiment" }, "type": "array" }, @@ -5751,50 +5688,113 @@ "type": "object", "additionalProperties": false }, - "Result_DatasetResult-Array.string_": { + "Result_Experiment-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_DatasetResult-Array_" + "$ref": "#/components/schemas/ResultSuccess_Experiment-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "ResultSuccess___-Array_": { + "Partial_ExperimentToOperators_": { "properties": { - "data": { - "items": { - "properties": {}, - "type": "object" - }, - "type": "array" + "id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true + "prompt_v2": { + "$ref": "#/components/schemas/Partial_TextOperators_" } }, - "required": [ - "data", - "error" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "Result___-Array.string_": { + "Pick_FilterLeaf.experiment_": { + "properties": { + "experiment": { + "$ref": "#/components/schemas/Partial_ExperimentToOperators_" + } + }, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "FilterLeafSubset_experiment_": { + "$ref": "#/components/schemas/Pick_FilterLeaf.experiment_" + }, + "ExperimentFilterNode": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess___-Array_" + "$ref": "#/components/schemas/FilterLeafSubset_experiment_" }, { - "$ref": "#/components/schemas/ResultError_string_" + "$ref": "#/components/schemas/ExperimentFilterBranch" + }, + { + "type": "string", + "enum": [ + "all" + ] } ] }, + "ExperimentFilterBranch": { + "properties": { + "right": { + "$ref": "#/components/schemas/ExperimentFilterNode" + }, + "operator": { + "type": "string", + "enum": [ + "or", + "and" + ] + }, + "left": { + "$ref": "#/components/schemas/ExperimentFilterNode" + } + }, + "required": [ + "right", + "operator", + "left" + ], + "type": "object" + }, + "IncludeExperimentKeys": { + "properties": { + "inputs": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false + }, + "promptVersion": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false + }, + "responseBodies": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false + }, + "score": { + "type": "boolean", + "enum": [ + true + ], + "nullable": false + } + }, + "type": "object", + "additionalProperties": false + }, "HeliconeDatasetMetadata": { "properties": { "promptVersionId": { @@ -7713,6 +7713,52 @@ } ] }, + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + "properties": { + "data": { + "items": { + "properties": { + "created_at_trunc": { + "type": "string" + }, + "cost": { + "type": "number", + "format": "double" + } + }, + "required": [ + "created_at_trunc", + "cost" + ], + "type": "object" + }, + "type": "array" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result__cost-number--created_at_trunc-string_-Array.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess__cost-number--created_at_trunc-string_-Array_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, "LlmType": { "type": "string", "enum": [ @@ -13390,206 +13436,139 @@ "api_key": [] } ], - "parameters": [] - } - }, - "/v1/experiment/new-empty": { - "post": { - "operationId": "CreateNewEmptyExperiment", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__experimentId-string_.string_" - } - } - } - } - }, - "tags": [ - "Experiment" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "datasetId": { - "type": "string" - }, - "metadata": { - "$ref": "#/components/schemas/Record_string.string_" - } - }, - "required": [ - "datasetId", - "metadata" - ], - "type": "object" - } - } - } - } - } - }, - "/v1/experiment/table/new": { - "post": { - "operationId": "CreateNewExperimentTable", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__tableId-string--experimentId-string_.string_" - } - } - } - } - }, - "tags": [ - "Experiment" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateExperimentTableParams" - } - } - } - } + "parameters": [] } }, - "/v1/experiment/table/{experimentTableId}/query": { + "/v1/experiment/dataset": { "post": { - "operationId": "GetExperimentTableById", + "operationId": "AddDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ExperimentTable.string_" + "$ref": "#/components/schemas/Result__datasetId-string_.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { "api_key": [] } ], - "parameters": [ - { - "in": "path", - "name": "experimentTableId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewDatasetParams" + } } } - ] + } } }, - "/v1/experiment/table/{experimentTableId}/metadata/query": { + "/v1/experiment/dataset/random": { "post": { - "operationId": "GetExperimentTableMetadata", + "operationId": "AddRandomDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ExperimentTableSimplified.string_" + "$ref": "#/components/schemas/Result__datasetId-string_.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { "api_key": [] } ], - "parameters": [ - { - "in": "path", - "name": "experimentTableId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RandomDatasetParams" + } } } - ] + } } }, - "/v1/experiment/tables/query": { + "/v1/experiment/dataset/query": { "post": { - "operationId": "GetExperimentTables", + "operationId": "GetDatasets", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ExperimentTableSimplified-Array.string_" + "$ref": "#/components/schemas/Result_DatasetResult-Array.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { "api_key": [] } ], - "parameters": [] + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "promptVersionId": { + "type": "string" + } + }, + "type": "object" + } + } + } + } } }, - "/v1/experiment/table/{experimentTableId}/cell": { + "/v1/experiment/dataset/{datasetId}/row/insert": { "post": { - "operationId": "CreateExperimentCell", + "operationId": "InsertDatasetRow", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_string.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -13599,7 +13578,7 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "datasetId", "required": true, "schema": { "type": "string" @@ -13612,45 +13591,44 @@ "application/json": { "schema": { "properties": { - "value": { - "type": "string", - "nullable": true + "originalColumnId": { + "type": "string" }, - "rowIndex": { - "type": "number", - "format": "double" + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" }, - "columnId": { + "inputRecordId": { "type": "string" } }, "required": [ - "value", - "rowIndex", - "columnId" + "inputs", + "inputRecordId" ], "type": "object" } } } } - }, - "patch": { - "operationId": "UpdateExperimentCell", + } + }, + "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { + "post": { + "operationId": "CreateDatasetRow", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_string.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -13660,7 +13638,15 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "datasetId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "promptVersionId", "required": true, "schema": { "type": "string" @@ -13673,24 +13659,15 @@ "application/json": { "schema": { "properties": { - "updateInputs": { - "type": "boolean" - }, - "metadata": { - "type": "string" - }, - "value": { - "type": "string" - }, - "status": { + "sourceRequest": { "type": "string" }, - "cellId": { - "type": "string" + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" } }, "required": [ - "cellId" + "inputs" ], "type": "object" } @@ -13699,23 +13676,23 @@ } } }, - "/v1/experiment/table/{experimentTableId}/column": { + "/v1/experiment/dataset/{datasetId}/inputs/query": { "post": { - "operationId": "CreateExperimentColumn", + "operationId": "GetDataset", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_PromptInputRecord-Array.string_" } } } } }, "tags": [ - "Experiment" + "Dataset" ], "security": [ { @@ -13725,41 +13702,61 @@ "parameters": [ { "in": "path", - "name": "experimentTableId", + "name": "datasetId", "required": true, "schema": { "type": "string" } } + ] + } + }, + "/v1/experiment/dataset/{datasetId}/mutate": { + "post": { + "operationId": "MutateDataset", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result___-Array.string_" + } + } + } + } + }, + "tags": [ + "Dataset" + ], + "security": [ + { + "api_key": [] + } ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { - "inputKeys": { + "removeRequests": { "items": { "type": "string" }, "type": "array" }, - "promptVersionId": { - "type": "string" - }, - "hypothesisId": { - "type": "string" - }, - "columnType": { - "type": "string" - }, - "columnName": { - "type": "string" + "addRequests": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "columnType", - "columnName" + "removeRequests", + "addRequests" ], "type": "object" } @@ -13768,16 +13765,16 @@ } } }, - "/v1/experiment/table/{experimentTableId}/row/new": { + "/v1/experiment/new-empty": { "post": { - "operationId": "CreateExperimentTableRow", + "operationId": "CreateNewEmptyExperiment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result__experimentId-string_.string_" } } } @@ -13791,34 +13788,23 @@ "api_key": [] } ], - "parameters": [ - { - "in": "path", - "name": "experimentTableId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "sourceRequest": { + "datasetId": { "type": "string" }, - "promptVersionId": { - "type": "string" + "metadata": { + "$ref": "#/components/schemas/Record_string.string_" } }, "required": [ - "promptVersionId" + "datasetId", + "metadata" ], "type": "object" } @@ -13827,16 +13813,52 @@ } } }, - "/v1/experiment/table/{experimentTableId}/row/{rowIndex}": { - "delete": { - "operationId": "DeleteExperimentTableRow", + "/v1/experiment/table/new": { + "post": { + "operationId": "CreateNewExperimentTable", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result__tableId-string--experimentId-string_.string_" + } + } + } + } + }, + "tags": [ + "Experiment" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExperimentTableParams" + } + } + } + } + } + }, + "/v1/experiment/table/{experimentTableId}/query": { + "post": { + "operationId": "GetExperimentTableById", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_ExperimentTable.string_" } } } @@ -13858,29 +13880,20 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "rowIndex", - "required": true, - "schema": { - "format": "double", - "type": "number" - } } ] } }, - "/v1/experiment/table/{experimentTableId}/row/insert/batch": { + "/v1/experiment/table/{experimentTableId}/metadata/query": { "post": { - "operationId": "CreateExperimentTableRowWithCellsBatch", + "operationId": "GetExperimentTableMetadata", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_null.string_" + "$ref": "#/components/schemas/Result_ExperimentTableSimplified.string_" } } } @@ -13903,87 +13916,19 @@ "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "rows": { - "items": { - "properties": { - "sourceRequest": { - "type": "string" - }, - "cells": { - "items": { - "properties": { - "metadata": {}, - "value": { - "type": "string", - "nullable": true - }, - "columnId": { - "type": "string" - } - }, - "required": [ - "value", - "columnId" - ], - "type": "object" - }, - "type": "array" - }, - "datasetId": { - "type": "string" - }, - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "inputRecordId": { - "type": "string" - } - }, - "required": [ - "cells", - "datasetId", - "inputs", - "inputRecordId" - ], - "type": "object" - }, - "type": "array" - } - }, - "required": [ - "rows" - ], - "type": "object" - } - } - } - } + ] } }, - "/v1/experiment/update-meta": { + "/v1/experiment/tables/query": { "post": { - "operationId": "UpdateExperimentMeta", + "operationId": "GetExperimentTables", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_unknown_" - }, - { - "$ref": "#/components/schemas/ResultError_PostgrestError_" - } - ] + "$ref": "#/components/schemas/Result_ExperimentTableSimplified-Array.string_" } } } @@ -13997,41 +13942,19 @@ "api_key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "meta": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "experimentId": { - "type": "string" - } - }, - "required": [ - "meta", - "experimentId" - ], - "type": "object" - } - } - } - } + "parameters": [] } }, - "/v1/experiment": { + "/v1/experiment/table/{experimentTableId}/cell": { "post": { - "operationId": "CreateNewExperimentOld", + "operationId": "CreateExperimentCell", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__experimentId-string_.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } @@ -14045,29 +13968,54 @@ "api_key": [] } ], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "experimentTableId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewExperimentParams" + "properties": { + "value": { + "type": "string", + "nullable": true + }, + "rowIndex": { + "type": "number", + "format": "double" + }, + "columnId": { + "type": "string" + } + }, + "required": [ + "value", + "rowIndex", + "columnId" + ], + "type": "object" } } } } - } - }, - "/v1/experiment/hypothesis": { - "post": { - "operationId": "CreateNewExperimentHypothesis", + }, + "patch": { + "operationId": "UpdateExperimentCell", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__hypothesisId-string_.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } @@ -14081,41 +14029,40 @@ "api_key": [] } ], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "experimentTableId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { - "status": { - "type": "string", - "enum": [ - "PENDING", - "RUNNING", - "COMPLETED", - "FAILED" - ] + "updateInputs": { + "type": "boolean" }, - "providerKeyId": { + "metadata": { "type": "string" }, - "promptVersion": { + "value": { "type": "string" }, - "model": { + "status": { "type": "string" }, - "experimentId": { + "cellId": { "type": "string" } }, "required": [ - "status", - "providerKeyId", - "promptVersion", - "model", - "experimentId" + "cellId" ], "type": "object" } @@ -14124,16 +14071,16 @@ } } }, - "/v1/experiment/hypothesis/{hypothesisId}/scores/query": { + "/v1/experiment/table/{experimentTableId}/column": { "post": { - "operationId": "GetExperimentHypothesisScores", + "operationId": "CreateExperimentColumn", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__runsCount-number--scores-Record_string.Score__.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } @@ -14150,51 +14097,52 @@ "parameters": [ { "in": "path", - "name": "hypothesisId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "inputKeys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "promptVersionId": { + "type": "string" + }, + "hypothesisId": { + "type": "string" + }, + "columnType": { + "type": "string" + }, + "columnName": { + "type": "string" + } + }, + "required": [ + "columnType", + "columnName" + ], + "type": "object" + } + } + } + } } }, - "/v1/experiment/{experimentId}/evaluators": { - "get": { - "operationId": "GetExperimentEvaluators", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_EvaluatorResult-Array.string_" - } - } - } - } - }, - "tags": [ - "Experiment" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "experimentId", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, + "/v1/experiment/table/{experimentTableId}/row/new": { "post": { - "operationId": "CreateExperimentEvaluatorOld", + "operationId": "CreateExperimentTableRow", "responses": { "200": { "description": "Ok", @@ -14218,7 +14166,7 @@ "parameters": [ { "in": "path", - "name": "experimentId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" @@ -14231,12 +14179,18 @@ "application/json": { "schema": { "properties": { - "evaluatorId": { + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "sourceRequest": { + "type": "string" + }, + "promptVersionId": { "type": "string" } }, "required": [ - "evaluatorId" + "promptVersionId" ], "type": "object" } @@ -14245,9 +14199,9 @@ } } }, - "/v1/experiment/{experimentId}/evaluators/run": { - "post": { - "operationId": "RunExperimentEvaluatorsOld", + "/v1/experiment/table/{experimentTableId}/row/{rowIndex}": { + "delete": { + "operationId": "DeleteExperimentTableRow", "responses": { "200": { "description": "Ok", @@ -14271,18 +14225,27 @@ "parameters": [ { "in": "path", - "name": "experimentId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" } + }, + { + "in": "path", + "name": "rowIndex", + "required": true, + "schema": { + "format": "double", + "type": "number" + } } ] } }, - "/v1/experiment/{experimentId}/evaluators/{evaluatorId}": { - "delete": { - "operationId": "DeleteExperimentEvaluatorOld", + "/v1/experiment/table/{experimentTableId}/row/insert/batch": { + "post": { + "operationId": "CreateExperimentTableRowWithCellsBatch", "responses": { "200": { "description": "Ok", @@ -14306,33 +14269,93 @@ "parameters": [ { "in": "path", - "name": "experimentId", + "name": "experimentTableId", "required": true, "schema": { "type": "string" } - }, - { - "in": "path", - "name": "evaluatorId", - "required": true, - "schema": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "rows": { + "items": { + "properties": { + "sourceRequest": { + "type": "string" + }, + "cells": { + "items": { + "properties": { + "metadata": {}, + "value": { + "type": "string", + "nullable": true + }, + "columnId": { + "type": "string" + } + }, + "required": [ + "value", + "columnId" + ], + "type": "object" + }, + "type": "array" + }, + "datasetId": { + "type": "string" + }, + "inputs": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "inputRecordId": { + "type": "string" + } + }, + "required": [ + "cells", + "datasetId", + "inputs", + "inputRecordId" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "rows" + ], + "type": "object" + } } } - ] + } } }, - "/v1/experiment/query": { + "/v1/experiment/update-meta": { "post": { - "operationId": "GetExperimentsOld", + "operationId": "UpdateExperimentMeta", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_Experiment-Array.string_" + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess_unknown_" + }, + { + "$ref": "#/components/schemas/ResultError_PostgrestError_" + } + ] } } } @@ -14353,15 +14376,16 @@ "application/json": { "schema": { "properties": { - "include": { - "$ref": "#/components/schemas/IncludeExperimentKeys" + "meta": { + "$ref": "#/components/schemas/Record_string.string_" }, - "filter": { - "$ref": "#/components/schemas/ExperimentFilterNode" + "experimentId": { + "type": "string" } }, "required": [ - "filter" + "meta", + "experimentId" ], "type": "object" } @@ -14370,23 +14394,23 @@ } } }, - "/v1/experiment/dataset": { + "/v1/experiment": { "post": { - "operationId": "AddDataset", + "operationId": "CreateNewExperimentOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__datasetId-string_.string_" + "$ref": "#/components/schemas/Result__experimentId-string_.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14399,30 +14423,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewDatasetParams" + "$ref": "#/components/schemas/NewExperimentParams" } } } } } }, - "/v1/experiment/dataset/random": { + "/v1/experiment/hypothesis": { "post": { - "operationId": "AddRandomDataset", + "operationId": "CreateNewExperimentHypothesis", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__datasetId-string_.string_" + "$ref": "#/components/schemas/Result__hypothesisId-string_.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14435,71 +14459,128 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RandomDatasetParams" + "properties": { + "status": { + "type": "string", + "enum": [ + "PENDING", + "RUNNING", + "COMPLETED", + "FAILED" + ] + }, + "providerKeyId": { + "type": "string" + }, + "promptVersion": { + "type": "string" + }, + "model": { + "type": "string" + }, + "experimentId": { + "type": "string" + } + }, + "required": [ + "status", + "providerKeyId", + "promptVersion", + "model", + "experimentId" + ], + "type": "object" } } } } } }, - "/v1/experiment/dataset/query": { + "/v1/experiment/hypothesis/{hypothesisId}/scores/query": { "post": { - "operationId": "GetDatasets", + "operationId": "GetExperimentHypothesisScores", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result__runsCount-number--scores-Record_string.Score__.string_" + } + } + } + } + }, + "tags": [ + "Experiment" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "hypothesisId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/v1/experiment/{experimentId}/evaluators": { + "get": { + "operationId": "GetExperimentEvaluators", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_DatasetResult-Array.string_" + "$ref": "#/components/schemas/Result_EvaluatorResult-Array.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { "api_key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "promptVersionId": { - "type": "string" - } - }, - "type": "object" - } + "parameters": [ + { + "in": "path", + "name": "experimentId", + "required": true, + "schema": { + "type": "string" } } - } - } - }, - "/v1/experiment/dataset/{datasetId}/row/insert": { + ] + }, "post": { - "operationId": "InsertDatasetRow", + "operationId": "CreateExperimentEvaluatorOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_string.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14509,7 +14590,7 @@ "parameters": [ { "in": "path", - "name": "datasetId", + "name": "experimentId", "required": true, "schema": { "type": "string" @@ -14522,19 +14603,12 @@ "application/json": { "schema": { "properties": { - "originalColumnId": { - "type": "string" - }, - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - }, - "inputRecordId": { + "evaluatorId": { "type": "string" } }, "required": [ - "inputs", - "inputRecordId" + "evaluatorId" ], "type": "object" } @@ -14543,23 +14617,23 @@ } } }, - "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { + "/v1/experiment/{experimentId}/evaluators/run": { "post": { - "operationId": "CreateDatasetRow", + "operationId": "RunExperimentEvaluatorsOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_string.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14569,61 +14643,32 @@ "parameters": [ { "in": "path", - "name": "datasetId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "promptVersionId", + "name": "experimentId", "required": true, "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "sourceRequest": { - "type": "string" - }, - "inputs": { - "$ref": "#/components/schemas/Record_string.string_" - } - }, - "required": [ - "inputs" - ], - "type": "object" - } - } - } - } + ] } }, - "/v1/experiment/dataset/{datasetId}/inputs/query": { - "post": { - "operationId": "GetDataset", + "/v1/experiment/{experimentId}/evaluators/{evaluatorId}": { + "delete": { + "operationId": "DeleteExperimentEvaluatorOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_PromptInputRecord-Array.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14633,7 +14678,15 @@ "parameters": [ { "in": "path", - "name": "datasetId", + "name": "experimentId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "evaluatorId", "required": true, "schema": { "type": "string" @@ -14642,23 +14695,23 @@ ] } }, - "/v1/experiment/dataset/{datasetId}/mutate": { + "/v1/experiment/query": { "post": { - "operationId": "MutateDataset", + "operationId": "GetExperimentsOld", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result___-Array.string_" + "$ref": "#/components/schemas/Result_Experiment-Array.string_" } } } } }, "tags": [ - "Dataset" + "Experiment" ], "security": [ { @@ -14672,22 +14725,15 @@ "application/json": { "schema": { "properties": { - "removeRequests": { - "items": { - "type": "string" - }, - "type": "array" + "include": { + "$ref": "#/components/schemas/IncludeExperimentKeys" }, - "addRequests": { - "items": { - "type": "string" - }, - "type": "array" + "filter": { + "$ref": "#/components/schemas/ExperimentFilterNode" } }, "required": [ - "removeRequests", - "addRequests" + "filter" ], "type": "object" } @@ -16753,6 +16799,133 @@ } } }, + "/v1/pi/org-name/query": { + "post": { + "operationId": "GetOrgName", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_string.string_" + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] + } + }, + "/v1/pi/total-costs": { + "post": { + "operationId": "GetTotalCosts", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_number.string_" + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] + } + }, + "/v1/pi/total_requests": { + "post": { + "operationId": "GetTotalRequests", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_number.string_" + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [] + } + }, + "/v1/pi/costs-over-time/query": { + "post": { + "operationId": "GetCostsOverTime", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result__cost-number--created_at_trunc-string_-Array.string_" + }, + "examples": { + "Example 1": { + "value": { + "userFilter": "all", + "timeFilter": { + "start": "2024-01-01", + "end": "2024-01-31" + }, + "dbIncrement": "day", + "timeZoneDifference": 0 + } + } + } + } + } + } + }, + "tags": [ + "PI" + ], + "security": [ + { + "api_key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataOverTimeRequest" + } + } + } + } + } + }, "/v1/settings/query": { "get": { "operationId": "GetSettings", diff --git a/web/lib/clients/jawnTypes/private.ts b/web/lib/clients/jawnTypes/private.ts index 9edb00ad0b..1ae4e696aa 100644 --- a/web/lib/clients/jawnTypes/private.ts +++ b/web/lib/clients/jawnTypes/private.ts @@ -301,27 +301,6 @@ export interface paths { "/v1/integration/slack/channels": { get: operations["GetSlackChannels"]; }; - "/v1/experiment/dataset": { - post: operations["AddDataset"]; - }; - "/v1/experiment/dataset/random": { - post: operations["AddRandomDataset"]; - }; - "/v1/experiment/dataset/query": { - post: operations["GetDatasets"]; - }; - "/v1/experiment/dataset/{datasetId}/row/insert": { - post: operations["InsertDatasetRow"]; - }; - "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { - post: operations["CreateDatasetRow"]; - }; - "/v1/experiment/dataset/{datasetId}/inputs/query": { - post: operations["GetDataset"]; - }; - "/v1/experiment/dataset/{datasetId}/mutate": { - post: operations["MutateDataset"]; - }; "/v1/experiment/new-empty": { post: operations["CreateNewEmptyExperiment"]; }; @@ -378,6 +357,27 @@ export interface paths { "/v1/experiment/query": { post: operations["GetExperimentsOld"]; }; + "/v1/experiment/dataset": { + post: operations["AddDataset"]; + }; + "/v1/experiment/dataset/random": { + post: operations["AddRandomDataset"]; + }; + "/v1/experiment/dataset/query": { + post: operations["GetDatasets"]; + }; + "/v1/experiment/dataset/{datasetId}/row/insert": { + post: operations["InsertDatasetRow"]; + }; + "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { + post: operations["CreateDatasetRow"]; + }; + "/v1/experiment/dataset/{datasetId}/inputs/query": { + post: operations["GetDataset"]; + }; + "/v1/experiment/dataset/{datasetId}/mutate": { + post: operations["MutateDataset"]; + }; "/v1/helicone-dataset": { post: operations["AddHeliconeDataset"]; }; @@ -523,6 +523,18 @@ export interface paths { "/v1/pi/session": { post: operations["AddSession"]; }; + "/v1/pi/org-name/query": { + post: operations["GetOrgName"]; + }; + "/v1/pi/total-costs": { + post: operations["GetTotalCosts"]; + }; + "/v1/pi/total_requests": { + post: operations["GetTotalRequests"]; + }; + "/v1/pi/costs-over-time/query": { + post: operations["GetCostsOverTime"]; + }; "/v1/settings/query": { get: operations["GetSettings"]; }; @@ -2372,64 +2384,6 @@ Json: JsonObject; error: null; }; "Result_Array__id-string--name-string__.string_": components["schemas"]["ResultSuccess_Array__id-string--name-string___"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__datasetId-string__": { - data: { - datasetId: string; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__datasetId-string_.string_": components["schemas"]["ResultSuccess__datasetId-string__"] | components["schemas"]["ResultError_string_"]; - DatasetMetadata: { - promptVersionId?: string; - inputRecordsIds?: string[]; - }; - NewDatasetParams: { - datasetName: string; - requestIds: string[]; - /** @enum {string} */ - datasetType: "experiment" | "helicone"; - meta?: components["schemas"]["DatasetMetadata"]; - }; - /** @description From T, pick a set of properties whose keys are in the union K */ - "Pick_FilterLeaf.request-or-prompts_versions_": { - request?: components["schemas"]["Partial_RequestTableToOperators_"]; - prompts_versions?: components["schemas"]["Partial_PromptVersionsToOperators_"]; - }; - "FilterLeafSubset_request-or-prompts_versions_": components["schemas"]["Pick_FilterLeaf.request-or-prompts_versions_"]; - DatasetFilterNode: components["schemas"]["FilterLeafSubset_request-or-prompts_versions_"] | components["schemas"]["DatasetFilterBranch"] | "all"; - DatasetFilterBranch: { - right: components["schemas"]["DatasetFilterNode"]; - /** @enum {string} */ - operator: "or" | "and"; - left: components["schemas"]["DatasetFilterNode"]; - }; - RandomDatasetParams: { - datasetName: string; - filter: components["schemas"]["DatasetFilterNode"]; - /** Format: double */ - offset?: number; - /** Format: double */ - limit?: number; - }; - DatasetResult: { - id: string; - name: string; - created_at: string; - meta?: components["schemas"]["DatasetMetadata"]; - }; - "ResultSuccess_DatasetResult-Array_": { - data: components["schemas"]["DatasetResult"][]; - /** @enum {number|null} */ - error: null; - }; - "Result_DatasetResult-Array.string_": components["schemas"]["ResultSuccess_DatasetResult-Array_"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess___-Array_": { - data: Record[]; - /** @enum {number|null} */ - error: null; - }; - "Result___-Array.string_": components["schemas"]["ResultSuccess___-Array_"] | components["schemas"]["ResultError_string_"]; "ResultSuccess__tableId-string--experimentId-string__": { data: { experimentId: string; @@ -2659,6 +2613,64 @@ Json: JsonObject; /** @enum {boolean} */ score?: true; }; + "ResultSuccess__datasetId-string__": { + data: { + datasetId: string; + }; + /** @enum {number|null} */ + error: null; + }; + "Result__datasetId-string_.string_": components["schemas"]["ResultSuccess__datasetId-string__"] | components["schemas"]["ResultError_string_"]; + DatasetMetadata: { + promptVersionId?: string; + inputRecordsIds?: string[]; + }; + NewDatasetParams: { + datasetName: string; + requestIds: string[]; + /** @enum {string} */ + datasetType: "experiment" | "helicone"; + meta?: components["schemas"]["DatasetMetadata"]; + }; + /** @description From T, pick a set of properties whose keys are in the union K */ + "Pick_FilterLeaf.request-or-prompts_versions_": { + request?: components["schemas"]["Partial_RequestTableToOperators_"]; + prompts_versions?: components["schemas"]["Partial_PromptVersionsToOperators_"]; + }; + "FilterLeafSubset_request-or-prompts_versions_": components["schemas"]["Pick_FilterLeaf.request-or-prompts_versions_"]; + DatasetFilterNode: components["schemas"]["FilterLeafSubset_request-or-prompts_versions_"] | components["schemas"]["DatasetFilterBranch"] | "all"; + DatasetFilterBranch: { + right: components["schemas"]["DatasetFilterNode"]; + /** @enum {string} */ + operator: "or" | "and"; + left: components["schemas"]["DatasetFilterNode"]; + }; + RandomDatasetParams: { + datasetName: string; + filter: components["schemas"]["DatasetFilterNode"]; + /** Format: double */ + offset?: number; + /** Format: double */ + limit?: number; + }; + DatasetResult: { + id: string; + name: string; + created_at: string; + meta?: components["schemas"]["DatasetMetadata"]; + }; + "ResultSuccess_DatasetResult-Array_": { + data: components["schemas"]["DatasetResult"][]; + /** @enum {number|null} */ + error: null; + }; + "Result_DatasetResult-Array.string_": components["schemas"]["ResultSuccess_DatasetResult-Array_"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess___-Array_": { + data: Record[]; + /** @enum {number|null} */ + error: null; + }; + "Result___-Array.string_": components["schemas"]["ResultSuccess___-Array_"] | components["schemas"]["ResultError_string_"]; HeliconeDatasetMetadata: { promptVersionId?: string; inputRecordsIds?: string[]; @@ -3138,6 +3150,16 @@ Json: JsonObject; error: null; }; "Result__apiKey-string_.string_": components["schemas"]["ResultSuccess__apiKey-string__"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + data: { + created_at_trunc: string; + /** Format: double */ + cost: number; + }[]; + /** @enum {number|null} */ + error: null; + }; + "Result__cost-number--created_at_trunc-string_-Array.string_": components["schemas"]["ResultSuccess__cost-number--created_at_trunc-string_-Array_"] | components["schemas"]["ResultError_string_"]; }; responses: { }; @@ -5023,134 +5045,6 @@ export interface operations { }; }; }; - AddDataset: { - requestBody: { - content: { - "application/json": components["schemas"]["NewDatasetParams"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__datasetId-string_.string_"]; - }; - }; - }; - }; - AddRandomDataset: { - requestBody: { - content: { - "application/json": components["schemas"]["RandomDatasetParams"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__datasetId-string_.string_"]; - }; - }; - }; - }; - GetDatasets: { - requestBody: { - content: { - "application/json": { - promptVersionId?: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_DatasetResult-Array.string_"]; - }; - }; - }; - }; - InsertDatasetRow: { - parameters: { - path: { - datasetId: string; - }; - }; - requestBody: { - content: { - "application/json": { - originalColumnId?: string; - inputs: components["schemas"]["Record_string.string_"]; - inputRecordId: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_string.string_"]; - }; - }; - }; - }; - CreateDatasetRow: { - parameters: { - path: { - datasetId: string; - promptVersionId: string; - }; - }; - requestBody: { - content: { - "application/json": { - sourceRequest?: string; - inputs: components["schemas"]["Record_string.string_"]; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_string.string_"]; - }; - }; - }; - }; - GetDataset: { - parameters: { - path: { - datasetId: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_PromptInputRecord-Array.string_"]; - }; - }; - }; - }; - MutateDataset: { - requestBody: { - content: { - "application/json": { - removeRequests: string[]; - addRequests: string[]; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result___-Array.string_"]; - }; - }; - }; - }; CreateNewEmptyExperiment: { requestBody: { content: { @@ -5514,6 +5408,134 @@ export interface operations { }; }; }; + AddDataset: { + requestBody: { + content: { + "application/json": components["schemas"]["NewDatasetParams"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__datasetId-string_.string_"]; + }; + }; + }; + }; + AddRandomDataset: { + requestBody: { + content: { + "application/json": components["schemas"]["RandomDatasetParams"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__datasetId-string_.string_"]; + }; + }; + }; + }; + GetDatasets: { + requestBody: { + content: { + "application/json": { + promptVersionId?: string; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_DatasetResult-Array.string_"]; + }; + }; + }; + }; + InsertDatasetRow: { + parameters: { + path: { + datasetId: string; + }; + }; + requestBody: { + content: { + "application/json": { + originalColumnId?: string; + inputs: components["schemas"]["Record_string.string_"]; + inputRecordId: string; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + CreateDatasetRow: { + parameters: { + path: { + datasetId: string; + promptVersionId: string; + }; + }; + requestBody: { + content: { + "application/json": { + sourceRequest?: string; + inputs: components["schemas"]["Record_string.string_"]; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + GetDataset: { + parameters: { + path: { + datasetId: string; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_PromptInputRecord-Array.string_"]; + }; + }; + }; + }; + MutateDataset: { + requestBody: { + content: { + "application/json": { + removeRequests: string[]; + addRequests: string[]; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result___-Array.string_"]; + }; + }; + }; + }; AddHeliconeDataset: { requestBody: { content: { @@ -5661,11 +5683,6 @@ export interface operations { }; }; GetTotalRequests: { - requestBody: { - content: { - "application/json": components["schemas"]["DataIsBeautifulRequestBody"]; - }; - }; responses: { /** @description Ok */ 200: { @@ -6304,6 +6321,41 @@ export interface operations { }; }; }; + GetOrgName: { + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + GetTotalCosts: { + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_number.string_"]; + }; + }; + }; + }; + GetCostsOverTime: { + requestBody: { + content: { + "application/json": components["schemas"]["DataOverTimeRequest"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__cost-number--created_at_trunc-string_-Array.string_"]; + }; + }; + }; + }; GetSettings: { responses: { /** @description Ok */ diff --git a/web/lib/clients/jawnTypes/public.ts b/web/lib/clients/jawnTypes/public.ts index 5b20d59eef..0f7b89456e 100644 --- a/web/lib/clients/jawnTypes/public.ts +++ b/web/lib/clients/jawnTypes/public.ts @@ -256,6 +256,27 @@ export interface paths { "/v1/integration/slack/channels": { get: operations["GetSlackChannels"]; }; + "/v1/experiment/dataset": { + post: operations["AddDataset"]; + }; + "/v1/experiment/dataset/random": { + post: operations["AddRandomDataset"]; + }; + "/v1/experiment/dataset/query": { + post: operations["GetDatasets"]; + }; + "/v1/experiment/dataset/{datasetId}/row/insert": { + post: operations["InsertDatasetRow"]; + }; + "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { + post: operations["CreateDatasetRow"]; + }; + "/v1/experiment/dataset/{datasetId}/inputs/query": { + post: operations["GetDataset"]; + }; + "/v1/experiment/dataset/{datasetId}/mutate": { + post: operations["MutateDataset"]; + }; "/v1/experiment/new-empty": { post: operations["CreateNewEmptyExperiment"]; }; @@ -312,27 +333,6 @@ export interface paths { "/v1/experiment/query": { post: operations["GetExperimentsOld"]; }; - "/v1/experiment/dataset": { - post: operations["AddDataset"]; - }; - "/v1/experiment/dataset/random": { - post: operations["AddRandomDataset"]; - }; - "/v1/experiment/dataset/query": { - post: operations["GetDatasets"]; - }; - "/v1/experiment/dataset/{datasetId}/row/insert": { - post: operations["InsertDatasetRow"]; - }; - "/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new": { - post: operations["CreateDatasetRow"]; - }; - "/v1/experiment/dataset/{datasetId}/inputs/query": { - post: operations["GetDataset"]; - }; - "/v1/experiment/dataset/{datasetId}/mutate": { - post: operations["MutateDataset"]; - }; "/v1/helicone-dataset": { post: operations["AddHeliconeDataset"]; }; @@ -478,6 +478,18 @@ export interface paths { "/v1/pi/session": { post: operations["AddSession"]; }; + "/v1/pi/org-name/query": { + post: operations["GetOrgName"]; + }; + "/v1/pi/total-costs": { + post: operations["GetTotalCosts"]; + }; + "/v1/pi/total_requests": { + post: operations["GetTotalRequests"]; + }; + "/v1/pi/costs-over-time/query": { + post: operations["GetCostsOverTime"]; + }; "/v1/settings/query": { get: operations["GetSettings"]; }; @@ -1943,6 +1955,85 @@ Json: JsonObject; error: null; }; "Result_Array__id-string--name-string__.string_": components["schemas"]["ResultSuccess_Array__id-string--name-string___"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess__datasetId-string__": { + data: { + datasetId: string; + }; + /** @enum {number|null} */ + error: null; + }; + "Result__datasetId-string_.string_": components["schemas"]["ResultSuccess__datasetId-string__"] | components["schemas"]["ResultError_string_"]; + DatasetMetadata: { + promptVersionId?: string; + inputRecordsIds?: string[]; + }; + NewDatasetParams: { + datasetName: string; + requestIds: string[]; + /** @enum {string} */ + datasetType: "experiment" | "helicone"; + meta?: components["schemas"]["DatasetMetadata"]; + }; + /** @description Make all properties in T optional */ + Partial_TimestampOperators_: { + gte?: string; + lte?: string; + lt?: string; + gt?: string; + }; + /** @description Make all properties in T optional */ + Partial_RequestTableToOperators_: { + prompt?: components["schemas"]["Partial_TextOperators_"]; + created_at?: components["schemas"]["Partial_TimestampOperators_"]; + user_id?: components["schemas"]["Partial_TextOperators_"]; + auth_hash?: components["schemas"]["Partial_TextOperators_"]; + org_id?: components["schemas"]["Partial_TextOperators_"]; + id?: components["schemas"]["Partial_TextOperators_"]; + node_id?: components["schemas"]["Partial_TextOperators_"]; + model?: components["schemas"]["Partial_TextOperators_"]; + modelOverride?: components["schemas"]["Partial_TextOperators_"]; + path?: components["schemas"]["Partial_TextOperators_"]; + prompt_id?: components["schemas"]["Partial_TextOperators_"]; + }; + /** @description From T, pick a set of properties whose keys are in the union K */ + "Pick_FilterLeaf.request-or-prompts_versions_": { + request?: components["schemas"]["Partial_RequestTableToOperators_"]; + prompts_versions?: components["schemas"]["Partial_PromptVersionsToOperators_"]; + }; + "FilterLeafSubset_request-or-prompts_versions_": components["schemas"]["Pick_FilterLeaf.request-or-prompts_versions_"]; + DatasetFilterNode: components["schemas"]["FilterLeafSubset_request-or-prompts_versions_"] | components["schemas"]["DatasetFilterBranch"] | "all"; + DatasetFilterBranch: { + right: components["schemas"]["DatasetFilterNode"]; + /** @enum {string} */ + operator: "or" | "and"; + left: components["schemas"]["DatasetFilterNode"]; + }; + RandomDatasetParams: { + datasetName: string; + filter: components["schemas"]["DatasetFilterNode"]; + /** Format: double */ + offset?: number; + /** Format: double */ + limit?: number; + }; + DatasetResult: { + id: string; + name: string; + created_at: string; + meta?: components["schemas"]["DatasetMetadata"]; + }; + "ResultSuccess_DatasetResult-Array_": { + data: components["schemas"]["DatasetResult"][]; + /** @enum {number|null} */ + error: null; + }; + "Result_DatasetResult-Array.string_": components["schemas"]["ResultSuccess_DatasetResult-Array_"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess___-Array_": { + data: Record[]; + /** @enum {number|null} */ + error: null; + }; + "Result___-Array.string_": components["schemas"]["ResultSuccess___-Array_"] | components["schemas"]["ResultError_string_"]; "ResultSuccess__tableId-string--experimentId-string__": { data: { experimentId: string; @@ -2172,85 +2263,6 @@ Json: JsonObject; /** @enum {boolean} */ score?: true; }; - "ResultSuccess__datasetId-string__": { - data: { - datasetId: string; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__datasetId-string_.string_": components["schemas"]["ResultSuccess__datasetId-string__"] | components["schemas"]["ResultError_string_"]; - DatasetMetadata: { - promptVersionId?: string; - inputRecordsIds?: string[]; - }; - NewDatasetParams: { - datasetName: string; - requestIds: string[]; - /** @enum {string} */ - datasetType: "experiment" | "helicone"; - meta?: components["schemas"]["DatasetMetadata"]; - }; - /** @description Make all properties in T optional */ - Partial_TimestampOperators_: { - gte?: string; - lte?: string; - lt?: string; - gt?: string; - }; - /** @description Make all properties in T optional */ - Partial_RequestTableToOperators_: { - prompt?: components["schemas"]["Partial_TextOperators_"]; - created_at?: components["schemas"]["Partial_TimestampOperators_"]; - user_id?: components["schemas"]["Partial_TextOperators_"]; - auth_hash?: components["schemas"]["Partial_TextOperators_"]; - org_id?: components["schemas"]["Partial_TextOperators_"]; - id?: components["schemas"]["Partial_TextOperators_"]; - node_id?: components["schemas"]["Partial_TextOperators_"]; - model?: components["schemas"]["Partial_TextOperators_"]; - modelOverride?: components["schemas"]["Partial_TextOperators_"]; - path?: components["schemas"]["Partial_TextOperators_"]; - prompt_id?: components["schemas"]["Partial_TextOperators_"]; - }; - /** @description From T, pick a set of properties whose keys are in the union K */ - "Pick_FilterLeaf.request-or-prompts_versions_": { - request?: components["schemas"]["Partial_RequestTableToOperators_"]; - prompts_versions?: components["schemas"]["Partial_PromptVersionsToOperators_"]; - }; - "FilterLeafSubset_request-or-prompts_versions_": components["schemas"]["Pick_FilterLeaf.request-or-prompts_versions_"]; - DatasetFilterNode: components["schemas"]["FilterLeafSubset_request-or-prompts_versions_"] | components["schemas"]["DatasetFilterBranch"] | "all"; - DatasetFilterBranch: { - right: components["schemas"]["DatasetFilterNode"]; - /** @enum {string} */ - operator: "or" | "and"; - left: components["schemas"]["DatasetFilterNode"]; - }; - RandomDatasetParams: { - datasetName: string; - filter: components["schemas"]["DatasetFilterNode"]; - /** Format: double */ - offset?: number; - /** Format: double */ - limit?: number; - }; - DatasetResult: { - id: string; - name: string; - created_at: string; - meta?: components["schemas"]["DatasetMetadata"]; - }; - "ResultSuccess_DatasetResult-Array_": { - data: components["schemas"]["DatasetResult"][]; - /** @enum {number|null} */ - error: null; - }; - "Result_DatasetResult-Array.string_": components["schemas"]["ResultSuccess_DatasetResult-Array_"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess___-Array_": { - data: Record[]; - /** @enum {number|null} */ - error: null; - }; - "Result___-Array.string_": components["schemas"]["ResultSuccess___-Array_"] | components["schemas"]["ResultError_string_"]; HeliconeDatasetMetadata: { promptVersionId?: string; inputRecordsIds?: string[]; @@ -2730,6 +2742,16 @@ Json: JsonObject; error: null; }; "Result__apiKey-string_.string_": components["schemas"]["ResultSuccess__apiKey-string__"] | components["schemas"]["ResultError_string_"]; + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + data: { + created_at_trunc: string; + /** Format: double */ + cost: number; + }[]; + /** @enum {number|null} */ + error: null; + }; + "Result__cost-number--created_at_trunc-string_-Array.string_": components["schemas"]["ResultSuccess__cost-number--created_at_trunc-string_-Array_"] | components["schemas"]["ResultError_string_"]; /** @enum {string} */ LlmType: "chat" | "completion"; FunctionCall: { @@ -4780,6 +4802,134 @@ export interface operations { }; }; }; + AddDataset: { + requestBody: { + content: { + "application/json": components["schemas"]["NewDatasetParams"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__datasetId-string_.string_"]; + }; + }; + }; + }; + AddRandomDataset: { + requestBody: { + content: { + "application/json": components["schemas"]["RandomDatasetParams"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__datasetId-string_.string_"]; + }; + }; + }; + }; + GetDatasets: { + requestBody: { + content: { + "application/json": { + promptVersionId?: string; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_DatasetResult-Array.string_"]; + }; + }; + }; + }; + InsertDatasetRow: { + parameters: { + path: { + datasetId: string; + }; + }; + requestBody: { + content: { + "application/json": { + originalColumnId?: string; + inputs: components["schemas"]["Record_string.string_"]; + inputRecordId: string; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + CreateDatasetRow: { + parameters: { + path: { + datasetId: string; + promptVersionId: string; + }; + }; + requestBody: { + content: { + "application/json": { + sourceRequest?: string; + inputs: components["schemas"]["Record_string.string_"]; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + GetDataset: { + parameters: { + path: { + datasetId: string; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_PromptInputRecord-Array.string_"]; + }; + }; + }; + }; + MutateDataset: { + requestBody: { + content: { + "application/json": { + removeRequests: string[]; + addRequests: string[]; + }; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result___-Array.string_"]; + }; + }; + }; + }; CreateNewEmptyExperiment: { requestBody: { content: { @@ -5143,134 +5293,6 @@ export interface operations { }; }; }; - AddDataset: { - requestBody: { - content: { - "application/json": components["schemas"]["NewDatasetParams"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__datasetId-string_.string_"]; - }; - }; - }; - }; - AddRandomDataset: { - requestBody: { - content: { - "application/json": components["schemas"]["RandomDatasetParams"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__datasetId-string_.string_"]; - }; - }; - }; - }; - GetDatasets: { - requestBody: { - content: { - "application/json": { - promptVersionId?: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_DatasetResult-Array.string_"]; - }; - }; - }; - }; - InsertDatasetRow: { - parameters: { - path: { - datasetId: string; - }; - }; - requestBody: { - content: { - "application/json": { - originalColumnId?: string; - inputs: components["schemas"]["Record_string.string_"]; - inputRecordId: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_string.string_"]; - }; - }; - }; - }; - CreateDatasetRow: { - parameters: { - path: { - datasetId: string; - promptVersionId: string; - }; - }; - requestBody: { - content: { - "application/json": { - sourceRequest?: string; - inputs: components["schemas"]["Record_string.string_"]; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_string.string_"]; - }; - }; - }; - }; - GetDataset: { - parameters: { - path: { - datasetId: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_PromptInputRecord-Array.string_"]; - }; - }; - }; - }; - MutateDataset: { - requestBody: { - content: { - "application/json": { - removeRequests: string[]; - addRequests: string[]; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result___-Array.string_"]; - }; - }; - }; - }; AddHeliconeDataset: { requestBody: { content: { @@ -5418,11 +5440,6 @@ export interface operations { }; }; GetTotalRequests: { - requestBody: { - content: { - "application/json": components["schemas"]["DataIsBeautifulRequestBody"]; - }; - }; responses: { /** @description Ok */ 200: { @@ -6061,6 +6078,41 @@ export interface operations { }; }; }; + GetOrgName: { + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_string.string_"]; + }; + }; + }; + }; + GetTotalCosts: { + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result_number.string_"]; + }; + }; + }; + }; + GetCostsOverTime: { + requestBody: { + content: { + "application/json": components["schemas"]["DataOverTimeRequest"]; + }; + }; + responses: { + /** @description Ok */ + 200: { + content: { + "application/json": components["schemas"]["Result__cost-number--created_at_trunc-string_-Array.string_"]; + }; + }; + }; + }; GetSettings: { responses: { /** @description Ok */