@langwatch/server 3.1.0-beta.21 → 3.1.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/__init__.py +36 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/_logger.py +165 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/batch_clustering.py +153 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/build_response.py +77 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/constants.py +7 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/incremental_clustering.py +325 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/topic_naming.py +432 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/types.py +42 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/utils.py +191 -0
- package/langevals/evaluators/topic_clustering/pyproject.toml +52 -0
- package/langevals/evaluators/topic_clustering/tests/test_topic_clustering.py +239 -0
- package/langevals/evaluators/topic_clustering/tests/test_topic_clustering_integration.py +97 -0
- package/langevals/evaluators/topic_clustering/tests/test_topic_naming.py +72 -0
- package/langevals/langevals/pytest_plugins/pass_rate_plugin.py +7 -1
- package/langevals/langevals/server.py +28 -0
- package/langevals/pyproject.toml +3 -0
- package/langevals/uv.lock +119 -20
- package/langwatch/dist/client/assets/{AnnotationsTable-BDAkYaz6.js → AnnotationsTable-uS_9SQ-g.js} +2 -2
- package/langwatch/dist/client/assets/{BatchEvaluationSummary-DMaQM_VB.js → BatchEvaluationSummary-DtFd8yKJ.js} +2 -2
- package/langwatch/dist/client/assets/{BudgetEditDrawer-CHaqmdIl.js → BudgetEditDrawer-CHEPz0hH.js} +2 -2
- package/langwatch/dist/client/assets/{ChartCard-D14PUg_d.js → ChartCard-s5fMPo7b.js} +2 -2
- package/langwatch/dist/client/assets/{ChatWindow-CRDnlP-Q.js → ChatWindow-C0XSteVJ.js} +2 -2
- package/langwatch/dist/client/assets/ChatWindow-DFEmNXQL.js +1 -0
- package/langwatch/dist/client/assets/{ConfirmDialog-CXIhncvW.js → ConfirmDialog-M94yLNvP.js} +2 -2
- package/langwatch/dist/client/assets/{ContactSalesBlock-CijLBwRC.js → ContactSalesBlock-CnnuZ8iI.js} +2 -2
- package/langwatch/dist/client/assets/{DSPyExperiment-B1YOL2m8.js → DSPyExperiment-CMA6lrlx.js} +2 -2
- package/langwatch/dist/client/assets/{FilterDisplay-BB0xWrLn.js → FilterDisplay-0S3NqCkq.js} +2 -2
- package/langwatch/dist/client/assets/{FormatMoney-w9vr_h0X.js → FormatMoney-CCygtAHg.js} +2 -2
- package/langwatch/dist/client/assets/{FoundryDrawer-CdJDXtpz.js → FoundryDrawer-B35xZ26C.js} +2 -2
- package/langwatch/dist/client/assets/{GatewayErrorPanel-DvE9U2dS.js → GatewayErrorPanel-BsaYQEie.js} +2 -2
- package/langwatch/dist/client/assets/{GatewayLayout-lv1p_6B5.js → GatewayLayout-LvwwrwMf.js} +2 -2
- package/langwatch/dist/client/assets/{GraphsLayout-BJ68J9e-.js → GraphsLayout-DJ-HI9N1.js} +2 -2
- package/langwatch/dist/client/assets/{GroupBindingInputRow-DebZBCnD.js → GroupBindingInputRow-CV-fBkX9.js} +2 -2
- package/langwatch/dist/client/assets/{MessagesTable-B6lYde-x.js → MessagesTable-9taaKCOZ.js} +2 -2
- package/langwatch/dist/client/assets/{NavigationFooter-CiOVzDUh.js → NavigationFooter-Dzvauw3l.js} +2 -2
- package/langwatch/dist/client/assets/{NoDataInfoBlock-quSW_MRm.js → NoDataInfoBlock-CLKl_wlX.js} +2 -2
- package/langwatch/dist/client/assets/{OpsPageShell-DJ1WlI6-.js → OpsPageShell-C_mTziRS.js} +2 -2
- package/langwatch/dist/client/assets/{OptimizationStudio-BlozXjcN.js → OptimizationStudio-D2zpsmJj.js} +8 -12
- package/langwatch/dist/client/assets/{PreconditionsField-BOfcWvmZ.js → PreconditionsField-WXB8kcTK.js} +2 -2
- package/langwatch/dist/client/assets/{SettingsLayout-CLCGxMAe.js → SettingsLayout--1gdEuhv.js} +2 -2
- package/langwatch/dist/client/assets/{SubscriptionPage-J8b2Zaj6.js → SubscriptionPage-B0ox_4kM.js} +2 -2
- package/langwatch/dist/client/assets/{VirtualKeySecretReveal-DR1VDLy7.js → VirtualKeySecretReveal-CRbI1dKQ.js} +2 -2
- package/langwatch/dist/client/assets/{WithPermissionGuard-DD8uo3UK.js → WithPermissionGuard-B4Jo8E5-.js} +2 -2
- package/langwatch/dist/client/assets/{__...path__-BZVaIayJ.js → __...path__-BF2zkD84.js} +2 -2
- package/langwatch/dist/client/assets/{_experiment_-B1aT-wS3.js → _experiment_-D02aoVQk.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-oI_eq-I_.js → _id_-Ch8YmTiM.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-DAqPuO73.js → _id_-D6ZvwHpH.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-DUngklVb.js → _id_-DOC1ZkBm.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-jFDAfbob.js → _id_-DfWwW6_N.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-BKBrWGG0.js → _id_-DxUo4W7J.js} +2 -2
- package/langwatch/dist/client/assets/_not-found-DDh108-i.js +1 -0
- package/langwatch/dist/client/assets/{_project_-Bt1tayHB.js → _project_-_UUt5Ar9.js} +2 -2
- package/langwatch/dist/client/assets/{_runId_-CfvnDt5H.js → _runId_-Dimwzp48.js} +2 -2
- package/langwatch/dist/client/assets/_slug_-BMvKBwS_.js +2 -0
- package/langwatch/dist/client/assets/{_slug_-DZAdl0QS.js → _slug_-CE6VoDSC.js} +2 -2
- package/langwatch/dist/client/assets/{_slug_-DmoWXjKT.js → _slug_-OiOLG1Mv.js} +2 -2
- package/langwatch/dist/client/assets/{_team_-DL_wKSWK.js → _team_-DKvmwO_5.js} +2 -2
- package/langwatch/dist/client/assets/{_workflow_-DcMXLPUe.js → _workflow_-FkilKiB-.js} +3 -3
- package/langwatch/dist/client/assets/{_workflow_-NI9bac7d.js → _workflow_-gJZppg3h.js} +2 -2
- package/langwatch/dist/client/assets/{access-audit-CFwNwusI.js → access-audit-xcUVYMMT.js} +2 -2
- package/langwatch/dist/client/assets/{agents-Di4XRwcn.js → agents-D32g91cu.js} +2 -2
- package/langwatch/dist/client/assets/{all-C273mlDB.js → all-vnREzDZj.js} +2 -2
- package/langwatch/dist/client/assets/{analytics-CEAcSf6B.js → analytics-DP6Y4Feh.js} +2 -2
- package/langwatch/dist/client/assets/{annotation-scores-CHfn4LQp.js → annotation-scores-CjD4CEB6.js} +2 -2
- package/langwatch/dist/client/assets/{annotations-CHZQrha6.js → annotations-1rVXiDRQ.js} +2 -2
- package/langwatch/dist/client/assets/{api-keys-BT7HExHM.js → api-keys-BJpKyuaz.js} +2 -2
- package/langwatch/dist/client/assets/{audit-log-BGk-51Dt.js → audit-log-BdUdZjxp.js} +2 -2
- package/langwatch/dist/client/assets/{authentication-DvwXfkp-.js → authentication-8mQB00CC.js} +2 -2
- package/langwatch/dist/client/assets/{authorize-tXpHrWyw.js → authorize-BpUueMNW.js} +2 -2
- package/langwatch/dist/client/assets/{authorize-CRu9xlpU.js → authorize-CbNBtmxW.js} +2 -2
- package/langwatch/dist/client/assets/{automations-CjDvz9Ak.js → automations-34KMkRxd.js} +2 -2
- package/langwatch/dist/client/assets/{billing-plans-FUqEPN62.js → billing-plans-BUQp08MI.js} +2 -2
- package/langwatch/dist/client/assets/{budgets-BV6_RHrs.js → budgets-CdelE8Hv.js} +2 -2
- package/langwatch/dist/client/assets/{cache-rules-CtYA79E_.js → cache-rules-D2m1QlNJ.js} +2 -2
- package/langwatch/dist/client/assets/choose-C0LdeUiH.js +2 -0
- package/langwatch/dist/client/assets/{command-bar-CaJygoez.js → command-bar-DUK45yin.js} +7 -9
- package/langwatch/dist/client/assets/custom-hBq2K4FJ.js +1 -0
- package/langwatch/dist/client/assets/{datasets-vLWpH84_.js → datasets-ErNNhmjg.js} +2 -2
- package/langwatch/dist/client/assets/{dejaview-DwVR3RGg.js → dejaview-BaD4_v90.js} +2 -2
- package/langwatch/dist/client/assets/{dist-SwV3YZv3.js → dist-Cds4Mqhj.js} +4 -6
- package/langwatch/dist/client/assets/{edit-CyxsmQmW.js → edit-DpT8ejBV.js} +2 -2
- package/langwatch/dist/client/assets/{evaluations-BfgeZMph.js → evaluations-BdQ2Dm2r.js} +2 -2
- package/langwatch/dist/client/assets/{evaluations-HSQIMvbX.js → evaluations-C90I4VAr.js} +2 -2
- package/langwatch/dist/client/assets/{evaluators-DLHVvnrh.js → evaluators-ig_ugRLt.js} +2 -2
- package/langwatch/dist/client/assets/{foundry-Ckq0WjPU.js → foundry-B-X_80pD.js} +2 -2
- package/langwatch/dist/client/assets/{gateway-CDSYPZ6w.js → gateway-CS_mtJx-.js} +2 -2
- package/langwatch/dist/client/assets/{groups-CCCRUqPj.js → groups-Bp90ChP3.js} +2 -2
- package/langwatch/dist/client/assets/{index-Bm6z2fM9.js → index-TNQ6uyis.js} +4 -4
- package/langwatch/dist/client/assets/{license-CHOarGWr.js → license-CgnlvyuI.js} +2 -2
- package/langwatch/dist/client/assets/{me-CBya_vXs.js → me-DEqhm_KC.js} +2 -2
- package/langwatch/dist/client/assets/{members-lIFLh-rh.js → members-CUJANDtH.js} +2 -2
- package/langwatch/dist/client/assets/{messages-CG9j8Dz8.js → messages-fQBfCjvp.js} +2 -2
- package/langwatch/dist/client/assets/{metrics-C9pzeaI6.js → metrics-DeIxebpD.js} +2 -2
- package/langwatch/dist/client/assets/{model-costs-Bc5uqjkl.js → model-costs-C1RbgK--.js} +2 -2
- package/langwatch/dist/client/assets/{model-providers-B5UjRgS_.js → model-providers-Pv3ML_-t.js} +2 -2
- package/langwatch/dist/client/assets/{my-queue-BkEfiWyR.js → my-queue-BLre2NMr.js} +2 -2
- package/langwatch/dist/client/assets/{ops-Cc-g-CMn.js → ops-CCw-FJaT.js} +2 -2
- package/langwatch/dist/client/assets/{organization-features-CoIKKHkQ.js → organization-features-rqg-75mI.js} +2 -2
- package/langwatch/dist/client/assets/{organizations-DWcQUTzi.js → organizations-DjCzIHVx.js} +2 -2
- package/langwatch/dist/client/assets/{persistence-CTQ44vGL.js → persistence-BPvHS0F6.js} +2 -2
- package/langwatch/dist/client/assets/{plans-Dq3eFg5K.js → plans-Ch2Ol-Fd.js} +2 -2
- package/langwatch/dist/client/assets/{projections-CTNj1QBM.js → projections-it4FOVjm.js} +2 -2
- package/langwatch/dist/client/assets/{projects-BxM7C87h.js → projects-CjWZFLfn.js} +2 -2
- package/langwatch/dist/client/assets/{prompts-DhXnJT6e.js → prompts-DilmFH_s.js} +2 -2
- package/langwatch/dist/client/assets/{providers-DW7VWdqq.js → providers-tlLT_lTF.js} +2 -2
- package/langwatch/dist/client/assets/{reports-D3QFKhNP.js → reports-vlrcTrLs.js} +2 -2
- package/langwatch/dist/client/assets/{roles-B_0t5DWA.js → roles-DNgi-NQ9.js} +2 -2
- package/langwatch/dist/client/assets/{scenarios-BX3XslU0.js → scenarios-BmG_wDkR.js} +2 -2
- package/langwatch/dist/client/assets/{scim-DDsLO39r.js → scim-BKr1_FHt.js} +2 -2
- package/langwatch/dist/client/assets/{secrets-BvEGwDCy.js → secrets-CU8ocTGv.js} +2 -2
- package/langwatch/dist/client/assets/{settings-9giNiAQQ.js → settings-CDzdoYVK.js} +2 -2
- package/langwatch/dist/client/assets/{setup-HxXKoVKG.js → setup-nEvn2rjN.js} +2 -2
- package/langwatch/dist/client/assets/{subscription-DhyswDze.js → subscription-BPNl_6jF.js} +3 -3
- package/langwatch/dist/client/assets/{subscriptions-Dyyau22a.js → subscriptions-D0G-OE5C.js} +2 -2
- package/langwatch/dist/client/assets/{teams-DRmeAxzf.js → teams-DThgDQvB.js} +2 -2
- package/langwatch/dist/client/assets/{textOverflowHeuristic-JibhpzDV.js → textOverflowHeuristic-DTC8-Ffx.js} +2 -2
- package/langwatch/dist/client/assets/{topic-clustering-Bllfw5rZ.js → topic-clustering-BR2Mbpao.js} +2 -2
- package/langwatch/dist/client/assets/{topics-CpiGYxqb.js → topics-CI8GoNqp.js} +2 -2
- package/langwatch/dist/client/assets/{traceExecutor-CiHXJB0V.js → traceExecutor-CDUGyUaw.js} +2 -2
- package/langwatch/dist/client/assets/{usage-BnsstwBY.js → usage-B4mR7ut_.js} +2 -2
- package/langwatch/dist/client/assets/{usage-CoyGtJoI.js → usage-C8fbffYi.js} +2 -2
- package/langwatch/dist/client/assets/{useAdminResource-SPC5iBHM.js → useAdminResource-SmnnHro6.js} +2 -2
- package/langwatch/dist/client/assets/{useAnnotationQueues-2DKZTC7r.js → useAnnotationQueues-CA6Vk--V.js} +2 -2
- package/langwatch/dist/client/assets/{useAvailableEvaluators-HndTl2LV.js → useAvailableEvaluators-hmbmcRQr.js} +2 -2
- package/langwatch/dist/client/assets/{useDeleteDatasetConfirmation-BgWN6Qqb.js → useDeleteDatasetConfirmation-BCK_zUUe.js} +2 -2
- package/langwatch/dist/client/assets/{useWorkflowStore-e1wFCvo2.js → useWorkflowStore-QUJ3J8X9.js} +2 -2
- package/langwatch/dist/client/assets/{users-C6wjliCC.js → users-CfhanCfR.js} +2 -2
- package/langwatch/dist/client/assets/{users-tF6ZKeV1.js → users-HjuN3o6k.js} +2 -2
- package/langwatch/dist/client/assets/{virtual-keys-BL-65S0B.js → virtual-keys-Bj-MhW66.js} +2 -2
- package/langwatch/dist/client/assets/{wizard-faGkpZDT.js → wizard-dRWCVVx6.js} +2 -2
- package/langwatch/dist/client/assets/{workbench-Oj0s_YR-.js → workbench-CuixH3G1.js} +2 -2
- package/langwatch/dist/client/assets/{workflows-Cu9k-Twu.js → workflows-BT6m4Yu9.js} +2 -2
- package/langwatch/dist/client/index.html +3 -3
- package/langwatch/scripts/seed-dogfood-password.ts +163 -0
- package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-evaluator.integration.test.ts +458 -0
- package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-routing.test.ts +180 -0
- package/langwatch/src/app/api/workflows/post_event/__tests__/post-event.integration.test.ts +274 -0
- package/langwatch/src/app/api/workflows/post_event/post-event.ts +29 -1
- package/langwatch/src/components/agents/AgentCodeEditorDrawer.tsx +4 -5
- package/langwatch/src/components/agents/__tests__/AgentCodeEditorDrawer.integration.test.tsx +40 -0
- package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/__tests__/code-execution-node.factory.unit.test.ts +47 -0
- package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/code-execution-node.factory.ts +2 -4
- package/langwatch/src/components/experiments/BatchEvaluationV2/BatchEvaluationV2EvaluationResults.tsx +6 -1
- package/langwatch/src/optimization_studio/__tests__/registry.test.ts +29 -1
- package/langwatch/src/optimization_studio/components/Optimize.tsx +17 -3
- package/langwatch/src/optimization_studio/components/properties/AgentPropertiesPanel.tsx +4 -5
- package/langwatch/src/optimization_studio/hooks/workflowStoreCore.ts +17 -6
- package/langwatch/src/optimization_studio/hooks/workflowStoreCore.unit.test.ts +42 -0
- package/langwatch/src/optimization_studio/registry.ts +2 -4
- package/langwatch/src/optimization_studio/server/lambda/index.ts +12 -2
- package/langwatch/src/server/api/routers/workflows.ts +18 -0
- package/langwatch/src/server/evaluations-v3/execution/workflowBuilder.ts +3 -2
- package/langwatch/src/server/evaluations-v3/services/__tests__/experiment-run.service.getRun-null.unit.test.ts +71 -0
- package/langwatch/src/server/evaluations-v3/services/experiment-run.service.ts +18 -9
- package/langwatch/src/server/modelProviders/utils.ts +11 -1
- package/langwatch/src/server/nlpgo/__tests__/nlpgoFetch.integration.test.ts +248 -0
- package/langwatch/src/server/nlpgo/nlpgoFetch.ts +142 -0
- package/langwatch/src/server/routes/__tests__/playground-proxy.integration.test.ts +242 -0
- package/langwatch/src/server/routes/playground.ts +11 -1
- package/langwatch/src/server/routes/workflows.ts +17 -0
- package/langwatch/src/server/topicClustering/topicClustering.ts +33 -8
- package/langwatch/src/server/workflows/runWorkflow.ts +10 -13
- package/langwatch_nlp/langwatch_nlp/topic_clustering/topic_naming.py +39 -32
- package/langwatch_nlp/scripts/entrypoint.sh +67 -0
- package/package.json +1 -1
- package/packages/server/dist/cli.cjs +67 -94
- package/langwatch/dist/client/assets/ChatWindow-DzB-tNlQ.js +0 -1
- package/langwatch/dist/client/assets/_not-found-PEUaWdF3.js +0 -1
- package/langwatch/dist/client/assets/_slug_-C-8AjsjC.js +0 -2
- package/langwatch/dist/client/assets/choose--PBky27o.js +0 -2
- package/langwatch/dist/client/assets/custom-CSiS1liN.js +0 -1
package/langevals/uv.lock
CHANGED
|
@@ -25,6 +25,7 @@ members = [
|
|
|
25
25
|
"langevals-openai",
|
|
26
26
|
"langevals-presidio",
|
|
27
27
|
"langevals-ragas",
|
|
28
|
+
"langevals-topic-clustering",
|
|
28
29
|
]
|
|
29
30
|
|
|
30
31
|
[[package]]
|
|
@@ -2014,6 +2015,7 @@ all = [
|
|
|
2014
2015
|
{ name = "langevals-openai" },
|
|
2015
2016
|
{ name = "langevals-presidio" },
|
|
2016
2017
|
{ name = "langevals-ragas" },
|
|
2018
|
+
{ name = "langevals-topic-clustering" },
|
|
2017
2019
|
]
|
|
2018
2020
|
azure = [
|
|
2019
2021
|
{ name = "langevals-azure" },
|
|
@@ -2036,6 +2038,9 @@ presidio = [
|
|
|
2036
2038
|
ragas = [
|
|
2037
2039
|
{ name = "langevals-ragas" },
|
|
2038
2040
|
]
|
|
2041
|
+
topic-clustering = [
|
|
2042
|
+
{ name = "langevals-topic-clustering" },
|
|
2043
|
+
]
|
|
2039
2044
|
|
|
2040
2045
|
[package.dev-dependencies]
|
|
2041
2046
|
dev = [
|
|
@@ -2068,6 +2073,8 @@ requires-dist = [
|
|
|
2068
2073
|
{ name = "langevals-presidio", marker = "extra == 'presidio'", editable = "evaluators/presidio" },
|
|
2069
2074
|
{ name = "langevals-ragas", marker = "extra == 'all'", editable = "evaluators/ragas" },
|
|
2070
2075
|
{ name = "langevals-ragas", marker = "extra == 'ragas'", editable = "evaluators/ragas" },
|
|
2076
|
+
{ name = "langevals-topic-clustering", marker = "extra == 'all'", editable = "evaluators/topic_clustering" },
|
|
2077
|
+
{ name = "langevals-topic-clustering", marker = "extra == 'topic-clustering'", editable = "evaluators/topic_clustering" },
|
|
2071
2078
|
{ name = "mangum", specifier = ">=0.17.0" },
|
|
2072
2079
|
{ name = "markdown", specifier = ">=3.6" },
|
|
2073
2080
|
{ name = "nest-asyncio", specifier = ">=1.6.0" },
|
|
@@ -2078,7 +2085,7 @@ requires-dist = [
|
|
|
2078
2085
|
{ name = "python-dotenv", specifier = "==1.0.1" },
|
|
2079
2086
|
{ name = "uvicorn", specifier = ">=0.29.0" },
|
|
2080
2087
|
]
|
|
2081
|
-
provides-extras = ["azure", "openai", "ragas", "lingua", "langevals", "presidio", "legacy", "all"]
|
|
2088
|
+
provides-extras = ["azure", "openai", "ragas", "lingua", "langevals", "presidio", "legacy", "topic-clustering", "all"]
|
|
2082
2089
|
|
|
2083
2090
|
[package.metadata.requires-dev]
|
|
2084
2091
|
dev = [
|
|
@@ -2469,6 +2476,57 @@ test = [
|
|
|
2469
2476
|
{ name = "python-dotenv", specifier = ">=1.0.1" },
|
|
2470
2477
|
]
|
|
2471
2478
|
|
|
2479
|
+
[[package]]
|
|
2480
|
+
name = "langevals-topic-clustering"
|
|
2481
|
+
version = "0.1.0"
|
|
2482
|
+
source = { editable = "evaluators/topic_clustering" }
|
|
2483
|
+
dependencies = [
|
|
2484
|
+
{ name = "fastapi" },
|
|
2485
|
+
{ name = "langevals-core" },
|
|
2486
|
+
{ name = "litellm" },
|
|
2487
|
+
{ name = "nanoid" },
|
|
2488
|
+
{ name = "numpy" },
|
|
2489
|
+
{ name = "scikit-learn" },
|
|
2490
|
+
{ name = "scipy" },
|
|
2491
|
+
{ name = "structlog" },
|
|
2492
|
+
{ name = "tenacity" },
|
|
2493
|
+
]
|
|
2494
|
+
|
|
2495
|
+
[package.dev-dependencies]
|
|
2496
|
+
dev = [
|
|
2497
|
+
{ name = "ipykernel" },
|
|
2498
|
+
]
|
|
2499
|
+
test = [
|
|
2500
|
+
{ name = "httpx" },
|
|
2501
|
+
{ name = "pandas" },
|
|
2502
|
+
{ name = "pytest" },
|
|
2503
|
+
{ name = "pytest-httpx" },
|
|
2504
|
+
{ name = "python-dotenv" },
|
|
2505
|
+
]
|
|
2506
|
+
|
|
2507
|
+
[package.metadata]
|
|
2508
|
+
requires-dist = [
|
|
2509
|
+
{ name = "fastapi", specifier = ">=0.111.1,<1" },
|
|
2510
|
+
{ name = "langevals-core", editable = "langevals_core" },
|
|
2511
|
+
{ name = "litellm", specifier = ">=1.79.0" },
|
|
2512
|
+
{ name = "nanoid", specifier = ">=2.0.0,<3" },
|
|
2513
|
+
{ name = "numpy", specifier = ">=1.26.4,<3" },
|
|
2514
|
+
{ name = "scikit-learn", specifier = ">=1.5.2,<2" },
|
|
2515
|
+
{ name = "scipy", specifier = ">=1.14.1,<2" },
|
|
2516
|
+
{ name = "structlog", specifier = ">=24.1.0" },
|
|
2517
|
+
{ name = "tenacity", specifier = ">=8.5.0,<9" },
|
|
2518
|
+
]
|
|
2519
|
+
|
|
2520
|
+
[package.metadata.requires-dev]
|
|
2521
|
+
dev = [{ name = "ipykernel", specifier = ">=6.29.4" }]
|
|
2522
|
+
test = [
|
|
2523
|
+
{ name = "httpx", specifier = ">=0.27.0" },
|
|
2524
|
+
{ name = "pandas", specifier = ">=2.2.3,<3" },
|
|
2525
|
+
{ name = "pytest", specifier = ">=7.4.2" },
|
|
2526
|
+
{ name = "pytest-httpx", specifier = ">=0.30.0" },
|
|
2527
|
+
{ name = "python-dotenv", specifier = ">=1.0.1" },
|
|
2528
|
+
]
|
|
2529
|
+
|
|
2472
2530
|
[[package]]
|
|
2473
2531
|
name = "langsmith"
|
|
2474
2532
|
version = "0.1.147"
|
|
@@ -2854,6 +2912,15 @@ wheels = [
|
|
|
2854
2912
|
{ url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" },
|
|
2855
2913
|
]
|
|
2856
2914
|
|
|
2915
|
+
[[package]]
|
|
2916
|
+
name = "nanoid"
|
|
2917
|
+
version = "2.0.0"
|
|
2918
|
+
source = { registry = "https://pypi.org/simple" }
|
|
2919
|
+
sdist = { url = "https://files.pythonhosted.org/packages/b7/9d/0250bf5935d88e214df469d35eccc0f6ff7e9db046fc8a9aeb4b2a192775/nanoid-2.0.0.tar.gz", hash = "sha256:5a80cad5e9c6e9ae3a41fa2fb34ae189f7cb420b2a5d8f82bd9d23466e4efa68", size = 3290, upload-time = "2018-11-20T14:45:51.578Z" }
|
|
2920
|
+
wheels = [
|
|
2921
|
+
{ url = "https://files.pythonhosted.org/packages/2e/0d/8630f13998638dc01e187fadd2e5c6d42d127d08aeb4943d231664d6e539/nanoid-2.0.0-py3-none-any.whl", hash = "sha256:90aefa650e328cffb0893bbd4c236cfd44c48bc1f2d0b525ecc53c3187b653bb", size = 5844, upload-time = "2018-11-20T14:45:50.165Z" },
|
|
2922
|
+
]
|
|
2923
|
+
|
|
2857
2924
|
[[package]]
|
|
2858
2925
|
name = "nest-asyncio"
|
|
2859
2926
|
version = "1.6.0"
|
|
@@ -3310,31 +3377,30 @@ wheels = [
|
|
|
3310
3377
|
|
|
3311
3378
|
[[package]]
|
|
3312
3379
|
name = "pandas"
|
|
3313
|
-
version = "3.
|
|
3380
|
+
version = "2.3.3"
|
|
3314
3381
|
source = { registry = "https://pypi.org/simple" }
|
|
3315
3382
|
dependencies = [
|
|
3316
3383
|
{ name = "numpy" },
|
|
3317
3384
|
{ name = "python-dateutil" },
|
|
3318
|
-
{ name = "
|
|
3385
|
+
{ name = "pytz" },
|
|
3386
|
+
{ name = "tzdata" },
|
|
3319
3387
|
]
|
|
3320
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
3388
|
+
sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" }
|
|
3321
3389
|
wheels = [
|
|
3322
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3323
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3324
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3325
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3326
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3327
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3328
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3329
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3330
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3331
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3332
|
-
{ url = "https://files.pythonhosted.org/packages/63/
|
|
3333
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3334
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
3335
|
-
{ url = "https://files.pythonhosted.org/packages/86/
|
|
3336
|
-
{ url = "https://files.pythonhosted.org/packages/64/2d/4f8a2f192ed12c90a0aab47f5557ece0e56b0370c49de9454a09de7381b2/pandas-3.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:a453aad8c4f4e9f166436994a33884442ea62aa8b27d007311e87521b97246e1", size = 9730970, upload-time = "2026-01-21T15:50:47.962Z" },
|
|
3337
|
-
{ url = "https://files.pythonhosted.org/packages/d4/64/ff571be435cf1e643ca98d0945d76732c0b4e9c37191a89c8550b105eed1/pandas-3.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:da768007b5a33057f6d9053563d6b74dd6d029c337d93c6d0d22a763a5c2ecc0", size = 9041950, upload-time = "2026-01-21T15:50:50.422Z" },
|
|
3390
|
+
{ url = "https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523", size = 11578790, upload-time = "2025-09-29T23:18:30.065Z" },
|
|
3391
|
+
{ url = "https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45", size = 10833831, upload-time = "2025-09-29T23:38:56.071Z" },
|
|
3392
|
+
{ url = "https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66", size = 12199267, upload-time = "2025-09-29T23:18:41.627Z" },
|
|
3393
|
+
{ url = "https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b", size = 12789281, upload-time = "2025-09-29T23:18:56.834Z" },
|
|
3394
|
+
{ url = "https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791", size = 13240453, upload-time = "2025-09-29T23:19:09.247Z" },
|
|
3395
|
+
{ url = "https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151", size = 13890361, upload-time = "2025-09-29T23:19:25.342Z" },
|
|
3396
|
+
{ url = "https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c", size = 11348702, upload-time = "2025-09-29T23:19:38.296Z" },
|
|
3397
|
+
{ url = "https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53", size = 11597846, upload-time = "2025-09-29T23:19:48.856Z" },
|
|
3398
|
+
{ url = "https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35", size = 10729618, upload-time = "2025-09-29T23:39:08.659Z" },
|
|
3399
|
+
{ url = "https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908", size = 11737212, upload-time = "2025-09-29T23:19:59.765Z" },
|
|
3400
|
+
{ url = "https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89", size = 12362693, upload-time = "2025-09-29T23:20:14.098Z" },
|
|
3401
|
+
{ url = "https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98", size = 12771002, upload-time = "2025-09-29T23:20:26.76Z" },
|
|
3402
|
+
{ url = "https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084", size = 13450971, upload-time = "2025-09-29T23:20:41.344Z" },
|
|
3403
|
+
{ url = "https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b", size = 10992722, upload-time = "2025-09-29T23:20:54.139Z" },
|
|
3338
3404
|
]
|
|
3339
3405
|
|
|
3340
3406
|
[[package]]
|
|
@@ -3839,6 +3905,19 @@ wheels = [
|
|
|
3839
3905
|
{ url = "https://files.pythonhosted.org/packages/3b/ab/b3226f0bd7cdcf710fbede2b3548584366da3b19b5021e74f5bde2a8fa3f/pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b", size = 374801, upload-time = "2025-12-06T21:30:49.154Z" },
|
|
3840
3906
|
]
|
|
3841
3907
|
|
|
3908
|
+
[[package]]
|
|
3909
|
+
name = "pytest-httpx"
|
|
3910
|
+
version = "0.36.2"
|
|
3911
|
+
source = { registry = "https://pypi.org/simple" }
|
|
3912
|
+
dependencies = [
|
|
3913
|
+
{ name = "httpx" },
|
|
3914
|
+
{ name = "pytest" },
|
|
3915
|
+
]
|
|
3916
|
+
sdist = { url = "https://files.pythonhosted.org/packages/4e/42/f53c58570e80d503ade9dd42ce57f2915d14bcbe25f6308138143950d1d6/pytest_httpx-0.36.2.tar.gz", hash = "sha256:05a56527484f7f4e8c856419ea379b8dc359c36801c4992fdb330f294c690356", size = 57683, upload-time = "2026-04-09T13:57:19.837Z" }
|
|
3917
|
+
wheels = [
|
|
3918
|
+
{ url = "https://files.pythonhosted.org/packages/1e/55/1fa65f8e4fceb19dd6daa867c162ad845d547f6058cd92b4b02384a44777/pytest_httpx-0.36.2-py3-none-any.whl", hash = "sha256:d42ebd5679442dc7bfb0c48e0767b6562e9bc4534d805127b0084171886a5e22", size = 20315, upload-time = "2026-04-09T13:57:18.587Z" },
|
|
3919
|
+
]
|
|
3920
|
+
|
|
3842
3921
|
[[package]]
|
|
3843
3922
|
name = "pytest-xdist"
|
|
3844
3923
|
version = "3.8.0"
|
|
@@ -3882,6 +3961,15 @@ wheels = [
|
|
|
3882
3961
|
{ url = "https://files.pythonhosted.org/packages/1b/d0/397f9626e711ff749a95d96b7af99b9c566a9bb5129b8e4c10fc4d100304/python_multipart-0.0.22-py3-none-any.whl", hash = "sha256:2b2cd894c83d21bf49d702499531c7bafd057d730c201782048f7945d82de155", size = 24579, upload-time = "2026-01-25T10:15:54.811Z" },
|
|
3883
3962
|
]
|
|
3884
3963
|
|
|
3964
|
+
[[package]]
|
|
3965
|
+
name = "pytz"
|
|
3966
|
+
version = "2026.1.post1"
|
|
3967
|
+
source = { registry = "https://pypi.org/simple" }
|
|
3968
|
+
sdist = { url = "https://files.pythonhosted.org/packages/56/db/b8721d71d945e6a8ac63c0fc900b2067181dbb50805958d4d4661cf7d277/pytz-2026.1.post1.tar.gz", hash = "sha256:3378dde6a0c3d26719182142c56e60c7f9af7e968076f31aae569d72a0358ee1", size = 321088, upload-time = "2026-03-03T07:47:50.683Z" }
|
|
3969
|
+
wheels = [
|
|
3970
|
+
{ url = "https://files.pythonhosted.org/packages/10/99/781fe0c827be2742bcc775efefccb3b048a3a9c6ce9aec0cbf4a101677e5/pytz-2026.1.post1-py2.py3-none-any.whl", hash = "sha256:f2fd16142fda348286a75e1a524be810bb05d444e5a081f37f7affc635035f7a", size = 510489, upload-time = "2026-03-03T07:47:49.167Z" },
|
|
3971
|
+
]
|
|
3972
|
+
|
|
3885
3973
|
[[package]]
|
|
3886
3974
|
name = "pywin32"
|
|
3887
3975
|
version = "311"
|
|
@@ -4632,6 +4720,15 @@ wheels = [
|
|
|
4632
4720
|
{ url = "https://files.pythonhosted.org/packages/7c/8e/ffd20e179cc8218465599922660323f453c7b955aca2b909e5b86ba61eb0/strawberry_graphql-0.287.3-py3-none-any.whl", hash = "sha256:2bb1f9b122ef1213f82f01cf27a095eb0776fda78e12af9e60c54de6e543797c", size = 309183, upload-time = "2025-12-12T11:50:20.574Z" },
|
|
4633
4721
|
]
|
|
4634
4722
|
|
|
4723
|
+
[[package]]
|
|
4724
|
+
name = "structlog"
|
|
4725
|
+
version = "25.5.0"
|
|
4726
|
+
source = { registry = "https://pypi.org/simple" }
|
|
4727
|
+
sdist = { url = "https://files.pythonhosted.org/packages/ef/52/9ba0f43b686e7f3ddfeaa78ac3af750292662284b3661e91ad5494f21dbc/structlog-25.5.0.tar.gz", hash = "sha256:098522a3bebed9153d4570c6d0288abf80a031dfdb2048d59a49e9dc2190fc98", size = 1460830, upload-time = "2025-10-27T08:28:23.028Z" }
|
|
4728
|
+
wheels = [
|
|
4729
|
+
{ url = "https://files.pythonhosted.org/packages/a8/45/a132b9074aa18e799b891b91ad72133c98d8042c70f6240e4c5f9dabee2f/structlog-25.5.0-py3-none-any.whl", hash = "sha256:a8453e9b9e636ec59bd9e79bbd4a72f025981b3ba0f5837aebf48f02f37a7f9f", size = 72510, upload-time = "2025-10-27T08:28:21.535Z" },
|
|
4730
|
+
]
|
|
4731
|
+
|
|
4635
4732
|
[[package]]
|
|
4636
4733
|
name = "sympy"
|
|
4637
4734
|
version = "1.14.0"
|
|
@@ -4821,6 +4918,8 @@ dependencies = [
|
|
|
4821
4918
|
wheels = [
|
|
4822
4919
|
{ url = "https://files.pythonhosted.org/packages/0f/8b/4b61d6e13f7108f36910df9ab4b58fd389cc2520d54d81b88660804aad99/torch-2.10.0-2-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:418997cb02d0a0f1497cf6a09f63166f9f5df9f3e16c8a716ab76a72127c714f", size = 79423467, upload-time = "2026-02-10T21:44:48.711Z" },
|
|
4823
4920
|
{ url = "https://files.pythonhosted.org/packages/d3/54/a2ba279afcca44bbd320d4e73675b282fcee3d81400ea1b53934efca6462/torch-2.10.0-2-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:13ec4add8c3faaed8d13e0574f5cd4a323c11655546f91fbe6afa77b57423574", size = 79498202, upload-time = "2026-02-10T21:44:52.603Z" },
|
|
4921
|
+
{ url = "https://files.pythonhosted.org/packages/36/ab/7b562f1808d3f65414cd80a4f7d4bb00979d9355616c034c171249e1a303/torch-2.10.0-3-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:ac5bdcbb074384c66fa160c15b1ead77839e3fe7ed117d667249afce0acabfac", size = 915518691, upload-time = "2026-03-11T14:15:43.147Z" },
|
|
4922
|
+
{ url = "https://files.pythonhosted.org/packages/b3/7a/abada41517ce0011775f0f4eacc79659bc9bc6c361e6bfe6f7052a6b9363/torch-2.10.0-3-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:98c01b8bb5e3240426dcde1446eed6f40c778091c8544767ef1168fc663a05a6", size = 915622781, upload-time = "2026-03-11T14:17:11.354Z" },
|
|
4824
4923
|
{ url = "https://files.pythonhosted.org/packages/78/89/f5554b13ebd71e05c0b002f95148033e730d3f7067f67423026cc9c69410/torch-2.10.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:3282d9febd1e4e476630a099692b44fdc214ee9bf8ee5377732d9d9dfe5712e4", size = 145992610, upload-time = "2026-01-21T16:25:26.327Z" },
|
|
4825
4924
|
{ url = "https://files.pythonhosted.org/packages/ae/30/a3a2120621bf9c17779b169fc17e3dc29b230c29d0f8222f499f5e159aa8/torch-2.10.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a2f9edd8dbc99f62bc4dfb78af7bf89499bca3d753423ac1b4e06592e467b763", size = 915607863, upload-time = "2026-01-21T16:25:06.696Z" },
|
|
4826
4925
|
{ url = "https://files.pythonhosted.org/packages/6f/3d/c87b33c5f260a2a8ad68da7147e105f05868c281c63d65ed85aa4da98c66/torch-2.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:29b7009dba4b7a1c960260fc8ac85022c784250af43af9fb0ebafc9883782ebd", size = 113723116, upload-time = "2026-01-21T16:25:21.916Z" },
|
package/langwatch/dist/client/assets/{AnnotationsTable-BDAkYaz6.js → AnnotationsTable-uS_9SQ-g.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{Ss as n,Xo as r,Zo as ee,_ as i,_o as a,_s as o,bs as s,cs as c,ho as l,ns as u,qi as d,r as te,vo as f,vs as p,xs as m,ys as h}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=AnnotationsTable-
|
|
1
|
+
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{Ss as n,Xo as r,Zo as ee,_ as i,_o as a,_s as o,bs as s,cs as c,ho as l,ns as u,qi as d,r as te,vo as f,vs as p,xs as m,ys as h}from"./command-bar-DUK45yin.js";import{j as g,n as _}from"./stack-oJ9iWdbl.js";import{t as v}from"./box-BsM8YLGl.js";import{f as y}from"./LoadingScreen--vgXk5-2.js";import{t as b}from"./tooltip-AEm0YeiF.js";import{an as x}from"./dist-Cds4Mqhj.js";import{t as ne}from"./heading-D90dlSnH.js";import{t as S}from"./text-CwTrMF8x.js";import{t as C}from"./h-stack-BKLDJ2vg.js";import{t as w}from"./link-CwZhwOLq.js";import{t as T}from"./spacer-2LJJGbo8.js";import{t as E}from"./v-stack-EOPQ57OZ.js";import{t as D}from"./useAnnotationQueues-CA6Vk--V.js";import{r as O}from"./next-router-C6sliiV7.js";import{t as k}from"./useOrganizationTeamProject-DC0iozx2.js";import{n as A,t as j}from"./NavigationFooter-Dzvauw3l.js";import{t as M}from"./NoDataInfoBlock-CLKl_wlX.js";var N=e(t()),P=g(),re=({createdByUser:e,annotations:t})=>{let n=new Map;return e&&n.set(e.id,e),t.forEach(e=>{e.user&&n.set(e.user.id,e.user)}),(0,P.jsx)(C,{gap:2,children:Array.from(n.values()).map((e,t)=>(0,P.jsx)(l,{size:`2xs`,name:e.name??``,css:{border:`2px solid white`,"&:not(:first-of-type)":{marginLeft:`-20px`}}},e.id))})},F=({isDone:e,noDataTitle:t,noDataDescription:l,heading:g,tableHeader:F,queueId:I,showQueueAndUser:L,groupedAnnotations:R,allAnnotationsLoading:z})=>{let B=O(),{project:V}=k(),{scoreOptions:H}=D(),{openDrawer:U}=te(),W=A(),[G,K]=(0,N.useState)(`pending`),{assignedQueueItems:q,queuesLoading:J,totalCount:Y}=D({selectedAnnotations:G,queueId:I,showQueueAndUser:L}),X=R?R.map(e=>({id:e.traceId,doneAt:null,createdByUser:null,createdAt:e.trace?.timestamps?.started_at?new Date(e.trace.timestamps.started_at):new Date,traceId:e.traceId,trace:e.trace,annotations:e.annotations,scoreOptions:e.scoreOptions})):(e=>e.map(e=>({id:e.id,doneAt:e.doneAt?new Date(e.doneAt):null,createdByUser:e.createdByUser?{name:e.createdByUser.name,id:e.createdByUser.id}:null,createdAt:e.createdAt?new Date(e.createdAt):new Date,traceId:e.traceId,trace:e.trace||void 0,annotations:e.annotations||[],scoreOptions:e.scoreOptions||void 0})))(q||[]),ie=(e,t)=>{B.push(`/${V?.slug}/annotations/my-queue?queue-item=${e}&trace=${t}`)},Z=e=>{U(`traceDetails`,{traceId:e,showMessages:!0})},ae=(t,n,r)=>{e??r?Z(t):ie(n,t)},oe=(0,N.useMemo)(()=>H.data?H.data.filter(e=>e.active===!0).map(e=>e.id):[],[H.data]),se=(e,t)=>t.length>0&&e.length>0?t.map(t=>(0,P.jsx)(p,{minWidth:200,children:(0,P.jsx)(E,{divideX:`1px`,width:`full`,align:`start`,gap:2,children:e.map(e=>{let n=e.scoreOptions;return n?.[t]?.value?(0,P.jsx)(v,{children:(0,P.jsxs)(C,{gap:0,children:[Array.isArray(n[t]?.value)?(0,P.jsx)(C,{gap:1,wrap:`wrap`,children:(n[t]?.value).map((e,t)=>(0,P.jsx)(x,{children:e},t))}):(0,P.jsx)(x,{children:n[t]?.value}),n[t]?.reason&&(0,P.jsx)(b,{content:n[t]?.reason,children:(0,P.jsx)(ee,{width:16,height:16})})]})},e.id):null})})},t)):t.length>0?t.map((e,t)=>(0,P.jsx)(p,{minWidth:200},t)):(0,P.jsx)(p,{minWidth:200}),ce=()=>{U(`addAnnotationQueue`,{queueId:I})},Q=()=>R?R.some(e=>e.annotations.some(e=>e.expectedOutput)):X.some(e=>e.annotations?.some(e=>e.expectedOutput)),$=()=>R?.some(e=>e.annotations.some(e=>e.comment))?!0:X.some(e=>e.annotations?.some(e=>e.comment));return J||z?(0,P.jsxs)(E,{align:`start`,marginTop:4,width:`full`,padding:6,maxHeight:`100%`,children:[(0,P.jsxs)(C,{width:`full`,paddingBottom:4,alignItems:`flex-end`,children:[(0,P.jsx)(y,{height:`32px`,width:`200px`}),(0,P.jsx)(T,{}),(0,P.jsx)(y,{height:`32px`,width:`100px`})]}),(0,P.jsx)(v,{flex:1,width:`full`,overflowX:`auto`,children:(0,P.jsxs)(m,{variant:`line`,width:`full`,children:[(0,P.jsx)(s,{children:(0,P.jsx)(n,{children:Array.from({length:6}).map((e,t)=>(0,P.jsx)(h,{children:(0,P.jsx)(y,{height:`20px`,width:`100px`})},t))})}),(0,P.jsx)(o,{children:Array.from({length:3}).map((e,t)=>(0,P.jsx)(n,{children:Array.from({length:6}).map((e,t)=>(0,P.jsx)(p,{children:(0,P.jsx)(y,{height:`20px`,width:t===2||t===3?`200px`:`100px`})},t))},t))})]})})]}):(0,P.jsxs)(E,{align:`start`,marginTop:4,width:`full`,children:[(0,P.jsxs)(C,{width:`full`,paddingBottom:4,alignItems:`flex-end`,padding:6,children:[F||(0,P.jsx)(ne,{as:`h1`,size:`lg`,children:g}),(0,P.jsx)(T,{}),!e&&(0,P.jsxs)(d.Root,{children:[(0,P.jsx)(d.Trigger,{asChild:!0,children:(0,P.jsxs)(_,{variant:`outline`,children:[`Status `,(0,P.jsx)(c,{})]})}),(0,P.jsx)(d.Content,{children:(0,P.jsx)(f,{defaultValue:`pending`,value:G,onValueChange:e=>K(e.value??``),children:(0,P.jsxs)(E,{align:`start`,padding:3,gap:3,children:[(0,P.jsx)(a,{value:`pending`,children:`Pending`}),(0,P.jsx)(a,{value:`completed`,children:`Completed`}),(0,P.jsx)(a,{value:`all`,children:`All`})]})})})]}),I&&(0,P.jsxs)(d.Root,{children:[(0,P.jsx)(d.Trigger,{asChild:!0,children:(0,P.jsx)(_,{variant:`outline`,minWidth:0,children:(0,P.jsx)(r,{size:16})})}),(0,P.jsx)(d.Content,{children:(0,P.jsxs)(d.Item,{value:`edit`,onClick:()=>ce(),children:[(0,P.jsx)(u,{size:16}),` Edit queue`]})})]})]}),(0,P.jsx)(C,{align:`start`,gap:6,width:`full`,children:(0,P.jsx)(v,{flex:1,overflowX:`auto`,children:!J&&X.length==0?(0,P.jsx)(M,{title:t??`No annotations yet`,description:l??`Annotate your messages to add more context and improve your analysis.`,docsInfo:(0,P.jsxs)(S,{children:[`To get started with annotations, please visit our`,` `,(0,P.jsx)(w,{href:`https://docs.langwatch.ai/features/annotations`,isExternal:!0,color:`orange.400`,children:`documentation`}),`.`]}),icon:(0,P.jsx)(u,{})}):(0,P.jsx)(v,{width:`full`,maxWidth:`100%`,overflowX:`auto`,children:(0,P.jsxs)(m,{variant:`line`,children:[(0,P.jsx)(s,{children:(0,P.jsxs)(n,{children:[(0,P.jsx)(h,{}),!e&&(0,P.jsx)(h,{children:`Date created`}),(0,P.jsx)(h,{children:`Input`}),(0,P.jsx)(h,{children:`Output`}),Q()&&(0,P.jsx)(h,{children:`Expected Output`}),$()&&(0,P.jsx)(h,{children:`Comments`}),H.data&&H.data&&H.data.length>0&&H.data?.filter(e=>e.active===!0).map(e=>(0,P.jsx)(h,{children:e.name},e.id)),(0,P.jsx)(h,{children:`Trace Date`})]})}),(0,P.jsx)(o,{children:J?Array.from({length:3}).map((e,t)=>(0,P.jsx)(n,{children:Array.from({length:4}).map((e,t)=>(0,P.jsx)(p,{children:(0,P.jsx)(y,{height:`20px`})},t))},t)):X.length>0?X.map(t=>(0,P.jsxs)(n,{cursor:`pointer`,onClick:()=>ae(t.traceId,t.id,t.doneAt),backgroundColor:t.doneAt?`gray.50`:`white`,padding:2,children:[(0,P.jsx)(p,{children:(0,P.jsx)(b,{content:(0,P.jsxs)(E,{align:`start`,gap:0,children:[t.createdByUser&&(0,P.jsxs)(S,{marginBottom:2,children:[`Created by `,t.createdByUser.name]}),(0,P.jsx)(S,{children:`Comments by:`}),t.annotations.map(e=>e.user?.name).filter(e=>e!=null).filter((e,t,n)=>n.indexOf(e)===t).map(e=>(0,P.jsx)(S,{children:e},e))]}),children:(0,P.jsx)(C,{children:(0,P.jsx)(re,{createdByUser:t.createdByUser,annotations:t.annotations})})})}),!e&&(0,P.jsx)(p,{minWidth:150,children:(0,P.jsx)(S,{children:t.createdAt?`${t.createdAt.getDate()}/${t.createdAt.toLocaleDateString(`en-US`,{month:`short`})}`:`-`})}),(0,P.jsx)(p,{minWidth:350,children:(0,P.jsx)(i,{field:`input`,children:(0,P.jsx)(b,{content:t.trace?.input?.value??`<empty>`,children:(0,P.jsx)(S,{lineClamp:2,maxWidth:`350px`,textOverflow:`ellipsis`,wordBreak:`break-word`,children:t.trace?.input?.value??`<empty>`})})})}),(0,P.jsx)(p,{minWidth:350,children:(0,P.jsx)(i,{field:`output`,children:(0,P.jsx)(b,{content:t.trace?.output?.value??`<empty>`,children:(0,P.jsx)(S,{lineClamp:2,maxWidth:`350px`,textOverflow:`ellipsis`,wordBreak:`break-word`,children:t.trace?.output?.value??`<empty>`})})})}),Q()&&(0,P.jsx)(p,{minWidth:350,children:(0,P.jsx)(E,{align:`start`,gap:2,divideY:`1px`,children:t.annotations.map(e=>e.expectedOutput?(0,P.jsx)(S,{width:`full`,textAlign:`left`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,minWidth:400,paddingY:2,children:e.expectedOutput},e.id):null)})}),$()&&(0,P.jsx)(p,{minWidth:350,children:(0,P.jsx)(E,{align:`start`,gap:2,divideY:`1px`,children:t.annotations.map(e=>e.comment?(0,P.jsx)(S,{width:`full`,textAlign:`left`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,minWidth:400,paddingY:2,children:e.comment},e.id):null)})}),H.data&&H.data.length>0&&se(t.annotations,oe),(0,P.jsx)(p,{children:new Date(t.trace?.timestamps.started_at??``).toLocaleDateString()})]},t.id)):(0,P.jsx)(n,{children:(0,P.jsx)(p,{colSpan:5,children:(0,P.jsx)(S,{children:`No annotations found for selected filters.`})})})})]})})})}),(0,P.jsx)(j,{totalHits:R?R.length:Y,pageOffset:W.pageOffset,pageSize:W.pageSize,nextPage:W.nextPage,prevPage:W.prevPage,changePageSize:W.changePageSize})]})};export{F as t};
|
|
2
|
+
//# sourceMappingURL=AnnotationsTable-uS_9SQ-g.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{Bs as n,Dr as r,Vs as i,zs as a}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=BatchEvaluationSummary-
|
|
1
|
+
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{Bs as n,Dr as r,Vs as i,zs as a}from"./command-bar-DUK45yin.js";import{j as o}from"./stack-oJ9iWdbl.js";import"./tooltip-AEm0YeiF.js";import{t as s}from"./text-CwTrMF8x.js";import{t as c}from"./h-stack-BKLDJ2vg.js";import"./FormatMoney-CCygtAHg.js";t();var l=e(r()),u=o();function d({evaluationState:e,size:t=`xs`}){let r=e?.progress??0,o=e?.total??100,l=e?.status===`waiting`||!e?.total;return(0,u.jsxs)(c,{width:`full`,gap:4,children:[!l&&t!==`xs`&&(0,u.jsxs)(s,{whiteSpace:`nowrap`,children:[Math.round(r/o*100),`%`]}),(0,u.jsx)(n,{size:t,width:`full`,colorPalette:`blue`,value:l?null:r,max:o||void 0,animated:!0,striped:!0,children:(0,u.jsx)(i,{borderRadius:`sm`,children:(0,u.jsx)(a,{})})}),!l&&t!==`xs`&&(0,u.jsxs)(s,{whiteSpace:`nowrap`,children:[r,` / `,o]})]})}var f=(e,t)=>{if(e.finishedAt)return e.finishedAt;if(t-new Date(e.updatedAt).getTime()>120*1e3)return new Date(e.updatedAt).getTime()},p=(e,t=!1)=>e.averagePassed===void 0?(0,l.default)(e.averageScore).format(`0.[00]`):(0,l.default)(e.averagePassed).format(`0.[0]%`)+(t?` `:` pass`)+(t||e.averagePassed==e.averageScore?``:` (${(0,l.default)(e.averageScore).format(`0.0[0]`)} avg. score)`);export{f as n,d as r,p as t};
|
|
2
|
+
//# sourceMappingURL=BatchEvaluationSummary-DtFd8yKJ.js.map
|
package/langwatch/dist/client/assets/{BudgetEditDrawer-CHaqmdIl.js → BudgetEditDrawer-CHEPz0hH.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{Do as n,gs as r}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=BudgetEditDrawer-
|
|
1
|
+
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{Do as n,gs as r}from"./command-bar-DUK45yin.js";import{j as i,n as a}from"./stack-oJ9iWdbl.js";import{n as o}from"./toaster-C_DYALhL.js";import{r as s,t as c}from"./native-select-B51i56CE.js";import{t as l}from"./text-CwTrMF8x.js";import{a as u,n as d,r as f}from"./field-CnUiixMS.js";import{t as p}from"./input-C7emsUCL.js";import{t as m}from"./h-stack-BKLDJ2vg.js";import{t as h}from"./spacer-2LJJGbo8.js";import{t as g}from"./v-stack-EOPQ57OZ.js";import{s as _}from"./auth-client-D3UhxhQi.js";import{t as v}from"./useOrganizationTeamProject-DC0iozx2.js";import{n as y}from"./ConfirmDialog-M94yLNvP.js";var b=e(t()),x=i();function S({budget:e,onOpenChange:t,onSaved:i}){let{organization:S}=v(),[C,w]=(0,b.useState)(``),[T,E]=(0,b.useState)(``),[D,O]=(0,b.useState)(``),[k,A]=(0,b.useState)(`BLOCK`);(0,b.useEffect)(()=>{e&&(w(e.name),E(e.description??``),O(e.limitUsd),A(e.onBreach))},[e]);let j=_.useContext(),M=_.gatewayBudgets.update.useMutation({onSuccess:async()=>{S?.id&&await j.gatewayBudgets.list.invalidate({organizationId:S.id})}}),N=()=>{M.isPending||t(!1)};return(0,x.jsx)(n.Root,{open:!!e,onOpenChange:()=>N(),placement:`end`,size:`md`,children:(0,x.jsxs)(n.Content,{children:[(0,x.jsxs)(n.Header,{children:[(0,x.jsx)(n.Title,{children:`Edit budget`}),(0,x.jsx)(n.CloseTrigger,{})]}),(0,x.jsx)(n.Body,{children:(0,x.jsxs)(g,{align:`stretch`,gap:4,children:[(0,x.jsxs)(u,{required:!0,children:[(0,x.jsxs)(f,{children:[`Name`,(0,x.jsx)(y,{description:`Short identifier shown in /gateway/usage and audit log. Rename is non-breaking; scope and window are immutable below.`,docHref:`/ai-gateway/budgets#creating-a-budget`})]}),(0,x.jsx)(p,{value:C,onChange:e=>w(e.target.value),autoFocus:!0})]}),(0,x.jsxs)(u,{children:[(0,x.jsx)(f,{children:`Description`}),(0,x.jsx)(r,{value:T,onChange:e=>E(e.target.value)})]}),(0,x.jsxs)(u,{children:[(0,x.jsx)(f,{children:`Scope`}),(0,x.jsxs)(l,{fontSize:`sm`,color:`fg.muted`,children:[e?.scopeType.toLowerCase(),` (immutable after create)`]})]}),(0,x.jsxs)(u,{children:[(0,x.jsx)(f,{children:`Window`}),(0,x.jsxs)(l,{fontSize:`sm`,color:`fg.muted`,children:[e?.window.toLowerCase(),` (immutable after create)`]})]}),(0,x.jsxs)(u,{required:!0,children:[(0,x.jsxs)(f,{children:[`Limit (USD)`,(0,x.jsx)(y,{description:`Hard cap for the chosen window. Debits accrue in real time against provider-reported cost. Crossing the cap triggers the on_breach action (BLOCK or WARN).`,docHref:`/ai-gateway/budgets#creating-a-budget`})]}),(0,x.jsx)(p,{value:D,onChange:e=>O(e.target.value),inputMode:`decimal`}),(0,x.jsx)(d,{children:`Raising the limit does not reset the window. Lowering it may cause the budget to enter breach immediately if current spend already exceeds the new value.`})]}),(0,x.jsxs)(u,{required:!0,children:[(0,x.jsxs)(f,{children:[`On breach`,(0,x.jsx)(y,{description:`BLOCK: reject new requests with 402 budget_exceeded. WARN: trace annotation only, no user-facing error — useful for soft budgets where ops monitors spend without enforcing a hard cap.`,docHref:`/ai-gateway/budgets#on_breach`})]}),(0,x.jsx)(s,{size:`sm`,children:(0,x.jsxs)(c,{value:k,onChange:e=>A(e.target.value??`BLOCK`),children:[(0,x.jsx)(`option`,{value:`BLOCK`,children:`Block — reject requests at limit`}),(0,x.jsx)(`option`,{value:`WARN`,children:`Warn — tag responses, keep serving`})]})})]})]})}),(0,x.jsx)(n.Footer,{children:(0,x.jsxs)(m,{width:`full`,children:[(0,x.jsx)(h,{}),(0,x.jsx)(a,{variant:`ghost`,onClick:N,disabled:M.isPending,children:`Cancel`}),(0,x.jsx)(a,{colorPalette:`orange`,onClick:async()=>{if(!e||!S)return;if(!C||!D){o.create({title:`Name and limit are required`,type:`error`});return}let n=Number.parseFloat(D);if(!Number.isFinite(n)||n<=0){o.create({title:`Limit must be a positive number`,type:`error`});return}try{await M.mutateAsync({organizationId:S.id,id:e.id,name:C,description:T||null,limitUsd:D,onBreach:k}),i(),t(!1)}catch(e){o.create({title:e instanceof Error?e.message:`Failed to update budget`,type:`error`})}},loading:M.isPending,disabled:!C||!D,children:`Save changes`})]})})]})})}export{S as t};
|
|
2
|
+
//# sourceMappingURL=BudgetEditDrawer-CHEPz0hH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ps as e}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=ChartCard-
|
|
1
|
+
import{ps as e}from"./command-bar-DUK45yin.js";import{j as t}from"./stack-oJ9iWdbl.js";import{s as n}from"./tabs-DwV1cIZB.js";import{t as r}from"./heading-D90dlSnH.js";import{t as i}from"./h-stack-BKLDJ2vg.js";import{n as a,r as o,t as s}from"./card-CMtKVPVl.js";var c=t();function l({title:t,children:l,colSpan:u}){return(0,c.jsx)(n,{colSpan:u,display:`inline-grid`,children:(0,c.jsxs)(o,{children:[(0,c.jsx)(a,{children:(0,c.jsxs)(i,{gap:2,children:[(0,c.jsx)(e,{color:`orange`}),(0,c.jsx)(r,{size:`sm`,children:t})]})}),(0,c.jsx)(s,{children:l})]})})}export{l as t};
|
|
2
|
+
//# sourceMappingURL=ChartCard-s5fMPo7b.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{t as n}from"./prop-types-DifpXm68.js";import{j as r,n as i,r as a}from"./stack-oJ9iWdbl.js";import{t as o}from"./box-BsM8YLGl.js";import{t as s}from"./tooltip-AEm0YeiF.js";import{n as c}from"./toaster-C_DYALhL.js";import{$t as l,Rt as u,V as d,f,i as p,in as m,n as h,o as g,r as _,u as v}from"./dist-SwV3YZv3.js";import{t as y}from"./text-CwTrMF8x.js";import{t as b}from"./input-C7emsUCL.js";import{t as x}from"./h-stack-BKLDJ2vg.js";import{t as S}from"./v-stack-EOPQ57OZ.js";import{g as C,m as ee,s as w}from"./auth-client-D3UhxhQi.js";import{t as T}from"./useOrganizationTeamProject-DC0iozx2.js";import{s as te}from"./index.esm-X7lxUoP1.js";import{n as E}from"./useWorkflowStore-e1wFCvo2.js";var D=e(t()),O=e(n());function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}function A(e,t){if(e==null)return{};var n=j(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function j(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var M=(0,D.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=A(e,[`color`,`size`]);return D.createElement(`svg`,k({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),D.createElement(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),D.createElement(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`}))});M.propTypes={color:O.default.string,size:O.default.oneOfType([O.default.string,O.default.number])},M.displayName=`Send`;var N=r(),P=C(`langwatch:wizard:usePostEvent`),F=null,I=({children:e})=>{let{project:t}=T(),{setSocketStatus:n,socketStatus:r}=E(h(e=>({setSocketStatus:e.setSocketStatus,socketStatus:e.socketStatus}))),{postEvent:i}=L();return(0,D.useEffect)(()=>{if(!t)return;let e=()=>{F=setTimeout(()=>{n(`connecting-python`)},1e4)},a=()=>{i({type:`is_alive`,payload:{}}),r===`connected`&&!F&&e()},o=setInterval(a,r===`connecting-python`?5e3:3e4);return r===`disconnected`&&(a(),n(`connecting-python`)),()=>{clearInterval(o)}},[i,t,n,r]),(0,N.jsx)(N.Fragment,{children:e})},L=()=>{let{project:e}=T(),t=E(),{socketStatus:n,setEvaluationState:r,setComponentExecutionState:i}=E(h(e=>({socketStatus:e.socketStatus,setEvaluationState:e.setEvaluationState,setComponentExecutionState:e.setComponentExecutionState}))),a=R({workflowStore:t,alertOnComponent:()=>void 0}),[o,s]=(0,D.useState)(!1);return{postEvent:(0,D.useCallback)(t=>{if(!e)return;s(!0);let n=e=>{ee(e)||(c.create({title:`Failed to post message`,description:e.message||`Unknown error`,type:`error`,duration:5e3,meta:{closable:!0}}),t.type===`execute_evaluation`&&r({status:`error`,run_id:void 0,error:e.message,timestamps:{finished_at:Date.now()}}),t.type===`execute_component`&&i(t.payload.node_id,{status:`error`,error:e.message,timestamps:{finished_at:Date.now()}}))};v({endpoint:`/api/workflows/post_event`,payload:{projectId:e.id,event:t},timeout:2e4,onEvent:e=>{P.debug({serverEvent:e,event:t},`received message`),a(e),e.type===`error`&&t.type===`execute_evaluation`&&r({status:`error`,run_id:void 0,error:e.payload.message,timestamps:{finished_at:Date.now()}})},shouldStopProcessing:e=>e.type===`error`,onError:n}).catch(n).finally(()=>{s(!1)})},[a,e,r]),isLoading:o,socketStatus:n}},R=({workflowStore:e,alertOnComponent:t})=>{let{setSocketStatus:n,getWorkflow:r,setComponentExecutionState:i,setWorkflowExecutionState:a,setEvaluationState:o,setOptimizationState:s,checkIfUnreachableErrorMessage:l,stopWorkflowIfRunning:u,setOpenResultsPanelRequest:d}=e,f=(0,D.useCallback)(e=>{e?.toLowerCase().includes(`stopped`)||e?.toLowerCase().includes(`interrupted`)?c.create({title:`Stopped`,description:e?.slice(0,140),type:`info`,meta:{closable:!0},duration:3e3}):c.create({title:`Error`,description:e?.slice(0,140),type:`error`,meta:{closable:!0},duration:5e3})},[]);return(0,D.useCallback)(p=>{switch(p.type){case`is_alive_response`:F&&=(clearTimeout(F),null),P.debug(`python is alive, setting status to connected`),n(`connected`);break;case`component_state_change`:P.debug({componentId:p.payload.component_id,status:p.payload.execution_state?.status},`component_state_change received`),i(p.payload.component_id,p.payload.execution_state),p.payload.execution_state?.status===`error`&&(l(p.payload.execution_state.error),t({componentId:p.payload.component_id,execution_state:p.payload.execution_state}));break;case`execution_state_change`:if(P.debug({status:p.payload.execution_state?.status},`execution_state_change received`),a(p.payload.execution_state),p.payload.execution_state?.status===`success`||p.payload.execution_state?.status===`error`){let t=r().state.execution?.until_node_id;t&&(e.setSelectedNode(t),e.setPropertiesExpanded(!0))}p.payload.execution_state?.status===`error`&&(f(p.payload.execution_state.error),u(p.payload.execution_state.error));break;case`evaluation_state_change`:case`evaluation_run_change`:{let e=p.type===`evaluation_state_change`?p.payload.evaluation_state:p.payload.evaluation_run;P.debug({status:e?.status,progress:e?.progress},`${p.type} received`);let t=r().state.evaluation;o(e),e?.status===`error`&&(f(e.error),t?.status!==`waiting`&&setTimeout(()=>{d(`evaluations`)},500));break}case`optimization_state_change`:let m=r().state.optimization;s(p.payload.optimization_state),p.payload.optimization_state?.status===`error`&&(f(p.payload.optimization_state.error),m?.status!==`waiting`&&setTimeout(()=>{d(`optimizations`)},500));break;case`error`:P.error({message:p.payload.message},`error event received from server`),l(p.payload.message),u(p.payload.message),f(p.payload.message);break;case`debug`:break;case`done`:P.debug(`stream completed (done event received)`);break;default:c.create({title:`Unknown message type on client`,description:p.type,type:`warning`,meta:{closable:!0},duration:5e3});break}},[t,f,l,r,i,o,d,s,n,a,u])},z={effort:`reasoning_effort`,thinkingLevel:`reasoning_effort`,reasoning_effort:`reasoning_effort`};function B(e){return z[e]??e}function V(e,t){if(!t)return;let n=g(e);return n?.reasoningConfig?.parameterName?{[B(n.reasoningConfig.parameterName)]:t}:{reasoning_effort:t}}function H(e){return e.reasoning??e.reasoning_effort??e.thinkingLevel??e.effort}function U(e){let t=V(e.model,e.reasoning);return{model:e.model,temperature:e.temperature,max_tokens:e.maxTokens,top_p:e.topP,frequency_penalty:e.frequencyPenalty,presence_penalty:e.presencePenalty,seed:e.seed,top_k:e.topK,min_p:e.minP,repetition_penalty:e.repetitionPenalty,...t,verbosity:e.verbosity,litellm_params:e.litellmParams}}function W(e){return e.map(e=>e.type===`signature`&&q(e.data)?G(e):e.type===`evaluator`&&ne(e.data)?K(e):e)}function G(e){let t=e.data,n=t.localPromptConfig,r=U({model:n.llm.model,temperature:n.llm.temperature,maxTokens:n.llm.maxTokens,topP:n.llm.topP,frequencyPenalty:n.llm.frequencyPenalty,presencePenalty:n.llm.presencePenalty,seed:n.llm.seed,topK:n.llm.topK,minP:n.llm.minP,repetitionPenalty:n.llm.repetitionPenalty,reasoning:n.llm.reasoning,verbosity:n.llm.verbosity,litellmParams:n.llm.litellmParams}),i=n.messages.find(e=>e.role===`system`),a=n.messages.filter(e=>e.role!==`system`),o=[{identifier:`llm`,type:`llm`,value:r},{identifier:`instructions`,type:`str`,value:i?.content??``},{identifier:`messages`,type:`chat_messages`,value:a.map(e=>({role:e.role,content:e.content}))}],s={...t,inputs:n.inputs.map(e=>({identifier:e.identifier,type:e.type})),outputs:n.outputs.map(e=>({identifier:e.identifier,type:e.type,...e.json_schema?{json_schema:e.json_schema}:{}})),parameters:o,localPromptConfig:void 0};return{...e,data:s}}function K(e){let t=e.data,n=t.localConfig,r=Object.entries(n.settings??{}).map(([e,t])=>({identifier:e,type:`str`,value:t})),i={...t,name:n.name??t.name,parameters:r,localConfig:void 0};return{...e,data:i}}function q(e){return`localPromptConfig`in e&&e.localPromptConfig!==void 0&&e.localPromptConfig!==null}function ne(e){return`localConfig`in e&&e.localConfig!==void 0&&e.localConfig!==null}var J=C(`langwatch:studio:execution`),Y=()=>{let{postEvent:e,socketStatus:t}=L(),[n,r]=(0,D.useState)(null),{getWorkflow:i,setWorkflowExecutionState:a}=E(e=>({getWorkflow:e.getWorkflow,setWorkflowExecutionState:e.setWorkflowExecutionState})),o=(0,D.useCallback)(()=>t===`connected`?!0:(c.create({title:`Studio is not connected yet`,type:`error`,duration:5e3,meta:{closable:!0}}),!1),[t]);return(0,D.useEffect)(()=>{let e=i();n&&e.state.execution?.trace_id===n.trace_id&&e.state.execution?.status===n.timeout_on_status&&(J.warn({trace_id:n.trace_id,timeout_on_status:n.timeout_on_status},`workflow execution timeout triggered`),a({status:`error`,error:`Timeout`,timestamps:{finished_at:Date.now()}}),c.create({title:`Timeout ${n.timeout_on_status===`waiting`?`starting`:`stopping`} workflow execution`,type:`error`,duration:5e3,meta:{closable:!0}}))},[n,a,i]),{startWorkflowExecution:(0,D.useCallback)(({untilNodeId:t,inputs:n})=>{if(!o())return;let s=u();J.info({trace_id:s,untilNodeId:t},`workflow execution starting`),a({status:`waiting`,trace_id:s,until_node_id:t});let c=i();e({type:`execute_flow`,payload:{trace_id:s,workflow:{...c,nodes:W(c.nodes)},until_node_id:t,inputs:n,manual_execution_mode:!0,origin:`workflow`}}),setTimeout(()=>{r({trace_id:s,timeout_on_status:`waiting`})},2e4)},[o,i,e,a]),stopWorkflowExecution:(0,D.useCallback)(({trace_id:t})=>{if(o()){if(J.info({trace_id:t},`workflow execution stopping`),i().state.execution?.status===`waiting`){a({status:`idle`,trace_id:void 0});return}e({type:`stop_execution`,payload:{trace_id:t}}),setTimeout(()=>{r({trace_id:t,timeout_on_status:`running`})},1e4)}},[o,a,e,i])}};function X({isLoading:e}){let{executionState:t}=E(({state:e})=>({executionState:e.execution})),{stopWorkflowExecution:n}=Y(),r=t?.status===`running`,s=t?.status===`waiting`;return!r&&!s&&!e?null:(0,N.jsx)(o,{paddingLeft:2,children:r||e?(0,N.jsxs)(x,{children:[(0,N.jsx)(a,{size:`xs`}),(0,N.jsx)(y,{fontSize:`13px`,children:`Running...`}),(0,N.jsx)(i,{size:`xs`,onClick:()=>n({trace_id:t?.trace_id??``}),children:`Stop`})]}):s?(0,N.jsxs)(x,{children:[(0,N.jsx)(a,{size:`xs`}),(0,N.jsx)(y,{fontSize:`13px`,children:`Waiting for runtime...`})]}):null})}var re=({nodes:e,edges:t,executionStatus:n})=>{let{socketStatus:r}=L(),a=r!==`connected`,{playgroundOpen:o,setPlaygroundOpen:c}=E(e=>({playgroundOpen:e.playgroundOpen,setPlaygroundOpen:e.setPlaygroundOpen}));return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(s,{content:a?`Studio is not connected`:void 0,children:(0,N.jsxs)(i,{onClick:()=>c(!0),variant:`outline`,size:`sm`,background:`bg`,disabled:a,children:[(0,N.jsx)(l,{size:16}),` Playground`]})}),(0,N.jsx)(Z,{open:o,onClose:()=>c(!1),nodes:e,edges:t,executionStatus:n})]})},Z=({open:e,onClose:t,nodes:n,edges:r,executionStatus:i})=>(0,N.jsx)(f.Root,{open:e,onOpenChange:({open:e})=>{e||t()},size:`5xl`,children:(0,N.jsxs)(f.Content,{height:`65vh`,overflowY:`auto`,children:[(0,N.jsxs)(f.Header,{children:[(0,N.jsx)(f.Title,{children:`Test Message`}),(0,N.jsx)(f.CloseTrigger,{})]}),(0,N.jsx)(f.Body,{children:(0,N.jsx)(Q,{isOpen:e,nodes:n,edges:r,executionStatus:i})}),(0,N.jsx)(f.Footer,{})]})}),ie=e=>{let[t,n]=(0,D.useState)(()=>e.reduce((e,t)=>{let n=t.sourceHandle?.split(`.`)[1]??``;return{...e,[n]:``}},{}));return{inputs:t,handleInputChange:(0,D.useCallback)((e,t)=>{n(n=>({...n,[e]:t}))},[])}},Q=({workflowId:e,isOpen:t,useApi:n,nodes:r,edges:i,executionStatus:a})=>{let{getWorkflow:s}=E(e=>({getWorkflow:e.getWorkflow})),{project:c}=T(),{startWorkflowExecution:l}=Y(),u=w.optimization.chat.useMutation(),f=s(),[p,h]=(0,D.useState)([]),g=d(i,r);(0,D.useEffect)(()=>{if(a===`success`){let e=f.state.execution?.result;if(e&&typeof e==`object`){let t=Object.entries(e.end).map(([e,t])=>`${e}: ${t}`).join(`
|
|
1
|
+
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{t as n}from"./prop-types-DifpXm68.js";import{j as r,n as i,r as a}from"./stack-oJ9iWdbl.js";import{t as o}from"./box-BsM8YLGl.js";import{t as s}from"./tooltip-AEm0YeiF.js";import{n as c}from"./toaster-C_DYALhL.js";import{$t as l,Rt as u,V as d,f,i as p,in as m,n as h,o as g,r as _,u as v}from"./dist-Cds4Mqhj.js";import{t as y}from"./text-CwTrMF8x.js";import{t as b}from"./input-C7emsUCL.js";import{t as x}from"./h-stack-BKLDJ2vg.js";import{t as S}from"./v-stack-EOPQ57OZ.js";import{g as C,m as ee,s as w}from"./auth-client-D3UhxhQi.js";import{t as T}from"./useOrganizationTeamProject-DC0iozx2.js";import{s as te}from"./index.esm-X7lxUoP1.js";import{n as E}from"./useWorkflowStore-QUJ3J8X9.js";var D=e(t()),O=e(n());function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}function A(e,t){if(e==null)return{};var n=j(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function j(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var M=(0,D.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=A(e,[`color`,`size`]);return D.createElement(`svg`,k({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),D.createElement(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),D.createElement(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`}))});M.propTypes={color:O.default.string,size:O.default.oneOfType([O.default.string,O.default.number])},M.displayName=`Send`;var N=r(),P=C(`langwatch:wizard:usePostEvent`),F=null,I=({children:e})=>{let{project:t}=T(),{setSocketStatus:n,socketStatus:r}=E(h(e=>({setSocketStatus:e.setSocketStatus,socketStatus:e.socketStatus}))),{postEvent:i}=L();return(0,D.useEffect)(()=>{if(!t)return;let e=()=>{F=setTimeout(()=>{n(`connecting-python`)},1e4)},a=()=>{i({type:`is_alive`,payload:{}}),r===`connected`&&!F&&e()},o=setInterval(a,r===`connecting-python`?5e3:3e4);return r===`disconnected`&&(a(),n(`connecting-python`)),()=>{clearInterval(o)}},[i,t,n,r]),(0,N.jsx)(N.Fragment,{children:e})},L=()=>{let{project:e}=T(),t=E(),{socketStatus:n,setEvaluationState:r,setComponentExecutionState:i}=E(h(e=>({socketStatus:e.socketStatus,setEvaluationState:e.setEvaluationState,setComponentExecutionState:e.setComponentExecutionState}))),a=R({workflowStore:t,alertOnComponent:()=>void 0}),[o,s]=(0,D.useState)(!1);return{postEvent:(0,D.useCallback)(t=>{if(!e)return;s(!0);let n=e=>{ee(e)||(c.create({title:`Failed to post message`,description:e.message||`Unknown error`,type:`error`,duration:5e3,meta:{closable:!0}}),t.type===`execute_evaluation`&&r({status:`error`,run_id:void 0,error:e.message,timestamps:{finished_at:Date.now()}}),t.type===`execute_component`&&i(t.payload.node_id,{status:`error`,error:e.message,timestamps:{finished_at:Date.now()}}))};v({endpoint:`/api/workflows/post_event`,payload:{projectId:e.id,event:t},timeout:2e4,onEvent:e=>{P.debug({serverEvent:e,event:t},`received message`),a(e),e.type===`error`&&t.type===`execute_evaluation`&&r({status:`error`,run_id:void 0,error:e.payload.message,timestamps:{finished_at:Date.now()}})},shouldStopProcessing:e=>e.type===`error`,onError:n}).catch(n).finally(()=>{s(!1)})},[a,e,r]),isLoading:o,socketStatus:n}},R=({workflowStore:e,alertOnComponent:t})=>{let{setSocketStatus:n,getWorkflow:r,setComponentExecutionState:i,setWorkflowExecutionState:a,setEvaluationState:o,setOptimizationState:s,checkIfUnreachableErrorMessage:l,stopWorkflowIfRunning:u,setOpenResultsPanelRequest:d}=e,f=(0,D.useCallback)(e=>{e?.toLowerCase().includes(`stopped`)||e?.toLowerCase().includes(`interrupted`)?c.create({title:`Stopped`,description:e?.slice(0,140),type:`info`,meta:{closable:!0},duration:3e3}):c.create({title:`Error`,description:e?.slice(0,140),type:`error`,meta:{closable:!0},duration:5e3})},[]);return(0,D.useCallback)(p=>{switch(p.type){case`is_alive_response`:F&&=(clearTimeout(F),null),P.debug(`python is alive, setting status to connected`),n(`connected`);break;case`component_state_change`:P.debug({componentId:p.payload.component_id,status:p.payload.execution_state?.status},`component_state_change received`),i(p.payload.component_id,p.payload.execution_state),p.payload.execution_state?.status===`error`&&(l(p.payload.execution_state.error),t({componentId:p.payload.component_id,execution_state:p.payload.execution_state}));break;case`execution_state_change`:if(P.debug({status:p.payload.execution_state?.status},`execution_state_change received`),a(p.payload.execution_state),p.payload.execution_state?.status===`success`||p.payload.execution_state?.status===`error`){let t=r().state.execution?.until_node_id;t&&(e.setSelectedNode(t),e.setPropertiesExpanded(!0))}p.payload.execution_state?.status===`error`&&(f(p.payload.execution_state.error),u(p.payload.execution_state.error));break;case`evaluation_state_change`:case`evaluation_run_change`:{let e=p.type===`evaluation_state_change`?p.payload.evaluation_state:p.payload.evaluation_run;P.debug({status:e?.status,progress:e?.progress},`${p.type} received`);let t=r().state.evaluation;o(e),e?.status===`error`&&(f(e.error),t?.status!==`waiting`&&setTimeout(()=>{d(`evaluations`)},500));break}case`optimization_state_change`:let m=r().state.optimization;s(p.payload.optimization_state),p.payload.optimization_state?.status===`error`&&(f(p.payload.optimization_state.error),m?.status!==`waiting`&&setTimeout(()=>{d(`optimizations`)},500));break;case`error`:P.error({message:p.payload.message},`error event received from server`),l(p.payload.message),u(p.payload.message),f(p.payload.message);break;case`debug`:break;case`done`:P.debug(`stream completed (done event received)`);break;default:c.create({title:`Unknown message type on client`,description:p.type,type:`warning`,meta:{closable:!0},duration:5e3});break}},[t,f,l,r,i,o,d,s,n,a,u])},z={effort:`reasoning_effort`,thinkingLevel:`reasoning_effort`,reasoning_effort:`reasoning_effort`};function B(e){return z[e]??e}function V(e,t){if(!t)return;let n=g(e);return n?.reasoningConfig?.parameterName?{[B(n.reasoningConfig.parameterName)]:t}:{reasoning_effort:t}}function H(e){return e.reasoning??e.reasoning_effort??e.thinkingLevel??e.effort}function U(e){let t=V(e.model,e.reasoning);return{model:e.model,temperature:e.temperature,max_tokens:e.maxTokens,top_p:e.topP,frequency_penalty:e.frequencyPenalty,presence_penalty:e.presencePenalty,seed:e.seed,top_k:e.topK,min_p:e.minP,repetition_penalty:e.repetitionPenalty,...t,verbosity:e.verbosity,litellm_params:e.litellmParams}}function W(e){return e.map(e=>e.type===`signature`&&q(e.data)?G(e):e.type===`evaluator`&&ne(e.data)?K(e):e)}function G(e){let t=e.data,n=t.localPromptConfig,r=U({model:n.llm.model,temperature:n.llm.temperature,maxTokens:n.llm.maxTokens,topP:n.llm.topP,frequencyPenalty:n.llm.frequencyPenalty,presencePenalty:n.llm.presencePenalty,seed:n.llm.seed,topK:n.llm.topK,minP:n.llm.minP,repetitionPenalty:n.llm.repetitionPenalty,reasoning:n.llm.reasoning,verbosity:n.llm.verbosity,litellmParams:n.llm.litellmParams}),i=n.messages.find(e=>e.role===`system`),a=n.messages.filter(e=>e.role!==`system`),o=[{identifier:`llm`,type:`llm`,value:r},{identifier:`instructions`,type:`str`,value:i?.content??``},{identifier:`messages`,type:`chat_messages`,value:a.map(e=>({role:e.role,content:e.content}))}],s={...t,inputs:n.inputs.map(e=>({identifier:e.identifier,type:e.type})),outputs:n.outputs.map(e=>({identifier:e.identifier,type:e.type,...e.json_schema?{json_schema:e.json_schema}:{}})),parameters:o,localPromptConfig:void 0};return{...e,data:s}}function K(e){let t=e.data,n=t.localConfig,r=Object.entries(n.settings??{}).map(([e,t])=>({identifier:e,type:`str`,value:t})),i={...t,name:n.name??t.name,parameters:r,localConfig:void 0};return{...e,data:i}}function q(e){return`localPromptConfig`in e&&e.localPromptConfig!==void 0&&e.localPromptConfig!==null}function ne(e){return`localConfig`in e&&e.localConfig!==void 0&&e.localConfig!==null}var J=C(`langwatch:studio:execution`),Y=()=>{let{postEvent:e,socketStatus:t}=L(),[n,r]=(0,D.useState)(null),{getWorkflow:i,setWorkflowExecutionState:a}=E(e=>({getWorkflow:e.getWorkflow,setWorkflowExecutionState:e.setWorkflowExecutionState})),o=(0,D.useCallback)(()=>t===`connected`?!0:(c.create({title:`Studio is not connected yet`,type:`error`,duration:5e3,meta:{closable:!0}}),!1),[t]);return(0,D.useEffect)(()=>{let e=i();n&&e.state.execution?.trace_id===n.trace_id&&e.state.execution?.status===n.timeout_on_status&&(J.warn({trace_id:n.trace_id,timeout_on_status:n.timeout_on_status},`workflow execution timeout triggered`),a({status:`error`,error:`Timeout`,timestamps:{finished_at:Date.now()}}),c.create({title:`Timeout ${n.timeout_on_status===`waiting`?`starting`:`stopping`} workflow execution`,type:`error`,duration:5e3,meta:{closable:!0}}))},[n,a,i]),{startWorkflowExecution:(0,D.useCallback)(({untilNodeId:t,inputs:n})=>{if(!o())return;let s=u();J.info({trace_id:s,untilNodeId:t},`workflow execution starting`),a({status:`waiting`,trace_id:s,until_node_id:t});let c=i();e({type:`execute_flow`,payload:{trace_id:s,workflow:{...c,nodes:W(c.nodes)},until_node_id:t,inputs:n,manual_execution_mode:!0,origin:`workflow`}}),setTimeout(()=>{r({trace_id:s,timeout_on_status:`waiting`})},2e4)},[o,i,e,a]),stopWorkflowExecution:(0,D.useCallback)(({trace_id:t})=>{if(o()){if(J.info({trace_id:t},`workflow execution stopping`),i().state.execution?.status===`waiting`){a({status:`idle`,trace_id:void 0});return}e({type:`stop_execution`,payload:{trace_id:t}}),setTimeout(()=>{r({trace_id:t,timeout_on_status:`running`})},1e4)}},[o,a,e,i])}};function X({isLoading:e}){let{executionState:t}=E(({state:e})=>({executionState:e.execution})),{stopWorkflowExecution:n}=Y(),r=t?.status===`running`,s=t?.status===`waiting`;return!r&&!s&&!e?null:(0,N.jsx)(o,{paddingLeft:2,children:r||e?(0,N.jsxs)(x,{children:[(0,N.jsx)(a,{size:`xs`}),(0,N.jsx)(y,{fontSize:`13px`,children:`Running...`}),(0,N.jsx)(i,{size:`xs`,onClick:()=>n({trace_id:t?.trace_id??``}),children:`Stop`})]}):s?(0,N.jsxs)(x,{children:[(0,N.jsx)(a,{size:`xs`}),(0,N.jsx)(y,{fontSize:`13px`,children:`Waiting for runtime...`})]}):null})}var re=({nodes:e,edges:t,executionStatus:n})=>{let{socketStatus:r}=L(),a=r!==`connected`,{playgroundOpen:o,setPlaygroundOpen:c}=E(e=>({playgroundOpen:e.playgroundOpen,setPlaygroundOpen:e.setPlaygroundOpen}));return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(s,{content:a?`Studio is not connected`:void 0,children:(0,N.jsxs)(i,{onClick:()=>c(!0),variant:`outline`,size:`sm`,background:`bg`,disabled:a,children:[(0,N.jsx)(l,{size:16}),` Playground`]})}),(0,N.jsx)(Z,{open:o,onClose:()=>c(!1),nodes:e,edges:t,executionStatus:n})]})},Z=({open:e,onClose:t,nodes:n,edges:r,executionStatus:i})=>(0,N.jsx)(f.Root,{open:e,onOpenChange:({open:e})=>{e||t()},size:`5xl`,children:(0,N.jsxs)(f.Content,{height:`65vh`,overflowY:`auto`,children:[(0,N.jsxs)(f.Header,{children:[(0,N.jsx)(f.Title,{children:`Test Message`}),(0,N.jsx)(f.CloseTrigger,{})]}),(0,N.jsx)(f.Body,{children:(0,N.jsx)(Q,{isOpen:e,nodes:n,edges:r,executionStatus:i})}),(0,N.jsx)(f.Footer,{})]})}),ie=e=>{let[t,n]=(0,D.useState)(()=>e.reduce((e,t)=>{let n=t.sourceHandle?.split(`.`)[1]??``;return{...e,[n]:``}},{}));return{inputs:t,handleInputChange:(0,D.useCallback)((e,t)=>{n(n=>({...n,[e]:t}))},[])}},Q=({workflowId:e,isOpen:t,useApi:n,nodes:r,edges:i,executionStatus:a})=>{let{getWorkflow:s}=E(e=>({getWorkflow:e.getWorkflow})),{project:c}=T(),{startWorkflowExecution:l}=Y(),u=w.optimization.chat.useMutation(),f=s(),[p,h]=(0,D.useState)([]),g=d(i,r);(0,D.useEffect)(()=>{if(a===`success`){let e=f.state.execution?.result;if(e&&typeof e==`object`){let t=Object.entries(e.end).map(([e,t])=>`${e}: ${t}`).join(`
|
|
2
2
|
`);h([{input:[p[0]?.input??``].flat(),output:[t]}])}}},[a]),(0,D.useEffect)(()=>{t&&h([])},[t]);let{inputs:_,handleInputChange:v}=ie(g),b=()=>{let e=g.map(e=>{let t=e.sourceHandle?.split(`.`)[1];return t?`${t}: ${_[t]??``}`:``}).join(`
|
|
3
3
|
`);h([{input:[e],output:[``]}]),n?C(e):l({inputs:[_]})},C=async t=>{if(!e)return;let n=await u.mutateAsync({workflowId:e,inputMessages:[_],projectId:c?.id??``});if(n.status===`success`){let e=Object.entries(n.result).map(([e,t])=>`${e}: ${t}`).join(`
|
|
4
4
|
`);h([{input:[t],output:[e]}])}};return(0,N.jsxs)(x,{align:`start`,gap:1,height:`100%`,children:[(0,N.jsx)($,{inputs:_,handleInputChange:v,sendMultiMessage:b,isSingle:!1,entryInputs:g}),(0,N.jsxs)(S,{gap:4,align:`stretch`,width:`100%`,height:`100%`,border:`1px`,borderColor:`border`,borderRadius:`lg`,padding:2,children:[(0,N.jsx)(o,{flexGrow:1,overflowY:`auto`,children:p.map((e,t)=>(0,N.jsxs)(m,{flexDirection:`column`,width:`100%`,mb:4,children:[e.input.map((e,t)=>(0,N.jsx)(o,{alignSelf:`flex-end`,maxWidth:`70%`,mb:2,children:(0,N.jsx)(y,{bg:`blue.500`,color:`white`,p:2,borderRadius:`lg`,whiteSpace:`pre-wrap`,children:e})},`input-${t}`)),e.output.map((e,t)=>e||u.isLoading||a===`running`?(0,N.jsx)(o,{alignSelf:`flex-start`,maxWidth:`70%`,mb:2,children:(0,N.jsx)(o,{bg:`bg.emphasized`,p:2,borderRadius:`lg`,whiteSpace:`pre-wrap`,children:u.isLoading||a===`running`?(0,N.jsx)(X,{isLoading:u.isLoading}):e})},`output-${t}`):null)]},t))}),(0,N.jsx)($,{inputs:_,handleInputChange:v,sendMultiMessage:b,isSingle:!0,entryInputs:g})]})]})},$=({inputs:e,handleInputChange:t,sendMultiMessage:n,isSingle:r,entryInputs:a})=>{let{handleSubmit:o}=te(),s=()=>{n()};return!r&&a.length===1||r&&a.length>1?null:a&&a.length===1?(0,N.jsx)(p,{as:`form`,onSubmit:o(s),endElement:(0,N.jsx)(i,{size:`sm`,padding:2,colorPalette:`orange`,type:`submit`,children:(0,N.jsx)(M,{})}),children:(0,N.jsx)(b,{required:!0,value:e[0],onChange:e=>t(a[0]?.sourceHandle?.split(`.`)?.[1]??``,e.target.value),placeholder:`Send ${a[0]?.sourceHandle?.split(`.`)[1]} `,onKeyDown:e=>{e.key===`Enter`&&(s(),setTimeout(()=>{e.target.value=``},1))}})}):(0,N.jsxs)(S,{width:`xl`,border:`1px`,borderColor:`border`,borderRadius:`lg`,height:`100%`,padding:2,gap:4,justifyContent:`space-between`,as:`form`,onSubmit:o(s),children:[(0,N.jsx)(S,{gap:3,width:`full`,children:a.map((n,r)=>(0,N.jsxs)(S,{gap:1,children:[(0,N.jsx)(_,{children:n.sourceHandle?.split(`.`)[1]??`Input ${r+1}`}),(0,N.jsx)(b,{value:e[r],required:!0,onChange:e=>t(n.sourceHandle?.split(`.`)[1]??``,e.target.value)})]},r))}),(0,N.jsx)(i,{width:`full`,type:`submit`,colorPalette:`orange`,children:`Submit`})]})};export{Y as a,I as c,X as i,L as l,Z as n,W as o,re as r,H as s,Q as t};
|
|
5
|
-
//# sourceMappingURL=ChatWindow-
|
|
5
|
+
//# sourceMappingURL=ChatWindow-C0XSteVJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ChatWindow-C0XSteVJ.js";export{e as ChatBox};
|
package/langwatch/dist/client/assets/{ConfirmDialog-CXIhncvW.js → ConfirmDialog-M94yLNvP.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ca as e,xo as t}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=ConfirmDialog-
|
|
1
|
+
import{Ca as e,xo as t}from"./command-bar-DUK45yin.js";import{j as n,n as r}from"./stack-oJ9iWdbl.js";import{f as i}from"./dist-Cds4Mqhj.js";import{o as a}from"./terminal-CfM0q99k.js";import{i as o}from"./tracking-DbhAKeey.js";import{t as s}from"./text-CwTrMF8x.js";import{t as c}from"./h-stack-BKLDJ2vg.js";import{Pt as l}from"./lu-Bf6j_N19.js";import{t as u}from"./link-CwZhwOLq.js";import{t as d}from"./spacer-2LJJGbo8.js";import{t as f}from"./v-stack-EOPQ57OZ.js";var p=n(),m=`https://langwatch.ai/docs`;function h(e){return/^https?:\/\//i.test(e)?e:e.startsWith(`/`)?`${m}${e}`:`${m}/${e}`}function g({description:e,docHref:n,docLabel:r=`Read more`}){let i=n?h(n):void 0,d=i?/^https?:\/\//i.test(i):!1;return(0,p.jsxs)(t.Root,{positioning:{placement:`right-start`},children:[(0,p.jsx)(t.Trigger,{asChild:!0,children:(0,p.jsx)(l,{"aria-label":`More info`,size:`xs`,variant:`ghost`,color:`fg.muted`,marginLeft:1,minWidth:`auto`,height:`auto`,padding:0,children:(0,p.jsx)(a,{size:14})})}),(0,p.jsxs)(t.Content,{maxWidth:`sm`,children:[(0,p.jsx)(t.Arrow,{children:(0,p.jsx)(t.ArrowTip,{})}),(0,p.jsx)(t.Body,{children:(0,p.jsxs)(f,{align:`stretch`,gap:2,children:[(0,p.jsx)(s,{fontSize:`sm`,children:e}),i&&(0,p.jsx)(u,{href:i,color:`orange.600`,fontSize:`xs`,fontWeight:`medium`,isExternal:d,children:(0,p.jsxs)(c,{gap:1,display:`inline-flex`,children:[(0,p.jsx)(s,{as:`span`,children:r}),d&&(0,p.jsx)(o,{size:10})]})})]})})]})]})}function _({open:t,onOpenChange:n,title:a,message:o,confirmLabel:l=`Confirm`,tone:u=`danger`,loading:m=!1,onConfirm:h}){let g=u===`danger`?`red`:`orange`;return(0,p.jsx)(i.Root,{open:t,onOpenChange:e=>n(e.open),children:(0,p.jsxs)(i.Content,{maxWidth:`480px`,children:[(0,p.jsx)(i.Header,{children:(0,p.jsxs)(c,{gap:3,align:`start`,children:[(0,p.jsx)(e,{size:20,color:u===`danger`?`#E53E3E`:`#ED8936`}),(0,p.jsx)(f,{align:`start`,gap:0,children:(0,p.jsx)(i.Title,{children:a})})]})}),(0,p.jsx)(i.Body,{children:(0,p.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:o})}),(0,p.jsx)(i.Footer,{children:(0,p.jsxs)(c,{width:`full`,children:[(0,p.jsx)(d,{}),(0,p.jsx)(r,{variant:`ghost`,onClick:()=>n(!1),disabled:m,children:`Cancel`}),(0,p.jsx)(r,{colorPalette:g,onClick:h,loading:m,children:l})]})})]})})}export{g as n,_ as t};
|
|
2
|
+
//# sourceMappingURL=ConfirmDialog-M94yLNvP.js.map
|
package/langwatch/dist/client/assets/{ContactSalesBlock-CijLBwRC.js → ContactSalesBlock-CnnuZ8iI.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,n as t}from"./stack-oJ9iWdbl.js";import{in as n}from"./dist-
|
|
2
|
-
//# sourceMappingURL=ContactSalesBlock-
|
|
1
|
+
import{j as e,n as t}from"./stack-oJ9iWdbl.js";import{in as n}from"./dist-Cds4Mqhj.js";import{t as r}from"./text-CwTrMF8x.js";import{n as i}from"./code-FF_ibTVI.js";import{t as a}from"./h-stack-BKLDJ2vg.js";import{r as o,t as s}from"./card-CMtKVPVl.js";import{t as c}from"./link-CwZhwOLq.js";import{t as l}from"./simple-grid-C3IW90zo.js";import{t as u}from"./billing-plans-BUQp08MI.js";import{t as d}from"./constants-BT2q4NNM.js";var f=e();function p(){return(0,f.jsx)(o,{"data-testid":`contact-sales-block`,borderWidth:1,borderColor:`border`,children:(0,f.jsxs)(s,{paddingY:5,paddingX:6,children:[(0,f.jsx)(r,{fontWeight:`semibold`,fontSize:`lg`,children:`Need more?`}),(0,f.jsx)(l,{"data-testid":`enterprise-features-list`,templateColumns:{base:`1fr`,md:`1fr 1.4fr 1fr`},gap:2,marginTop:4,children:u.map(e=>(0,f.jsxs)(a,{gap:2,alignItems:`start`,children:[(0,f.jsx)(i,{size:16,color:`var(--chakra-colors-orange-solid)`}),(0,f.jsx)(r,{fontSize:`sm`,color:`fg.muted`,children:e})]},e))}),(0,f.jsx)(n,{justifyContent:`flex-end`,marginTop:6,children:(0,f.jsx)(t,{asChild:!0,variant:`outline`,size:`sm`,colorPalette:`orange`,children:(0,f.jsx)(c,{href:d,isExternal:!0,fontWeight:`semibold`,children:`Contact Sales`})})})]})})}export{p as t};
|
|
2
|
+
//# sourceMappingURL=ContactSalesBlock-CnnuZ8iI.js.map
|