@langfuse/core 5.10.0 → 5.10.2
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/dist/index.cjs +2357 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2722 -475
- package/dist/index.d.ts +2722 -475
- package/dist/index.mjs +2329 -119
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -393,23 +393,23 @@ interface GetAnnotationQueueItemsRequest {
|
|
|
393
393
|
limit?: number;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
type index$
|
|
397
|
-
type index$
|
|
398
|
-
type index$
|
|
399
|
-
declare const index$
|
|
400
|
-
declare const index$
|
|
401
|
-
type index$
|
|
402
|
-
type index$
|
|
403
|
-
type index$
|
|
404
|
-
type index$
|
|
405
|
-
type index$
|
|
406
|
-
type index$
|
|
407
|
-
type index$
|
|
408
|
-
type index$
|
|
409
|
-
type index$
|
|
410
|
-
type index$
|
|
411
|
-
declare namespace index$
|
|
412
|
-
export { type index$
|
|
396
|
+
type index$H_AnnotationQueue = AnnotationQueue;
|
|
397
|
+
type index$H_AnnotationQueueAssignmentRequest = AnnotationQueueAssignmentRequest;
|
|
398
|
+
type index$H_AnnotationQueueItem = AnnotationQueueItem;
|
|
399
|
+
declare const index$H_AnnotationQueueObjectType: typeof AnnotationQueueObjectType;
|
|
400
|
+
declare const index$H_AnnotationQueueStatus: typeof AnnotationQueueStatus;
|
|
401
|
+
type index$H_CreateAnnotationQueueAssignmentResponse = CreateAnnotationQueueAssignmentResponse;
|
|
402
|
+
type index$H_CreateAnnotationQueueItemRequest = CreateAnnotationQueueItemRequest;
|
|
403
|
+
type index$H_CreateAnnotationQueueRequest = CreateAnnotationQueueRequest;
|
|
404
|
+
type index$H_DeleteAnnotationQueueAssignmentResponse = DeleteAnnotationQueueAssignmentResponse;
|
|
405
|
+
type index$H_DeleteAnnotationQueueItemResponse = DeleteAnnotationQueueItemResponse;
|
|
406
|
+
type index$H_GetAnnotationQueueItemsRequest = GetAnnotationQueueItemsRequest;
|
|
407
|
+
type index$H_GetAnnotationQueuesRequest = GetAnnotationQueuesRequest;
|
|
408
|
+
type index$H_PaginatedAnnotationQueueItems = PaginatedAnnotationQueueItems;
|
|
409
|
+
type index$H_PaginatedAnnotationQueues = PaginatedAnnotationQueues;
|
|
410
|
+
type index$H_UpdateAnnotationQueueItemRequest = UpdateAnnotationQueueItemRequest;
|
|
411
|
+
declare namespace index$H {
|
|
412
|
+
export { type index$H_AnnotationQueue as AnnotationQueue, type index$H_AnnotationQueueAssignmentRequest as AnnotationQueueAssignmentRequest, type index$H_AnnotationQueueItem as AnnotationQueueItem, index$H_AnnotationQueueObjectType as AnnotationQueueObjectType, index$H_AnnotationQueueStatus as AnnotationQueueStatus, type index$H_CreateAnnotationQueueAssignmentResponse as CreateAnnotationQueueAssignmentResponse, type index$H_CreateAnnotationQueueItemRequest as CreateAnnotationQueueItemRequest, type index$H_CreateAnnotationQueueRequest as CreateAnnotationQueueRequest, type index$H_DeleteAnnotationQueueAssignmentResponse as DeleteAnnotationQueueAssignmentResponse, type index$H_DeleteAnnotationQueueItemResponse as DeleteAnnotationQueueItemResponse, type index$H_GetAnnotationQueueItemsRequest as GetAnnotationQueueItemsRequest, type index$H_GetAnnotationQueuesRequest as GetAnnotationQueuesRequest, type index$H_PaginatedAnnotationQueueItems as PaginatedAnnotationQueueItems, type index$H_PaginatedAnnotationQueues as PaginatedAnnotationQueues, type index$H_UpdateAnnotationQueueItemRequest as UpdateAnnotationQueueItemRequest };
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
/**
|
|
@@ -480,7 +480,7 @@ declare const BlobStorageExportFrequency: {
|
|
|
480
480
|
* - `OBSERVATIONS_V2`: same data model as the `/api/public/v2/observations` endpoint, plus scores. Columns are controlled by `exportFieldGroups`.
|
|
481
481
|
* - `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: both sets. Observation columns of both portions are controlled by `exportFieldGroups`.
|
|
482
482
|
*
|
|
483
|
-
* **Note:** `OBSERVATIONS_V2` and the enriched-observations portion of `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`
|
|
483
|
+
* **Note:** which sources a deployment accepts depends on how far it has moved to the v4 data model. `OBSERVATIONS_V2` and the enriched-observations portion of `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` read the enriched observations table, so they require a deployment that already populates it. `LEGACY_TRACES_OBSERVATIONS` and the legacy portion of `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` read the legacy traces and observations tables, so they require a deployment that still populates those. A deployment part-way through the migration populates both and accepts every source. Selecting a source the deployment cannot serve is rejected with `400`, rather than exporting an empty result. See https://langfuse.com/docs/v4.
|
|
484
484
|
*/
|
|
485
485
|
type BlobStorageExportSource = "LEGACY_TRACES_OBSERVATIONS" | "OBSERVATIONS_V2" | "LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS";
|
|
486
486
|
declare const BlobStorageExportSource: {
|
|
@@ -542,7 +542,7 @@ interface CreateBlobStorageIntegrationRequest {
|
|
|
542
542
|
/** Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true. */
|
|
543
543
|
compressed?: boolean;
|
|
544
544
|
/**
|
|
545
|
-
* Data to export. When omitted on update, the existing value is preserved. When omitted on create
|
|
545
|
+
* Data to export. When omitted on update, the existing value is preserved. When omitted on create, the default is `OBSERVATIONS_V2` on Langfuse Cloud, and on self-hosted deployments `LEGACY_TRACES_OBSERVATIONS` — or `OBSERVATIONS_V2` where the deployment no longer populates the legacy tables. The default is never a source the deployment cannot serve. Required when `exportFieldGroups` is provided.
|
|
546
546
|
*
|
|
547
547
|
* **Cloud-only project deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` for all new integrations. Self-hosted deployments are unaffected.
|
|
548
548
|
*
|
|
@@ -648,21 +648,21 @@ interface BlobStorageIntegrationDeletionResponse {
|
|
|
648
648
|
message: string;
|
|
649
649
|
}
|
|
650
650
|
|
|
651
|
-
declare const index$
|
|
652
|
-
declare const index$
|
|
653
|
-
declare const index$
|
|
654
|
-
declare const index$
|
|
655
|
-
type index$
|
|
656
|
-
declare const index$
|
|
657
|
-
declare const index$
|
|
658
|
-
type index$
|
|
659
|
-
type index$
|
|
660
|
-
declare const index$
|
|
661
|
-
type index$
|
|
662
|
-
declare const index$
|
|
663
|
-
type index$
|
|
664
|
-
declare namespace index$
|
|
665
|
-
export { index$
|
|
651
|
+
declare const index$G_BlobStorageExportFieldGroup: typeof BlobStorageExportFieldGroup;
|
|
652
|
+
declare const index$G_BlobStorageExportFrequency: typeof BlobStorageExportFrequency;
|
|
653
|
+
declare const index$G_BlobStorageExportMode: typeof BlobStorageExportMode;
|
|
654
|
+
declare const index$G_BlobStorageExportSource: typeof BlobStorageExportSource;
|
|
655
|
+
type index$G_BlobStorageIntegrationDeletionResponse = BlobStorageIntegrationDeletionResponse;
|
|
656
|
+
declare const index$G_BlobStorageIntegrationFileType: typeof BlobStorageIntegrationFileType;
|
|
657
|
+
declare const index$G_BlobStorageIntegrationFileTypeResponse: typeof BlobStorageIntegrationFileTypeResponse;
|
|
658
|
+
type index$G_BlobStorageIntegrationResponse = BlobStorageIntegrationResponse;
|
|
659
|
+
type index$G_BlobStorageIntegrationStatusResponse = BlobStorageIntegrationStatusResponse;
|
|
660
|
+
declare const index$G_BlobStorageIntegrationType: typeof BlobStorageIntegrationType;
|
|
661
|
+
type index$G_BlobStorageIntegrationsResponse = BlobStorageIntegrationsResponse;
|
|
662
|
+
declare const index$G_BlobStorageSyncStatus: typeof BlobStorageSyncStatus;
|
|
663
|
+
type index$G_CreateBlobStorageIntegrationRequest = CreateBlobStorageIntegrationRequest;
|
|
664
|
+
declare namespace index$G {
|
|
665
|
+
export { index$G_BlobStorageExportFieldGroup as BlobStorageExportFieldGroup, index$G_BlobStorageExportFrequency as BlobStorageExportFrequency, index$G_BlobStorageExportMode as BlobStorageExportMode, index$G_BlobStorageExportSource as BlobStorageExportSource, type index$G_BlobStorageIntegrationDeletionResponse as BlobStorageIntegrationDeletionResponse, index$G_BlobStorageIntegrationFileType as BlobStorageIntegrationFileType, index$G_BlobStorageIntegrationFileTypeResponse as BlobStorageIntegrationFileTypeResponse, type index$G_BlobStorageIntegrationResponse as BlobStorageIntegrationResponse, type index$G_BlobStorageIntegrationStatusResponse as BlobStorageIntegrationStatusResponse, index$G_BlobStorageIntegrationType as BlobStorageIntegrationType, type index$G_BlobStorageIntegrationsResponse as BlobStorageIntegrationsResponse, index$G_BlobStorageSyncStatus as BlobStorageSyncStatus, type index$G_CreateBlobStorageIntegrationRequest as CreateBlobStorageIntegrationRequest };
|
|
666
666
|
}
|
|
667
667
|
|
|
668
668
|
/**
|
|
@@ -677,7 +677,7 @@ interface CreateCommentRequest {
|
|
|
677
677
|
objectId: string;
|
|
678
678
|
/** The content of the comment. May include markdown. Currently limited to 5000 characters. */
|
|
679
679
|
content: string;
|
|
680
|
-
/** The id of the user who created the comment. */
|
|
680
|
+
/** The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown. */
|
|
681
681
|
authorUserId?: string;
|
|
682
682
|
}
|
|
683
683
|
|
|
@@ -718,12 +718,12 @@ interface GetCommentsRequest {
|
|
|
718
718
|
authorUserId?: string;
|
|
719
719
|
}
|
|
720
720
|
|
|
721
|
-
type index$
|
|
722
|
-
type index$
|
|
723
|
-
type index$
|
|
724
|
-
type index$
|
|
725
|
-
declare namespace index$
|
|
726
|
-
export type { index$
|
|
721
|
+
type index$F_CreateCommentRequest = CreateCommentRequest;
|
|
722
|
+
type index$F_CreateCommentResponse = CreateCommentResponse;
|
|
723
|
+
type index$F_GetCommentsRequest = GetCommentsRequest;
|
|
724
|
+
type index$F_GetCommentsResponse = GetCommentsResponse;
|
|
725
|
+
declare namespace index$F {
|
|
726
|
+
export type { index$F_CreateCommentRequest as CreateCommentRequest, index$F_CreateCommentResponse as CreateCommentResponse, index$F_GetCommentsRequest as GetCommentsRequest, index$F_GetCommentsResponse as GetCommentsResponse };
|
|
727
727
|
}
|
|
728
728
|
|
|
729
729
|
/**
|
|
@@ -1463,7 +1463,7 @@ interface DatasetRunWithItems extends DatasetRun {
|
|
|
1463
1463
|
*
|
|
1464
1464
|
* Models can have either simple flat pricing or tiered pricing:
|
|
1465
1465
|
* - Flat pricing: Single price per usage type (legacy, but still supported)
|
|
1466
|
-
* - Tiered pricing: Multiple pricing tiers with conditional matching based on usage patterns
|
|
1466
|
+
* - Tiered pricing: Multiple pricing tiers with conditional matching based on usage patterns or observation attributes
|
|
1467
1467
|
*
|
|
1468
1468
|
* The pricing tiers approach is recommended for models with usage-based pricing variations.
|
|
1469
1469
|
* When using tiered pricing, the flat price fields (inputPrice, outputPrice, prices) are populated
|
|
@@ -1500,10 +1500,10 @@ interface Model {
|
|
|
1500
1500
|
*/
|
|
1501
1501
|
prices: Record<string, ModelPrice>;
|
|
1502
1502
|
/**
|
|
1503
|
-
* Array of pricing tiers with conditional pricing based on usage thresholds.
|
|
1503
|
+
* Array of pricing tiers with conditional pricing based on usage thresholds or observation attributes.
|
|
1504
1504
|
*
|
|
1505
1505
|
* Pricing tiers enable accurate cost tracking for models that charge different rates based on usage patterns
|
|
1506
|
-
* (e.g.,
|
|
1506
|
+
* or request attributes (e.g., high-volume usage, large context windows, cached tokens, or service tiers).
|
|
1507
1507
|
*
|
|
1508
1508
|
* Each model must have exactly one default tier (isDefault=true, priority=0) that serves as a fallback.
|
|
1509
1509
|
* Additional conditional tiers can be defined with specific matching criteria.
|
|
@@ -1525,45 +1525,26 @@ interface ModelPrice {
|
|
|
1525
1525
|
*/
|
|
1526
1526
|
|
|
1527
1527
|
/**
|
|
1528
|
-
* Condition for matching a pricing tier
|
|
1529
|
-
*
|
|
1530
|
-
* How it works:
|
|
1531
|
-
* 1. The regex pattern matches against usage detail keys (e.g., "input_tokens", "input_cached")
|
|
1532
|
-
* 2. Values of all matching keys are summed together
|
|
1533
|
-
* 3. The sum is compared against the threshold value using the specified operator
|
|
1534
|
-
* 4. All conditions in a tier must be met (AND logic) for the tier to match
|
|
1528
|
+
* Condition for matching a pricing tier against usage details or observation attributes.
|
|
1535
1529
|
*
|
|
1536
|
-
*
|
|
1537
|
-
* - Threshold-based pricing: Match when accumulated usage exceeds a certain amount
|
|
1538
|
-
* - Usage-type-specific pricing: Different rates for cached vs non-cached tokens, or input vs output
|
|
1539
|
-
* - Volume-based pricing: Different rates based on total request or token count
|
|
1530
|
+
* Usage-detail conditions treat usageDetailPattern as a regex, sum all matching usage values, and compare the sum to the numeric value. Model-parameter and metadata conditions match an exact top-level key against one or more string values.
|
|
1540
1531
|
*/
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1532
|
+
type PricingTierCondition = PricingTierUsageCondition | PricingTierAttributeCondition;
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1536
|
+
*/
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* Condition that sums usage details whose keys match a regex.
|
|
1540
|
+
*/
|
|
1541
|
+
interface PricingTierUsageCondition {
|
|
1542
|
+
/** Regex pattern matched against usage detail keys. */
|
|
1552
1543
|
usageDetailPattern: string;
|
|
1553
|
-
/**
|
|
1554
|
-
* Comparison operator to apply between the summed value and the threshold.
|
|
1555
|
-
*
|
|
1556
|
-
* - gt: greater than (sum > threshold)
|
|
1557
|
-
* - gte: greater than or equal (sum >= threshold)
|
|
1558
|
-
* - lt: less than (sum < threshold)
|
|
1559
|
-
* - lte: less than or equal (sum <= threshold)
|
|
1560
|
-
* - eq: equal (sum == threshold)
|
|
1561
|
-
* - neq: not equal (sum != threshold)
|
|
1562
|
-
*/
|
|
1563
1544
|
operator: PricingTierOperator;
|
|
1564
|
-
/**
|
|
1545
|
+
/** Numeric threshold for the summed matching usage values. */
|
|
1565
1546
|
value: number;
|
|
1566
|
-
/** Whether the regex
|
|
1547
|
+
/** Whether the usage-detail regex is case-sensitive. */
|
|
1567
1548
|
caseSensitive: boolean;
|
|
1568
1549
|
}
|
|
1569
1550
|
|
|
@@ -1572,10 +1553,63 @@ interface PricingTierCondition {
|
|
|
1572
1553
|
*/
|
|
1573
1554
|
|
|
1574
1555
|
/**
|
|
1575
|
-
*
|
|
1556
|
+
* Condition that matches any configured value for a top-level observation attribute.
|
|
1557
|
+
*/
|
|
1558
|
+
interface PricingTierAttributeCondition {
|
|
1559
|
+
/** Observation attribute object evaluated by this condition. */
|
|
1560
|
+
source: PricingTierAttributeSource;
|
|
1561
|
+
/** Exact top-level attribute key. */
|
|
1562
|
+
key: string;
|
|
1563
|
+
/** Membership operator. */
|
|
1564
|
+
operator: "in";
|
|
1565
|
+
/** Accepted string attribute values. At least one value is required. */
|
|
1566
|
+
values: string[];
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
/**
|
|
1570
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1571
|
+
*/
|
|
1572
|
+
type PricingTierAttributeSource = "model_parameters" | "metadata";
|
|
1573
|
+
declare const PricingTierAttributeSource: {
|
|
1574
|
+
readonly ModelParameters: "model_parameters";
|
|
1575
|
+
readonly Metadata: "metadata";
|
|
1576
|
+
};
|
|
1577
|
+
|
|
1578
|
+
/**
|
|
1579
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1580
|
+
*/
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* Condition input for matching a pricing tier.
|
|
1584
|
+
*/
|
|
1585
|
+
type PricingTierConditionInput = PricingTierUsageConditionInput | PricingTierAttributeCondition;
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1589
|
+
*/
|
|
1590
|
+
|
|
1591
|
+
/**
|
|
1592
|
+
* Input condition that sums usage details whose keys match a regex.
|
|
1593
|
+
*/
|
|
1594
|
+
interface PricingTierUsageConditionInput {
|
|
1595
|
+
/** Regex pattern matched against usage detail keys. */
|
|
1596
|
+
usageDetailPattern: string;
|
|
1597
|
+
operator: PricingTierOperator;
|
|
1598
|
+
/** Numeric threshold for the summed matching usage values. */
|
|
1599
|
+
value: number;
|
|
1600
|
+
/** Whether the usage-detail regex is case-sensitive. Defaults to false. */
|
|
1601
|
+
caseSensitive?: boolean;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1606
|
+
*/
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* Pricing tier definition with conditional pricing based on usage thresholds or observation attributes.
|
|
1576
1610
|
*
|
|
1577
|
-
* Pricing tiers enable accurate cost tracking for LLM providers that charge different rates based on usage patterns.
|
|
1578
|
-
* For example, some providers charge higher rates when context size exceeds certain thresholds.
|
|
1611
|
+
* Pricing tiers enable accurate cost tracking for LLM providers that charge different rates based on usage patterns or request attributes.
|
|
1612
|
+
* For example, some providers charge higher rates when context size exceeds certain thresholds or when an accelerated service tier is selected.
|
|
1579
1613
|
*
|
|
1580
1614
|
* How tier matching works:
|
|
1581
1615
|
* 1. Tiers are evaluated in ascending priority order (priority 1 before priority 2, etc.)
|
|
@@ -1669,9 +1703,9 @@ interface PricingTierInput {
|
|
|
1669
1703
|
* - Must have priority=0
|
|
1670
1704
|
* - Must have empty conditions array (conditions=[])
|
|
1671
1705
|
*
|
|
1672
|
-
* The default tier acts as a fallback when no conditional tiers match.
|
|
1706
|
+
* The default tier acts as a fallback when no conditional tiers match. Defaults to false when omitted.
|
|
1673
1707
|
*/
|
|
1674
|
-
isDefault
|
|
1708
|
+
isDefault?: boolean;
|
|
1675
1709
|
/**
|
|
1676
1710
|
* Priority for tier matching evaluation. Lower numbers = higher priority (evaluated first).
|
|
1677
1711
|
*
|
|
@@ -1685,9 +1719,9 @@ interface PricingTierInput {
|
|
|
1685
1719
|
* The default tier must have an empty array (conditions=[]).
|
|
1686
1720
|
* Conditional tiers should define one or more conditions that specify when this tier's pricing applies.
|
|
1687
1721
|
*
|
|
1688
|
-
*
|
|
1722
|
+
* Conditions can compare summed matching usage details to a numeric threshold, or exactly match a top-level model parameter or metadata value.
|
|
1689
1723
|
*/
|
|
1690
|
-
conditions:
|
|
1724
|
+
conditions: PricingTierConditionInput[];
|
|
1691
1725
|
/**
|
|
1692
1726
|
* Prices (USD) by usage type for this tier. At least one price must be defined.
|
|
1693
1727
|
*
|
|
@@ -1940,56 +1974,61 @@ declare class MethodNotAllowedError$1 extends LangfuseAPIError {
|
|
|
1940
1974
|
constructor(body?: unknown, rawResponse?: RawResponse);
|
|
1941
1975
|
}
|
|
1942
1976
|
|
|
1943
|
-
type index$
|
|
1944
|
-
type index$
|
|
1945
|
-
type index$
|
|
1946
|
-
type index$
|
|
1947
|
-
type index$
|
|
1948
|
-
type index$
|
|
1949
|
-
type index$
|
|
1950
|
-
declare const index$
|
|
1951
|
-
type index$
|
|
1952
|
-
type index$
|
|
1953
|
-
type index$
|
|
1954
|
-
type index$
|
|
1955
|
-
type index$
|
|
1956
|
-
type index$
|
|
1957
|
-
declare const index$
|
|
1958
|
-
type index$
|
|
1959
|
-
type index$
|
|
1960
|
-
type index$
|
|
1961
|
-
type index$
|
|
1962
|
-
declare const index$
|
|
1963
|
-
type index$
|
|
1964
|
-
type index$
|
|
1965
|
-
type index$
|
|
1966
|
-
type index$
|
|
1967
|
-
declare const index$
|
|
1968
|
-
type index$
|
|
1969
|
-
type index$
|
|
1970
|
-
type index$
|
|
1971
|
-
declare const index$
|
|
1972
|
-
type index$
|
|
1973
|
-
type index$
|
|
1974
|
-
type index$
|
|
1975
|
-
type index$
|
|
1976
|
-
type index$
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
type index$
|
|
1981
|
-
declare const index$
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
type index$
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
type index$
|
|
1990
|
-
type index$
|
|
1991
|
-
|
|
1992
|
-
|
|
1977
|
+
type index$E_BaseScore = BaseScore;
|
|
1978
|
+
type index$E_BaseScoreV1 = BaseScoreV1;
|
|
1979
|
+
type index$E_BooleanScore = BooleanScore;
|
|
1980
|
+
type index$E_BooleanScoreV1 = BooleanScoreV1;
|
|
1981
|
+
type index$E_CategoricalScore = CategoricalScore;
|
|
1982
|
+
type index$E_CategoricalScoreV1 = CategoricalScoreV1;
|
|
1983
|
+
type index$E_Comment = Comment;
|
|
1984
|
+
declare const index$E_CommentObjectType: typeof CommentObjectType;
|
|
1985
|
+
type index$E_ConfigCategory = ConfigCategory;
|
|
1986
|
+
type index$E_CorrectionScore = CorrectionScore;
|
|
1987
|
+
type index$E_CreateScoreValue = CreateScoreValue;
|
|
1988
|
+
type index$E_Dataset = Dataset;
|
|
1989
|
+
type index$E_DatasetItem = DatasetItem;
|
|
1990
|
+
type index$E_DatasetItemMediaReference = DatasetItemMediaReference;
|
|
1991
|
+
declare const index$E_DatasetItemMediaReferenceField: typeof DatasetItemMediaReferenceField;
|
|
1992
|
+
type index$E_DatasetItemMediaReferenceMedia = DatasetItemMediaReferenceMedia;
|
|
1993
|
+
type index$E_DatasetRun = DatasetRun;
|
|
1994
|
+
type index$E_DatasetRunItem = DatasetRunItem;
|
|
1995
|
+
type index$E_DatasetRunWithItems = DatasetRunWithItems;
|
|
1996
|
+
declare const index$E_DatasetStatus: typeof DatasetStatus;
|
|
1997
|
+
type index$E_Deprecation = Deprecation;
|
|
1998
|
+
type index$E_MapValue = MapValue;
|
|
1999
|
+
type index$E_Model = Model;
|
|
2000
|
+
type index$E_ModelPrice = ModelPrice;
|
|
2001
|
+
declare const index$E_ModelUsageUnit: typeof ModelUsageUnit;
|
|
2002
|
+
type index$E_NumericScore = NumericScore;
|
|
2003
|
+
type index$E_NumericScoreV1 = NumericScoreV1;
|
|
2004
|
+
type index$E_Observation = Observation;
|
|
2005
|
+
declare const index$E_ObservationLevel: typeof ObservationLevel;
|
|
2006
|
+
type index$E_ObservationV2 = ObservationV2;
|
|
2007
|
+
type index$E_ObservationsView = ObservationsView;
|
|
2008
|
+
type index$E_ObservationsViewSingle = ObservationsViewSingle;
|
|
2009
|
+
type index$E_PricingTier = PricingTier;
|
|
2010
|
+
type index$E_PricingTierAttributeCondition = PricingTierAttributeCondition;
|
|
2011
|
+
declare const index$E_PricingTierAttributeSource: typeof PricingTierAttributeSource;
|
|
2012
|
+
type index$E_PricingTierCondition = PricingTierCondition;
|
|
2013
|
+
type index$E_PricingTierConditionInput = PricingTierConditionInput;
|
|
2014
|
+
type index$E_PricingTierInput = PricingTierInput;
|
|
2015
|
+
declare const index$E_PricingTierOperator: typeof PricingTierOperator;
|
|
2016
|
+
type index$E_PricingTierUsageCondition = PricingTierUsageCondition;
|
|
2017
|
+
type index$E_PricingTierUsageConditionInput = PricingTierUsageConditionInput;
|
|
2018
|
+
declare const index$E_Score: typeof Score;
|
|
2019
|
+
type index$E_ScoreConfig = ScoreConfig;
|
|
2020
|
+
declare const index$E_ScoreConfigDataType: typeof ScoreConfigDataType;
|
|
2021
|
+
declare const index$E_ScoreDataType: typeof ScoreDataType;
|
|
2022
|
+
declare const index$E_ScoreSource: typeof ScoreSource;
|
|
2023
|
+
type index$E_Session = Session;
|
|
2024
|
+
type index$E_SessionWithTraces = SessionWithTraces;
|
|
2025
|
+
type index$E_TextScore = TextScore;
|
|
2026
|
+
type index$E_TextScoreV1 = TextScoreV1;
|
|
2027
|
+
type index$E_TraceWithDetails = TraceWithDetails;
|
|
2028
|
+
type index$E_TraceWithFullDetails = TraceWithFullDetails;
|
|
2029
|
+
type index$E_Usage = Usage;
|
|
2030
|
+
declare namespace index$E {
|
|
2031
|
+
export { AccessDeniedError$1 as AccessDeniedError, type index$E_BaseScore as BaseScore, type index$E_BaseScoreV1 as BaseScoreV1, type index$E_BooleanScore as BooleanScore, type index$E_BooleanScoreV1 as BooleanScoreV1, type index$E_CategoricalScore as CategoricalScore, type index$E_CategoricalScoreV1 as CategoricalScoreV1, type index$E_Comment as Comment, index$E_CommentObjectType as CommentObjectType, type index$E_ConfigCategory as ConfigCategory, type index$E_CorrectionScore as CorrectionScore, type index$E_CreateScoreValue as CreateScoreValue, type index$E_Dataset as Dataset, type index$E_DatasetItem as DatasetItem, type index$E_DatasetItemMediaReference as DatasetItemMediaReference, index$E_DatasetItemMediaReferenceField as DatasetItemMediaReferenceField, type index$E_DatasetItemMediaReferenceMedia as DatasetItemMediaReferenceMedia, type index$E_DatasetRun as DatasetRun, type index$E_DatasetRunItem as DatasetRunItem, type index$E_DatasetRunWithItems as DatasetRunWithItems, index$E_DatasetStatus as DatasetStatus, type index$E_Deprecation as Deprecation, Error$1 as Error, type index$E_MapValue as MapValue, MethodNotAllowedError$1 as MethodNotAllowedError, type index$E_Model as Model, type index$E_ModelPrice as ModelPrice, index$E_ModelUsageUnit as ModelUsageUnit, NotFoundError$1 as NotFoundError, type index$E_NumericScore as NumericScore, type index$E_NumericScoreV1 as NumericScoreV1, type index$E_Observation as Observation, index$E_ObservationLevel as ObservationLevel, type index$E_ObservationV2 as ObservationV2, type index$E_ObservationsView as ObservationsView, type index$E_ObservationsViewSingle as ObservationsViewSingle, type index$E_PricingTier as PricingTier, type index$E_PricingTierAttributeCondition as PricingTierAttributeCondition, index$E_PricingTierAttributeSource as PricingTierAttributeSource, type index$E_PricingTierCondition as PricingTierCondition, type index$E_PricingTierConditionInput as PricingTierConditionInput, type index$E_PricingTierInput as PricingTierInput, index$E_PricingTierOperator as PricingTierOperator, type index$E_PricingTierUsageCondition as PricingTierUsageCondition, type index$E_PricingTierUsageConditionInput as PricingTierUsageConditionInput, index$E_Score as Score, type index$E_ScoreConfig as ScoreConfig, index$E_ScoreConfigDataType as ScoreConfigDataType, index$E_ScoreDataType as ScoreDataType, index$E_ScoreSource as ScoreSource, ScoreV1$1 as ScoreV1, type index$E_Session as Session, type index$E_SessionWithTraces as SessionWithTraces, type index$E_TextScore as TextScore, type index$E_TextScoreV1 as TextScoreV1, type Trace$1 as Trace, type index$E_TraceWithDetails as TraceWithDetails, type index$E_TraceWithFullDetails as TraceWithFullDetails, UnauthorizedError$1 as UnauthorizedError, type index$E_Usage as Usage };
|
|
1993
2032
|
}
|
|
1994
2033
|
|
|
1995
2034
|
/**
|
|
@@ -2049,12 +2088,12 @@ interface GetDatasetItemsRequest {
|
|
|
2049
2088
|
limit?: number;
|
|
2050
2089
|
}
|
|
2051
2090
|
|
|
2052
|
-
type index$
|
|
2053
|
-
type index$
|
|
2054
|
-
type index$
|
|
2055
|
-
type index$
|
|
2056
|
-
declare namespace index$
|
|
2057
|
-
export type { index$
|
|
2091
|
+
type index$D_CreateDatasetItemRequest = CreateDatasetItemRequest;
|
|
2092
|
+
type index$D_DeleteDatasetItemResponse = DeleteDatasetItemResponse;
|
|
2093
|
+
type index$D_GetDatasetItemsRequest = GetDatasetItemsRequest;
|
|
2094
|
+
type index$D_PaginatedDatasetItems = PaginatedDatasetItems;
|
|
2095
|
+
declare namespace index$D {
|
|
2096
|
+
export type { index$D_CreateDatasetItemRequest as CreateDatasetItemRequest, index$D_DeleteDatasetItemResponse as DeleteDatasetItemResponse, index$D_GetDatasetItemsRequest as GetDatasetItemsRequest, index$D_PaginatedDatasetItems as PaginatedDatasetItems };
|
|
2058
2097
|
}
|
|
2059
2098
|
|
|
2060
2099
|
/**
|
|
@@ -2110,11 +2149,11 @@ interface ListDatasetRunItemsRequest {
|
|
|
2110
2149
|
limit?: number;
|
|
2111
2150
|
}
|
|
2112
2151
|
|
|
2113
|
-
type index$
|
|
2114
|
-
type index$
|
|
2115
|
-
type index$
|
|
2116
|
-
declare namespace index$
|
|
2117
|
-
export type { index$
|
|
2152
|
+
type index$C_CreateDatasetRunItemRequest = CreateDatasetRunItemRequest;
|
|
2153
|
+
type index$C_ListDatasetRunItemsRequest = ListDatasetRunItemsRequest;
|
|
2154
|
+
type index$C_PaginatedDatasetRunItems = PaginatedDatasetRunItems;
|
|
2155
|
+
declare namespace index$C {
|
|
2156
|
+
export type { index$C_CreateDatasetRunItemRequest as CreateDatasetRunItemRequest, index$C_ListDatasetRunItemsRequest as ListDatasetRunItemsRequest, index$C_PaginatedDatasetRunItems as PaginatedDatasetRunItems };
|
|
2118
2157
|
}
|
|
2119
2158
|
|
|
2120
2159
|
/**
|
|
@@ -2184,149 +2223,1672 @@ interface GetDatasetRunsRequest {
|
|
|
2184
2223
|
limit?: number;
|
|
2185
2224
|
}
|
|
2186
2225
|
|
|
2187
|
-
type index$
|
|
2188
|
-
type index$
|
|
2189
|
-
type index$
|
|
2190
|
-
type index$
|
|
2191
|
-
type index$
|
|
2192
|
-
type index$
|
|
2193
|
-
declare namespace index$
|
|
2194
|
-
export type { index$
|
|
2226
|
+
type index$B_CreateDatasetRequest = CreateDatasetRequest;
|
|
2227
|
+
type index$B_DeleteDatasetRunResponse = DeleteDatasetRunResponse;
|
|
2228
|
+
type index$B_GetDatasetRunsRequest = GetDatasetRunsRequest;
|
|
2229
|
+
type index$B_GetDatasetsRequest = GetDatasetsRequest;
|
|
2230
|
+
type index$B_PaginatedDatasetRuns = PaginatedDatasetRuns;
|
|
2231
|
+
type index$B_PaginatedDatasets = PaginatedDatasets;
|
|
2232
|
+
declare namespace index$B {
|
|
2233
|
+
export type { index$B_CreateDatasetRequest as CreateDatasetRequest, index$B_DeleteDatasetRunResponse as DeleteDatasetRunResponse, index$B_GetDatasetRunsRequest as GetDatasetRunsRequest, index$B_GetDatasetsRequest as GetDatasetsRequest, index$B_PaginatedDatasetRuns as PaginatedDatasetRuns, index$B_PaginatedDatasets as PaginatedDatasets };
|
|
2195
2234
|
}
|
|
2196
2235
|
|
|
2197
2236
|
/**
|
|
2198
2237
|
* This file was auto-generated by Fern from our API Definition.
|
|
2199
2238
|
*/
|
|
2239
|
+
/**
|
|
2240
|
+
* The evaluator type.
|
|
2241
|
+
*
|
|
2242
|
+
* The public API supports LLM-as-a-judge and code evaluators.
|
|
2243
|
+
*/
|
|
2244
|
+
type EvaluatorType$1 = "llm_as_judge" | "code";
|
|
2245
|
+
declare const EvaluatorType$1: {
|
|
2246
|
+
readonly LlmAsJudge: "llm_as_judge";
|
|
2247
|
+
readonly Code: "code";
|
|
2248
|
+
};
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2252
|
+
*/
|
|
2253
|
+
/**
|
|
2254
|
+
* Code evaluator runtime language.
|
|
2255
|
+
*/
|
|
2256
|
+
type CodeEvaluatorSourceCodeLanguage$1 = "PYTHON" | "TYPESCRIPT";
|
|
2257
|
+
declare const CodeEvaluatorSourceCodeLanguage$1: {
|
|
2258
|
+
readonly Python: "PYTHON";
|
|
2259
|
+
readonly Typescript: "TYPESCRIPT";
|
|
2260
|
+
};
|
|
2200
2261
|
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2262
|
+
/**
|
|
2263
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2264
|
+
*/
|
|
2265
|
+
/**
|
|
2266
|
+
* Source field used to populate a prompt variable.
|
|
2267
|
+
*
|
|
2268
|
+
* Use these values when mapping evaluator prompt variables to live data.
|
|
2269
|
+
*
|
|
2270
|
+
* Source semantics:
|
|
2271
|
+
* - `input`: the observation input payload
|
|
2272
|
+
* - `output`: the observation output payload
|
|
2273
|
+
* - `metadata`: the observation metadata object. Combine with `jsonPath` when you need one nested field instead of the whole object.
|
|
2274
|
+
* - `tool_calls`: the tool calls recorded on the observation, as an array of `{id, name, arguments, type, index}` objects in the order the model emitted them. Combine with `jsonPath` (for example `$[*].name`) to select parts of each call.
|
|
2275
|
+
* - `expected_output`: the experiment item's expected output when the observation belongs to an experiment.
|
|
2276
|
+
* - `experiment_item_metadata`: the experiment item's metadata when the observation belongs to an experiment.
|
|
2277
|
+
*/
|
|
2278
|
+
type PromptVariableMappingSource$1 = "input" | "output" | "metadata" | "tool_calls" | "expected_output" | "experiment_item_metadata";
|
|
2279
|
+
declare const PromptVariableMappingSource$1: {
|
|
2280
|
+
readonly Input: "input";
|
|
2281
|
+
readonly Output: "output";
|
|
2282
|
+
readonly Metadata: "metadata";
|
|
2283
|
+
readonly ToolCalls: "tool_calls";
|
|
2284
|
+
readonly ExpectedOutput: "expected_output";
|
|
2285
|
+
readonly ExperimentItemMetadata: "experiment_item_metadata";
|
|
2286
|
+
};
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2290
|
+
*/
|
|
2291
|
+
/**
|
|
2292
|
+
* Structured score type returned by an evaluator.
|
|
2293
|
+
*
|
|
2294
|
+
* This controls the type of score value Langfuse stores for evaluation results:
|
|
2295
|
+
* - `NUMERIC`: a numeric score such as `0.82`
|
|
2296
|
+
* - `BOOLEAN`: a boolean score such as `true`
|
|
2297
|
+
* - `CATEGORICAL`: one or more category labels from a fixed list
|
|
2298
|
+
*/
|
|
2299
|
+
type EvaluatorOutputScoreType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL";
|
|
2300
|
+
declare const EvaluatorOutputScoreType: {
|
|
2301
|
+
readonly Numeric: "NUMERIC";
|
|
2302
|
+
readonly Boolean: "BOOLEAN";
|
|
2303
|
+
readonly Categorical: "CATEGORICAL";
|
|
2304
|
+
};
|
|
2305
|
+
|
|
2306
|
+
/**
|
|
2307
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2308
|
+
*/
|
|
2309
|
+
|
|
2310
|
+
/**
|
|
2311
|
+
* Flat structured output definition used when creating or updating an evaluator.
|
|
2312
|
+
*
|
|
2313
|
+
* - `dataType` is required.
|
|
2314
|
+
* - `scoreReasoningInstructions` and `scoreValueInstructions` are optional instructions.
|
|
2315
|
+
* - `minValue` and `maxValue` apply only to `NUMERIC` outputs. If both are set, `minValue` must not exceed `maxValue`.
|
|
2316
|
+
* - `categories` and `shouldAllowMultipleMatches` apply only to `CATEGORICAL` outputs.
|
|
2317
|
+
* - Do not send `version`; that is an internal storage detail.
|
|
2318
|
+
*
|
|
2319
|
+
* @example
|
|
2320
|
+
* {
|
|
2321
|
+
* dataType: "NUMERIC",
|
|
2322
|
+
* dataType: "NUMERIC",
|
|
2323
|
+
* minValue: 0,
|
|
2324
|
+
* maxValue: 1
|
|
2325
|
+
* }
|
|
2326
|
+
*
|
|
2327
|
+
* @example
|
|
2328
|
+
* {
|
|
2329
|
+
* dataType: "BOOLEAN",
|
|
2330
|
+
* dataType: "BOOLEAN",
|
|
2331
|
+
* scoreValueInstructions: "Return true if the output satisfies the requirement, otherwise false."
|
|
2332
|
+
* }
|
|
2333
|
+
*
|
|
2334
|
+
* @example
|
|
2335
|
+
* {
|
|
2336
|
+
* dataType: "CATEGORICAL",
|
|
2337
|
+
* dataType: "CATEGORICAL",
|
|
2338
|
+
* scoreReasoningInstructions: "Explain which category best fits the output.",
|
|
2339
|
+
* scoreValueInstructions: "Choose the best category.",
|
|
2340
|
+
* categories: ["correct", "partially_correct", "incorrect"],
|
|
2341
|
+
* shouldAllowMultipleMatches: false
|
|
2342
|
+
* }
|
|
2343
|
+
*/
|
|
2344
|
+
type EvaluatorOutputDefinition$1 = EvaluatorOutputDefinition$1.Numeric | EvaluatorOutputDefinition$1.Boolean | EvaluatorOutputDefinition$1.Categorical;
|
|
2345
|
+
declare namespace EvaluatorOutputDefinition$1 {
|
|
2346
|
+
interface Numeric extends PublicEvaluatorNumericScore {
|
|
2347
|
+
dataType: "NUMERIC";
|
|
2348
|
+
}
|
|
2349
|
+
interface Boolean extends PublicEvaluatorBooleanScore {
|
|
2350
|
+
dataType: "BOOLEAN";
|
|
2351
|
+
}
|
|
2352
|
+
interface Categorical extends PublicEvaluatorCategoricalScore {
|
|
2353
|
+
dataType: "CATEGORICAL";
|
|
2354
|
+
}
|
|
2204
2355
|
}
|
|
2205
2356
|
|
|
2206
2357
|
/**
|
|
2207
2358
|
* This file was auto-generated by Fern from our API Definition.
|
|
2208
2359
|
*/
|
|
2209
|
-
interface
|
|
2210
|
-
/**
|
|
2211
|
-
|
|
2360
|
+
interface EvaluatorOutputDefinitionBase {
|
|
2361
|
+
/** Optional instructions for deriving the reasoning returned with the score. */
|
|
2362
|
+
scoreReasoningInstructions?: string;
|
|
2363
|
+
/** Optional instructions for deriving the score value. */
|
|
2364
|
+
scoreValueInstructions?: string;
|
|
2212
2365
|
}
|
|
2213
2366
|
|
|
2214
2367
|
/**
|
|
2215
2368
|
* This file was auto-generated by Fern from our API Definition.
|
|
2216
2369
|
*/
|
|
2217
2370
|
|
|
2218
|
-
interface
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
* experiment started before the requested range.
|
|
2226
|
-
*/
|
|
2227
|
-
startTime: string;
|
|
2228
|
-
/**
|
|
2229
|
-
* End of the experiment, i.e. the latest event end within the
|
|
2230
|
-
* requested time range.
|
|
2231
|
-
*/
|
|
2232
|
-
endTime: string;
|
|
2233
|
-
/** Number of experiment items within the requested time range. */
|
|
2234
|
-
itemCount: number;
|
|
2235
|
-
/** Null when the experiment is not associated with a dataset. */
|
|
2236
|
-
datasetId: string | null;
|
|
2237
|
-
/** Included only when `fields=metadata` is requested. */
|
|
2238
|
-
metadata?: Record<string, unknown> | null;
|
|
2239
|
-
/** Included only when `fields=scores` is requested. Contains scores directly attached to the experiment. */
|
|
2240
|
-
scores?: ScoreV3[];
|
|
2371
|
+
interface PublicEvaluatorNumericScore extends EvaluatorOutputDefinitionBase {
|
|
2372
|
+
/** Numeric score output. */
|
|
2373
|
+
dataType: "NUMERIC";
|
|
2374
|
+
/** Optional inclusive minimum value. */
|
|
2375
|
+
minValue?: number;
|
|
2376
|
+
/** Optional inclusive maximum value. */
|
|
2377
|
+
maxValue?: number;
|
|
2241
2378
|
}
|
|
2242
2379
|
|
|
2243
2380
|
/**
|
|
2244
2381
|
* This file was auto-generated by Fern from our API Definition.
|
|
2245
2382
|
*/
|
|
2246
2383
|
|
|
2247
|
-
interface
|
|
2248
|
-
|
|
2249
|
-
|
|
2384
|
+
interface PublicEvaluatorBooleanScore extends EvaluatorOutputDefinitionBase {
|
|
2385
|
+
/** Boolean score output. */
|
|
2386
|
+
dataType: "BOOLEAN";
|
|
2250
2387
|
}
|
|
2251
2388
|
|
|
2252
2389
|
/**
|
|
2253
2390
|
* This file was auto-generated by Fern from our API Definition.
|
|
2254
2391
|
*/
|
|
2255
2392
|
|
|
2256
|
-
interface
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
experimentId: string;
|
|
2264
|
-
experimentName: string;
|
|
2265
|
-
experimentItemId: string;
|
|
2266
|
-
/** Included when `fields=dataset` is requested. */
|
|
2267
|
-
experimentDatasetId?: string | null;
|
|
2268
|
-
/** Included when `fields=dataset` is requested. */
|
|
2269
|
-
experimentItemVersion?: string | null;
|
|
2270
|
-
/** Included when `fields=io` is requested. */
|
|
2271
|
-
input?: unknown;
|
|
2272
|
-
/** Included when `fields=io` is requested. */
|
|
2273
|
-
output?: unknown;
|
|
2274
|
-
/** Included when `fields=io` is requested. */
|
|
2275
|
-
expectedOutput?: unknown;
|
|
2276
|
-
/** Included when `fields=metadata` is requested. */
|
|
2277
|
-
metadata?: Record<string, unknown> | null;
|
|
2278
|
-
/** Included when `fields=itemMetadata` is requested. */
|
|
2279
|
-
experimentItemMetadata?: Record<string, unknown> | null;
|
|
2280
|
-
/** Included when `fields=experimentMetadata` is requested. */
|
|
2281
|
-
experimentMetadata?: Record<string, unknown> | null;
|
|
2282
|
-
/** Included when `fields=experimentMetadata` is requested. */
|
|
2283
|
-
experimentDescription?: string | null;
|
|
2284
|
-
/** Included only when `fields=scores` is requested. Contains item and trace scores only; experiment-level scores are returned by the experiments endpoint. */
|
|
2285
|
-
scores?: ScoreV3[];
|
|
2393
|
+
interface PublicEvaluatorCategoricalScore extends EvaluatorOutputDefinitionBase {
|
|
2394
|
+
/** Categorical score output. */
|
|
2395
|
+
dataType: "CATEGORICAL";
|
|
2396
|
+
/** Allowed category values. At least two unique values are required. */
|
|
2397
|
+
categories: string[];
|
|
2398
|
+
/** Whether the evaluator may return more than one category. */
|
|
2399
|
+
shouldAllowMultipleMatches: boolean;
|
|
2286
2400
|
}
|
|
2287
2401
|
|
|
2288
2402
|
/**
|
|
2289
2403
|
* This file was auto-generated by Fern from our API Definition.
|
|
2290
2404
|
*/
|
|
2405
|
+
|
|
2291
2406
|
/**
|
|
2407
|
+
* Flat evaluator output definition returned by the public API.
|
|
2408
|
+
*
|
|
2409
|
+
* This response always includes `dataType` and never includes an internal output-definition `version`.
|
|
2410
|
+
* Optional empty descriptions from legacy definitions are omitted.
|
|
2411
|
+
*
|
|
2292
2412
|
* @example
|
|
2293
2413
|
* {
|
|
2294
|
-
*
|
|
2414
|
+
* dataType: "NUMERIC",
|
|
2415
|
+
* dataType: "NUMERIC",
|
|
2416
|
+
* minValue: 0,
|
|
2417
|
+
* maxValue: 1
|
|
2418
|
+
* }
|
|
2419
|
+
*
|
|
2420
|
+
* @example
|
|
2421
|
+
* {
|
|
2422
|
+
* dataType: "CATEGORICAL",
|
|
2423
|
+
* dataType: "CATEGORICAL",
|
|
2424
|
+
* scoreReasoningInstructions: "Explain which label best fits the output.",
|
|
2425
|
+
* scoreValueInstructions: "Choose the best label.",
|
|
2426
|
+
* categories: ["correct", "partially_correct", "incorrect"],
|
|
2427
|
+
* shouldAllowMultipleMatches: false
|
|
2295
2428
|
* }
|
|
2296
2429
|
*/
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
cursor?: string;
|
|
2309
|
-
/** Retrieve only experiments on or after this datetime. */
|
|
2310
|
-
fromStartTime: string;
|
|
2311
|
-
/** Retrieve only experiments before this datetime. */
|
|
2312
|
-
toStartTime?: string;
|
|
2313
|
-
/** Comma-separated list of experiment IDs. */
|
|
2314
|
-
id?: string;
|
|
2315
|
-
/** Comma-separated list of experiment names. */
|
|
2316
|
-
name?: string;
|
|
2317
|
-
/** Comma-separated list of dataset IDs. */
|
|
2318
|
-
datasetId?: string;
|
|
2319
|
-
/**
|
|
2320
|
-
* JSON string containing an array of structured filter conditions.
|
|
2321
|
-
* Supported columns are `id`, `name`, and `datasetId`.
|
|
2322
|
-
*/
|
|
2323
|
-
filter?: string;
|
|
2430
|
+
type PublicEvaluatorOutputDefinition$1 = PublicEvaluatorOutputDefinition$1.Numeric | PublicEvaluatorOutputDefinition$1.Boolean | PublicEvaluatorOutputDefinition$1.Categorical;
|
|
2431
|
+
declare namespace PublicEvaluatorOutputDefinition$1 {
|
|
2432
|
+
interface Numeric extends PublicEvaluatorNumericScore {
|
|
2433
|
+
dataType: "NUMERIC";
|
|
2434
|
+
}
|
|
2435
|
+
interface Boolean extends PublicEvaluatorBooleanScore {
|
|
2436
|
+
dataType: "BOOLEAN";
|
|
2437
|
+
}
|
|
2438
|
+
interface Categorical extends PublicEvaluatorCategoricalScore {
|
|
2439
|
+
dataType: "CATEGORICAL";
|
|
2440
|
+
}
|
|
2324
2441
|
}
|
|
2325
2442
|
|
|
2326
2443
|
/**
|
|
2327
2444
|
* This file was auto-generated by Fern from our API Definition.
|
|
2328
2445
|
*/
|
|
2329
|
-
|
|
2446
|
+
type EvaluationRuleStringFilterOperator$1 = "=" | "contains" | "does not contain" | "starts with" | "ends with";
|
|
2447
|
+
declare const EvaluationRuleStringFilterOperator$1: {
|
|
2448
|
+
readonly Equals: "=";
|
|
2449
|
+
readonly Contains: "contains";
|
|
2450
|
+
readonly DoesNotContain: "does not contain";
|
|
2451
|
+
readonly StartsWith: "starts with";
|
|
2452
|
+
readonly EndsWith: "ends with";
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2457
|
+
*/
|
|
2458
|
+
type EvaluationRuleNumberFilterOperator$1 = "=" | ">" | "<" | ">=" | "<=";
|
|
2459
|
+
declare const EvaluationRuleNumberFilterOperator$1: {
|
|
2460
|
+
readonly Equals: "=";
|
|
2461
|
+
readonly GreaterThan: ">";
|
|
2462
|
+
readonly LessThan: "<";
|
|
2463
|
+
readonly GreaterThanOrEqual: ">=";
|
|
2464
|
+
readonly LessThanOrEqual: "<=";
|
|
2465
|
+
};
|
|
2466
|
+
|
|
2467
|
+
/**
|
|
2468
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2469
|
+
*/
|
|
2470
|
+
type EvaluationRuleOptionsFilterOperator$1 = "any of" | "none of";
|
|
2471
|
+
declare const EvaluationRuleOptionsFilterOperator$1: {
|
|
2472
|
+
readonly AnyOf: "any of";
|
|
2473
|
+
readonly NoneOf: "none of";
|
|
2474
|
+
};
|
|
2475
|
+
|
|
2476
|
+
/**
|
|
2477
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2478
|
+
*/
|
|
2479
|
+
type EvaluationRuleArrayOptionsFilterOperator$1 = "any of" | "none of" | "all of";
|
|
2480
|
+
declare const EvaluationRuleArrayOptionsFilterOperator$1: {
|
|
2481
|
+
readonly AnyOf: "any of";
|
|
2482
|
+
readonly NoneOf: "none of";
|
|
2483
|
+
readonly AllOf: "all of";
|
|
2484
|
+
};
|
|
2485
|
+
|
|
2486
|
+
/**
|
|
2487
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2488
|
+
*/
|
|
2489
|
+
type EvaluationRuleBooleanFilterOperator$1 = "=" | "<>";
|
|
2490
|
+
declare const EvaluationRuleBooleanFilterOperator$1: {
|
|
2491
|
+
readonly Equals: "=";
|
|
2492
|
+
readonly NotEquals: "<>";
|
|
2493
|
+
};
|
|
2494
|
+
|
|
2495
|
+
/**
|
|
2496
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2497
|
+
*/
|
|
2498
|
+
type EvaluationRuleNullFilterOperator$1 = "is null" | "is not null";
|
|
2499
|
+
declare const EvaluationRuleNullFilterOperator$1: {
|
|
2500
|
+
readonly IsNull: "is null";
|
|
2501
|
+
readonly IsNotNull: "is not null";
|
|
2502
|
+
};
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2506
|
+
*/
|
|
2507
|
+
|
|
2508
|
+
interface DateTimeEvaluationRuleFilter$1 {
|
|
2509
|
+
/** Column to filter on. */
|
|
2510
|
+
column: string;
|
|
2511
|
+
/** Comparison operator for datetime values. */
|
|
2512
|
+
operator: EvaluationRuleNumberFilterOperator$1;
|
|
2513
|
+
/** Datetime value to compare against. */
|
|
2514
|
+
value: string;
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
/**
|
|
2518
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2519
|
+
*/
|
|
2520
|
+
|
|
2521
|
+
interface StringEvaluationRuleFilter$1 {
|
|
2522
|
+
/** Column to filter on. */
|
|
2523
|
+
column: string;
|
|
2524
|
+
operator: EvaluationRuleStringFilterOperator$1;
|
|
2525
|
+
value: string;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
/**
|
|
2529
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2530
|
+
*/
|
|
2531
|
+
|
|
2532
|
+
interface NumberEvaluationRuleFilter$1 {
|
|
2533
|
+
/** Column to filter on. */
|
|
2534
|
+
column: string;
|
|
2535
|
+
operator: EvaluationRuleNumberFilterOperator$1;
|
|
2536
|
+
value: number;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2541
|
+
*/
|
|
2542
|
+
|
|
2543
|
+
interface StringOptionsEvaluationRuleFilter$1 {
|
|
2544
|
+
/** Column to filter on. */
|
|
2545
|
+
column: string;
|
|
2546
|
+
operator: EvaluationRuleOptionsFilterOperator$1;
|
|
2547
|
+
/** One or more allowed string values. */
|
|
2548
|
+
value: string[];
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
/**
|
|
2552
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2553
|
+
*/
|
|
2554
|
+
|
|
2555
|
+
interface ArrayOptionsEvaluationRuleFilter$1 {
|
|
2556
|
+
/** Column to filter on. */
|
|
2557
|
+
column: string;
|
|
2558
|
+
operator: EvaluationRuleArrayOptionsFilterOperator$1;
|
|
2559
|
+
/** One or more array elements to match. */
|
|
2560
|
+
value: string[];
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
/**
|
|
2564
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2565
|
+
*/
|
|
2566
|
+
|
|
2567
|
+
interface StringObjectEvaluationRuleFilter$1 {
|
|
2568
|
+
/** Object-valued column to filter on. Currently only `metadata` is supported. */
|
|
2569
|
+
column: string;
|
|
2570
|
+
/** Top-level key inside the object-valued column to filter on. */
|
|
2571
|
+
key: string;
|
|
2572
|
+
operator: EvaluationRuleStringFilterOperator$1;
|
|
2573
|
+
value: string;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
/**
|
|
2577
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2578
|
+
*/
|
|
2579
|
+
|
|
2580
|
+
interface NumberObjectEvaluationRuleFilter$1 {
|
|
2581
|
+
/** Object-valued column to filter on. */
|
|
2582
|
+
column: string;
|
|
2583
|
+
/** Key inside the object-valued column to filter on. */
|
|
2584
|
+
key: string;
|
|
2585
|
+
operator: EvaluationRuleNumberFilterOperator$1;
|
|
2586
|
+
value: number;
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
/**
|
|
2590
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2591
|
+
*/
|
|
2592
|
+
|
|
2593
|
+
interface CategoryOptionsEvaluationRuleFilter$1 {
|
|
2594
|
+
/** Object-valued column to filter on. */
|
|
2595
|
+
column: string;
|
|
2596
|
+
/** Key inside the object-valued column to filter on. */
|
|
2597
|
+
key: string;
|
|
2598
|
+
operator: EvaluationRuleOptionsFilterOperator$1;
|
|
2599
|
+
value: string[];
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
/**
|
|
2603
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2604
|
+
*/
|
|
2605
|
+
|
|
2606
|
+
interface BooleanEvaluationRuleFilter$1 {
|
|
2607
|
+
/** Column to filter on. */
|
|
2608
|
+
column: string;
|
|
2609
|
+
operator: EvaluationRuleBooleanFilterOperator$1;
|
|
2610
|
+
value: boolean;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
/**
|
|
2614
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2615
|
+
*/
|
|
2616
|
+
|
|
2617
|
+
interface NullEvaluationRuleFilter$1 {
|
|
2618
|
+
/** Column to filter on, for example `parentObservationId`. */
|
|
2619
|
+
column: string;
|
|
2620
|
+
operator: EvaluationRuleNullFilterOperator$1;
|
|
2621
|
+
/** Required empty-string placeholder used by the runtime filter contract. */
|
|
2622
|
+
value: "";
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
/**
|
|
2626
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2627
|
+
*/
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* Connects one prompt variable to data from an observation or experiment.
|
|
2631
|
+
*
|
|
2632
|
+
* Manual mappings are used for `llm_as_judge` evaluators. `code` evaluators use a fixed runtime mapping managed by Langfuse.
|
|
2633
|
+
*
|
|
2634
|
+
* How to build a valid mapping list:
|
|
2635
|
+
* 1. Create the evaluator or fetch it with `GET /evaluators/{id}`.
|
|
2636
|
+
* 2. Read the evaluator `variables` array.
|
|
2637
|
+
* 3. Add exactly one mapping object for each variable in that array.
|
|
2638
|
+
* 4. Use the variable name exactly as returned, without braces such as `{{` or `}}`.
|
|
2639
|
+
* 5. Choose the source field that should populate the variable.
|
|
2640
|
+
*
|
|
2641
|
+
* `jsonPath` is optional. Use it only when the selected source is a JSON object and you want to extract one nested field before inserting it into the evaluator prompt.
|
|
2642
|
+
*
|
|
2643
|
+
* Invalid, missing, or duplicate mappings return a validation error. Malformed JSONPath expressions are also rejected.
|
|
2644
|
+
*
|
|
2645
|
+
* @example
|
|
2646
|
+
* {
|
|
2647
|
+
* variable: "input",
|
|
2648
|
+
* source: LangfuseAPI.PromptVariableMappingSource.Input
|
|
2649
|
+
* }
|
|
2650
|
+
*
|
|
2651
|
+
* @example
|
|
2652
|
+
* {
|
|
2653
|
+
* variable: "customer_tier",
|
|
2654
|
+
* source: LangfuseAPI.PromptVariableMappingSource.Metadata,
|
|
2655
|
+
* jsonPath: "$.customer.tier"
|
|
2656
|
+
* }
|
|
2657
|
+
*
|
|
2658
|
+
* @example
|
|
2659
|
+
* {
|
|
2660
|
+
* variable: "expected_output",
|
|
2661
|
+
* source: LangfuseAPI.PromptVariableMappingSource.ExpectedOutput
|
|
2662
|
+
* }
|
|
2663
|
+
*/
|
|
2664
|
+
interface PromptVariableMappingInput$1 {
|
|
2665
|
+
/**
|
|
2666
|
+
* Prompt variable name without braces.
|
|
2667
|
+
*
|
|
2668
|
+
* Example: for the prompt `Judge {{input}} against {{output}}`, use `input` and `output`.
|
|
2669
|
+
*/
|
|
2670
|
+
variable: string;
|
|
2671
|
+
/**
|
|
2672
|
+
* Source field that should populate the prompt variable.
|
|
2673
|
+
*
|
|
2674
|
+
* Available sources are `input`, `output`, `metadata`, `tool_calls`, `expected_output`, and `experiment_item_metadata`.
|
|
2675
|
+
*/
|
|
2676
|
+
source: PromptVariableMappingSource$1;
|
|
2677
|
+
/**
|
|
2678
|
+
* Optional JSONPath selector applied to the selected source before it is passed to the evaluator prompt.
|
|
2679
|
+
*
|
|
2680
|
+
* Requirements:
|
|
2681
|
+
* - Must start with `$`
|
|
2682
|
+
* - Must be a syntactically valid JSONPath expression
|
|
2683
|
+
* - Most useful with `source=metadata`
|
|
2684
|
+
*/
|
|
2685
|
+
jsonPath?: string;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
/**
|
|
2689
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2690
|
+
*/
|
|
2691
|
+
/**
|
|
2692
|
+
* Connects one prompt variable to source data.
|
|
2693
|
+
*
|
|
2694
|
+
* `source` is `null` when the mapping is incomplete.
|
|
2695
|
+
*
|
|
2696
|
+
* @example
|
|
2697
|
+
* {
|
|
2698
|
+
* variable: "input",
|
|
2699
|
+
* source: "input"
|
|
2700
|
+
* }
|
|
2701
|
+
*
|
|
2702
|
+
* @example
|
|
2703
|
+
* {
|
|
2704
|
+
* variable: "input",
|
|
2705
|
+
* source: null
|
|
2706
|
+
* }
|
|
2707
|
+
*/
|
|
2708
|
+
interface PromptVariableMappingRead$1 {
|
|
2709
|
+
/** Prompt variable name without braces. */
|
|
2710
|
+
variable: string;
|
|
2711
|
+
/** Stored source field populating the variable, or `null` when the mapping is incomplete. */
|
|
2712
|
+
source: string | null;
|
|
2713
|
+
/** Optional JSONPath selector applied to the selected source. */
|
|
2714
|
+
jsonPath?: string;
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
/**
|
|
2718
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2719
|
+
*/
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* Connects one prompt variable to source data.
|
|
2723
|
+
*/
|
|
2724
|
+
type PromptVariableMapping = PromptVariableMappingRead$1 | LegacyPromptVariableMapping$1;
|
|
2725
|
+
|
|
2726
|
+
/**
|
|
2727
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2728
|
+
*/
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* **Deprecated:** Connects one prompt variable to data from a legacy trace or dataset evaluation rule.
|
|
2732
|
+
*
|
|
2733
|
+
* `langfuseObject` selects the object kind. `objectName` separately selects a named observation and is `null` for trace and dataset-item mappings.
|
|
2734
|
+
*
|
|
2735
|
+
* @example
|
|
2736
|
+
* {
|
|
2737
|
+
* mappingType: "legacy",
|
|
2738
|
+
* variable: "input",
|
|
2739
|
+
* langfuseObject: LangfuseAPI.LegacyEvaluationObject.Trace,
|
|
2740
|
+
* objectName: null,
|
|
2741
|
+
* source: "input"
|
|
2742
|
+
* }
|
|
2743
|
+
*
|
|
2744
|
+
* @example
|
|
2745
|
+
* {
|
|
2746
|
+
* mappingType: "legacy",
|
|
2747
|
+
* variable: "output",
|
|
2748
|
+
* langfuseObject: LangfuseAPI.LegacyEvaluationObject.Generation,
|
|
2749
|
+
* objectName: "answer-generation",
|
|
2750
|
+
* source: "output",
|
|
2751
|
+
* jsonPath: "$.answer"
|
|
2752
|
+
* }
|
|
2753
|
+
*/
|
|
2754
|
+
interface LegacyPromptVariableMapping$1 {
|
|
2755
|
+
/** Explicitly marks this as a legacy mapping. */
|
|
2756
|
+
mappingType: "legacy";
|
|
2757
|
+
/** Prompt variable name without braces. */
|
|
2758
|
+
variable: string;
|
|
2759
|
+
/** Legacy object kind selected as the mapping source. */
|
|
2760
|
+
langfuseObject: LegacyEvaluationObject$1;
|
|
2761
|
+
/** Observation name to match, or `null` when `langfuseObject` is `trace` or `dataset_item`. */
|
|
2762
|
+
objectName: string | null;
|
|
2763
|
+
/** Field selected from the legacy object. */
|
|
2764
|
+
source: string;
|
|
2765
|
+
/** Optional JSONPath selector applied to the selected field. */
|
|
2766
|
+
jsonPath?: string;
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
/**
|
|
2770
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2771
|
+
*/
|
|
2772
|
+
/**
|
|
2773
|
+
* **Deprecated:** Legacy Langfuse object kind used by trace and dataset evaluation rules.
|
|
2774
|
+
*/
|
|
2775
|
+
type LegacyEvaluationObject$1 = "trace" | "span" | "generation" | "event" | "agent" | "tool" | "chain" | "retriever" | "evaluator" | "embedding" | "guardrail" | "dataset_item";
|
|
2776
|
+
declare const LegacyEvaluationObject$1: {
|
|
2777
|
+
readonly Trace: "trace";
|
|
2778
|
+
readonly Span: "span";
|
|
2779
|
+
readonly Generation: "generation";
|
|
2780
|
+
readonly Event: "event";
|
|
2781
|
+
readonly Agent: "agent";
|
|
2782
|
+
readonly Tool: "tool";
|
|
2783
|
+
readonly Chain: "chain";
|
|
2784
|
+
readonly Retriever: "retriever";
|
|
2785
|
+
readonly Evaluator: "evaluator";
|
|
2786
|
+
readonly Embedding: "embedding";
|
|
2787
|
+
readonly Guardrail: "guardrail";
|
|
2788
|
+
readonly DatasetItem: "dataset_item";
|
|
2789
|
+
};
|
|
2790
|
+
|
|
2791
|
+
/**
|
|
2792
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2793
|
+
*/
|
|
2794
|
+
|
|
2795
|
+
/**
|
|
2796
|
+
* One filter condition used to decide whether a live-ingested observation should be evaluated.
|
|
2797
|
+
*
|
|
2798
|
+
* All filters must be satisfied for the rule to run. Experiment scope is expressed with filters rather than a separate target field:
|
|
2799
|
+
* - `isExperimentItemRootSpan = true` limits execution to experiment item roots.
|
|
2800
|
+
* - `datasetId` limits execution to experiments for the selected datasets. Use dataset IDs from `GET /api/public/v2/datasets`.
|
|
2801
|
+
*
|
|
2802
|
+
* Pick the filter `type` first, as it determines the required fields and value shape. Use `key` only for object filters such as `metadata`.
|
|
2803
|
+
*
|
|
2804
|
+
* Operator quick reference by filter `type`:
|
|
2805
|
+
* - `string`: `"="`, `contains`, `does not contain`, `starts with`, `ends with`
|
|
2806
|
+
* - `number`: `"="`, `">"`, `"<"`, `">="`, `"<="`
|
|
2807
|
+
* - `datetime`: `"="`, `">"`, `"<"`, `">="`, `"<="`
|
|
2808
|
+
* - `stringOptions`: `any of`, `none of`
|
|
2809
|
+
* - `arrayOptions`: `any of`, `none of`, `all of`
|
|
2810
|
+
* - `stringObject`: same operators as `string`
|
|
2811
|
+
* - `boolean`: `"="`, `"<>"`
|
|
2812
|
+
* - `null`: `is null`, `is not null`
|
|
2813
|
+
*
|
|
2814
|
+
* Supported columns. Each column accepts exactly one filter `type`; sending a column with a different `type` is rejected with `400`.
|
|
2815
|
+
* - `type`: `stringOptions`, values `SPAN`, `EVENT`, `GENERATION`, `AGENT`, `TOOL`, `CHAIN`, `RETRIEVER`, `EVALUATOR`, `EMBEDDING`, `GUARDRAIL`
|
|
2816
|
+
* - `name`: `stringOptions`
|
|
2817
|
+
* - `environment`: `stringOptions`
|
|
2818
|
+
* - `level`: `stringOptions`, values `DEBUG`, `DEFAULT`, `WARNING`, `ERROR`
|
|
2819
|
+
* - `version`: `string`
|
|
2820
|
+
* - `traceName`: `stringOptions`
|
|
2821
|
+
* - `userId`: `string`
|
|
2822
|
+
* - `sessionId`: `string`
|
|
2823
|
+
* - `tags`: `arrayOptions`
|
|
2824
|
+
* - `metadata`: `stringObject`, requires `key`
|
|
2825
|
+
* - `isRootObservation`: `boolean`; true when the observation has no parent or is explicitly marked as an application root
|
|
2826
|
+
* - `parentObservationId`: `null`
|
|
2827
|
+
* - `experimentId`: `stringOptions`
|
|
2828
|
+
* - `isExperimentItemRootSpan`: `boolean`
|
|
2829
|
+
* - `calledToolNames`: `arrayOptions`
|
|
2830
|
+
* - `toolCalls`: `number`, the number of tool calls on the observation
|
|
2831
|
+
* - `datasetId`: `stringOptions`. Use dataset `id` values from `GET /api/public/v2/datasets`, not dataset names.
|
|
2832
|
+
*
|
|
2833
|
+
* @example
|
|
2834
|
+
* {
|
|
2835
|
+
* type: "stringOptions",
|
|
2836
|
+
* column: "type",
|
|
2837
|
+
* operator: LangfuseAPI.EvaluationRuleOptionsFilterOperator.AnyOf,
|
|
2838
|
+
* value: ["GENERATION"]
|
|
2839
|
+
* }
|
|
2840
|
+
*
|
|
2841
|
+
* @example
|
|
2842
|
+
* {
|
|
2843
|
+
* type: "stringObject",
|
|
2844
|
+
* column: "metadata",
|
|
2845
|
+
* key: "customerTier",
|
|
2846
|
+
* operator: LangfuseAPI.EvaluationRuleStringFilterOperator.Equals,
|
|
2847
|
+
* value: "enterprise"
|
|
2848
|
+
* }
|
|
2849
|
+
*
|
|
2850
|
+
* @example
|
|
2851
|
+
* {
|
|
2852
|
+
* type: "null",
|
|
2853
|
+
* column: "parentObservationId",
|
|
2854
|
+
* operator: LangfuseAPI.EvaluationRuleNullFilterOperator.IsNull,
|
|
2855
|
+
* value: ""
|
|
2856
|
+
* }
|
|
2857
|
+
*
|
|
2858
|
+
* @example
|
|
2859
|
+
* {
|
|
2860
|
+
* type: "boolean",
|
|
2861
|
+
* column: "isRootObservation",
|
|
2862
|
+
* operator: LangfuseAPI.EvaluationRuleBooleanFilterOperator.Equals,
|
|
2863
|
+
* value: true
|
|
2864
|
+
* }
|
|
2865
|
+
*
|
|
2866
|
+
* @example
|
|
2867
|
+
* {
|
|
2868
|
+
* type: "arrayOptions",
|
|
2869
|
+
* column: "tags",
|
|
2870
|
+
* operator: LangfuseAPI.EvaluationRuleArrayOptionsFilterOperator.AnyOf,
|
|
2871
|
+
* value: ["production"]
|
|
2872
|
+
* }
|
|
2873
|
+
*
|
|
2874
|
+
* @example
|
|
2875
|
+
* {
|
|
2876
|
+
* type: "stringOptions",
|
|
2877
|
+
* column: "datasetId",
|
|
2878
|
+
* operator: LangfuseAPI.EvaluationRuleOptionsFilterOperator.AnyOf,
|
|
2879
|
+
* value: ["550e8400-e29b-41d4-a716-446655440000"]
|
|
2880
|
+
* }
|
|
2881
|
+
*/
|
|
2882
|
+
type EvaluationRuleFilter$1 = EvaluationRuleFilter$1.Datetime | EvaluationRuleFilter$1.String | EvaluationRuleFilter$1.Number | EvaluationRuleFilter$1.StringOptions | EvaluationRuleFilter$1.CategoryOptions | EvaluationRuleFilter$1.ArrayOptions | EvaluationRuleFilter$1.StringObject | EvaluationRuleFilter$1.NumberObject | EvaluationRuleFilter$1.Boolean | EvaluationRuleFilter$1.Null;
|
|
2883
|
+
declare namespace EvaluationRuleFilter$1 {
|
|
2884
|
+
interface Datetime extends DateTimeEvaluationRuleFilter$1 {
|
|
2885
|
+
type: "datetime";
|
|
2886
|
+
}
|
|
2887
|
+
interface String extends StringEvaluationRuleFilter$1 {
|
|
2888
|
+
type: "string";
|
|
2889
|
+
}
|
|
2890
|
+
interface Number extends NumberEvaluationRuleFilter$1 {
|
|
2891
|
+
type: "number";
|
|
2892
|
+
}
|
|
2893
|
+
interface StringOptions extends StringOptionsEvaluationRuleFilter$1 {
|
|
2894
|
+
type: "stringOptions";
|
|
2895
|
+
}
|
|
2896
|
+
interface CategoryOptions extends CategoryOptionsEvaluationRuleFilter$1 {
|
|
2897
|
+
type: "categoryOptions";
|
|
2898
|
+
}
|
|
2899
|
+
interface ArrayOptions extends ArrayOptionsEvaluationRuleFilter$1 {
|
|
2900
|
+
type: "arrayOptions";
|
|
2901
|
+
}
|
|
2902
|
+
interface StringObject extends StringObjectEvaluationRuleFilter$1 {
|
|
2903
|
+
type: "stringObject";
|
|
2904
|
+
}
|
|
2905
|
+
interface NumberObject extends NumberObjectEvaluationRuleFilter$1 {
|
|
2906
|
+
type: "numberObject";
|
|
2907
|
+
}
|
|
2908
|
+
interface Boolean extends BooleanEvaluationRuleFilter$1 {
|
|
2909
|
+
type: "boolean";
|
|
2910
|
+
}
|
|
2911
|
+
interface Null extends NullEvaluationRuleFilter$1 {
|
|
2912
|
+
type: "null";
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
/**
|
|
2917
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2918
|
+
*/
|
|
2919
|
+
/**
|
|
2920
|
+
* Stored filter returned verbatim by evaluation-rule read endpoints.
|
|
2921
|
+
*/
|
|
2922
|
+
interface EvaluationRuleReadFilterBase {
|
|
2923
|
+
/** Stored filter type. This is not broken down into separate public response types. */
|
|
2924
|
+
type: string;
|
|
2925
|
+
column: string;
|
|
2926
|
+
operator: string;
|
|
2927
|
+
/** Stored filter value. Its shape depends on the filter type. */
|
|
2928
|
+
value?: unknown;
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
/**
|
|
2932
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2933
|
+
*/
|
|
2934
|
+
|
|
2935
|
+
interface EvaluationRuleReadFilterWithKey extends EvaluationRuleReadFilterBase {
|
|
2936
|
+
/** Stored object or legacy filter key. */
|
|
2937
|
+
key: string;
|
|
2938
|
+
}
|
|
2939
|
+
|
|
2940
|
+
/**
|
|
2941
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2942
|
+
*/
|
|
2943
|
+
|
|
2944
|
+
/**
|
|
2945
|
+
* Filter returned verbatim by evaluation-rule read endpoints.
|
|
2946
|
+
*
|
|
2947
|
+
* Filters with a stored `key` use the keyed shape. All other filters use the base shape. Response filters are intentionally not broken down by their internal `type` value.
|
|
2948
|
+
*/
|
|
2949
|
+
type EvaluationRuleReadFilter = EvaluationRuleReadFilterWithKey | EvaluationRuleReadFilterBase;
|
|
2950
|
+
|
|
2951
|
+
type index$A_EvaluationRuleReadFilter = EvaluationRuleReadFilter;
|
|
2952
|
+
type index$A_EvaluationRuleReadFilterBase = EvaluationRuleReadFilterBase;
|
|
2953
|
+
type index$A_EvaluationRuleReadFilterWithKey = EvaluationRuleReadFilterWithKey;
|
|
2954
|
+
type index$A_EvaluatorOutputDefinitionBase = EvaluatorOutputDefinitionBase;
|
|
2955
|
+
declare const index$A_EvaluatorOutputScoreType: typeof EvaluatorOutputScoreType;
|
|
2956
|
+
type index$A_PromptVariableMapping = PromptVariableMapping;
|
|
2957
|
+
type index$A_PublicEvaluatorBooleanScore = PublicEvaluatorBooleanScore;
|
|
2958
|
+
type index$A_PublicEvaluatorCategoricalScore = PublicEvaluatorCategoricalScore;
|
|
2959
|
+
type index$A_PublicEvaluatorNumericScore = PublicEvaluatorNumericScore;
|
|
2960
|
+
declare namespace index$A {
|
|
2961
|
+
export { type ArrayOptionsEvaluationRuleFilter$1 as ArrayOptionsEvaluationRuleFilter, type BooleanEvaluationRuleFilter$1 as BooleanEvaluationRuleFilter, type CategoryOptionsEvaluationRuleFilter$1 as CategoryOptionsEvaluationRuleFilter, CodeEvaluatorSourceCodeLanguage$1 as CodeEvaluatorSourceCodeLanguage, type DateTimeEvaluationRuleFilter$1 as DateTimeEvaluationRuleFilter, EvaluationRuleArrayOptionsFilterOperator$1 as EvaluationRuleArrayOptionsFilterOperator, EvaluationRuleBooleanFilterOperator$1 as EvaluationRuleBooleanFilterOperator, EvaluationRuleFilter$1 as EvaluationRuleFilter, EvaluationRuleNullFilterOperator$1 as EvaluationRuleNullFilterOperator, EvaluationRuleNumberFilterOperator$1 as EvaluationRuleNumberFilterOperator, EvaluationRuleOptionsFilterOperator$1 as EvaluationRuleOptionsFilterOperator, type index$A_EvaluationRuleReadFilter as EvaluationRuleReadFilter, type index$A_EvaluationRuleReadFilterBase as EvaluationRuleReadFilterBase, type index$A_EvaluationRuleReadFilterWithKey as EvaluationRuleReadFilterWithKey, EvaluationRuleStringFilterOperator$1 as EvaluationRuleStringFilterOperator, EvaluatorOutputDefinition$1 as EvaluatorOutputDefinition, type index$A_EvaluatorOutputDefinitionBase as EvaluatorOutputDefinitionBase, index$A_EvaluatorOutputScoreType as EvaluatorOutputScoreType, EvaluatorType$1 as EvaluatorType, LegacyEvaluationObject$1 as LegacyEvaluationObject, type LegacyPromptVariableMapping$1 as LegacyPromptVariableMapping, type NullEvaluationRuleFilter$1 as NullEvaluationRuleFilter, type NumberEvaluationRuleFilter$1 as NumberEvaluationRuleFilter, type NumberObjectEvaluationRuleFilter$1 as NumberObjectEvaluationRuleFilter, type index$A_PromptVariableMapping as PromptVariableMapping, type PromptVariableMappingInput$1 as PromptVariableMappingInput, type PromptVariableMappingRead$1 as PromptVariableMappingRead, PromptVariableMappingSource$1 as PromptVariableMappingSource, type index$A_PublicEvaluatorBooleanScore as PublicEvaluatorBooleanScore, type index$A_PublicEvaluatorCategoricalScore as PublicEvaluatorCategoricalScore, type index$A_PublicEvaluatorNumericScore as PublicEvaluatorNumericScore, PublicEvaluatorOutputDefinition$1 as PublicEvaluatorOutputDefinition, type StringEvaluationRuleFilter$1 as StringEvaluationRuleFilter, type StringObjectEvaluationRuleFilter$1 as StringObjectEvaluationRuleFilter, type StringOptionsEvaluationRuleFilter$1 as StringOptionsEvaluationRuleFilter };
|
|
2962
|
+
}
|
|
2963
|
+
|
|
2964
|
+
/**
|
|
2965
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2966
|
+
*/
|
|
2967
|
+
/**
|
|
2968
|
+
* Stable machine-readable error code returned by the evaluators and evaluation-rules API.
|
|
2969
|
+
*/
|
|
2970
|
+
type PublicApiErrorCode$1 = "authentication_failed" | "access_denied" | "invalid_request" | "invalid_query" | "invalid_body" | "resource_not_found" | "conflict" | "rate_limited" | "method_not_allowed" | "internal_error";
|
|
2971
|
+
declare const PublicApiErrorCode$1: {
|
|
2972
|
+
readonly AuthenticationFailed: "authentication_failed";
|
|
2973
|
+
readonly AccessDenied: "access_denied";
|
|
2974
|
+
readonly InvalidRequest: "invalid_request";
|
|
2975
|
+
readonly InvalidQuery: "invalid_query";
|
|
2976
|
+
readonly InvalidBody: "invalid_body";
|
|
2977
|
+
readonly ResourceNotFound: "resource_not_found";
|
|
2978
|
+
readonly Conflict: "conflict";
|
|
2979
|
+
readonly RateLimited: "rate_limited";
|
|
2980
|
+
readonly MethodNotAllowed: "method_not_allowed";
|
|
2981
|
+
readonly InternalError: "internal_error";
|
|
2982
|
+
};
|
|
2983
|
+
|
|
2984
|
+
/**
|
|
2985
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2986
|
+
*/
|
|
2987
|
+
/**
|
|
2988
|
+
* One request validation issue.
|
|
2989
|
+
*/
|
|
2990
|
+
interface PublicApiValidationIssue$1 {
|
|
2991
|
+
/** Validator issue code. */
|
|
2992
|
+
code: string;
|
|
2993
|
+
/** Human-readable explanation. */
|
|
2994
|
+
message: string;
|
|
2995
|
+
/** Path to the invalid request field. */
|
|
2996
|
+
path: unknown[];
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
/**
|
|
3000
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3001
|
+
*/
|
|
3002
|
+
|
|
3003
|
+
/**
|
|
3004
|
+
* Optional structured context for validation and rate-limit errors.
|
|
3005
|
+
*/
|
|
3006
|
+
interface PublicApiErrorDetails$1 {
|
|
3007
|
+
/** Validation issues for an invalid request body or query. */
|
|
3008
|
+
issues?: PublicApiValidationIssue$1[];
|
|
3009
|
+
/** Number of seconds to wait before retrying a rate-limited request. */
|
|
3010
|
+
retryAfterSeconds?: number;
|
|
3011
|
+
/** Rate-limit request allowance. */
|
|
3012
|
+
limit?: number;
|
|
3013
|
+
/** Remaining requests in the current rate-limit window. */
|
|
3014
|
+
remaining?: number;
|
|
3015
|
+
/** Time when the current rate-limit window resets. */
|
|
3016
|
+
resetAt?: string;
|
|
3017
|
+
}
|
|
3018
|
+
|
|
3019
|
+
/**
|
|
3020
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3021
|
+
*/
|
|
3022
|
+
|
|
3023
|
+
/**
|
|
3024
|
+
* Standard error response for the stable evaluators and evaluation-rules API.
|
|
3025
|
+
*
|
|
3026
|
+
* Use the HTTP status for the broad failure class and `code` for programmatic handling. `details` is included when field-level validation or retry information is available.
|
|
3027
|
+
*
|
|
3028
|
+
* @example
|
|
3029
|
+
* {
|
|
3030
|
+
* message: "Invalid request body",
|
|
3031
|
+
* code: LangfuseAPI.PublicApiErrorCode.InvalidBody,
|
|
3032
|
+
* details: {
|
|
3033
|
+
* issues: [{
|
|
3034
|
+
* code: "invalid_type",
|
|
3035
|
+
* message: "Invalid input",
|
|
3036
|
+
* path: ["definition"]
|
|
3037
|
+
* }]
|
|
3038
|
+
* }
|
|
3039
|
+
* }
|
|
3040
|
+
*
|
|
3041
|
+
* @example
|
|
3042
|
+
* {
|
|
3043
|
+
* message: "Evaluator not found",
|
|
3044
|
+
* code: LangfuseAPI.PublicApiErrorCode.ResourceNotFound
|
|
3045
|
+
* }
|
|
3046
|
+
*
|
|
3047
|
+
* @example
|
|
3048
|
+
* {
|
|
3049
|
+
* message: "Rate limit exceeded",
|
|
3050
|
+
* code: LangfuseAPI.PublicApiErrorCode.RateLimited,
|
|
3051
|
+
* details: {
|
|
3052
|
+
* retryAfterSeconds: 60,
|
|
3053
|
+
* limit: 1000,
|
|
3054
|
+
* remaining: 0,
|
|
3055
|
+
* resetAt: "2026-03-30T10:00:00.000Z"
|
|
3056
|
+
* }
|
|
3057
|
+
* }
|
|
3058
|
+
*/
|
|
3059
|
+
interface PublicApiError$1 {
|
|
3060
|
+
/** Human-readable description of the failure. */
|
|
3061
|
+
message: string;
|
|
3062
|
+
/** Stable machine-readable error code. */
|
|
3063
|
+
code: PublicApiErrorCode$1;
|
|
3064
|
+
/** Optional structured validation or rate-limit context. */
|
|
3065
|
+
details?: PublicApiErrorDetails$1;
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
/**
|
|
3069
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3070
|
+
*/
|
|
3071
|
+
|
|
3072
|
+
declare class BadRequestError$1 extends LangfuseAPIError {
|
|
3073
|
+
constructor(body: PublicApiError$1, rawResponse?: RawResponse);
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
/**
|
|
3077
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3078
|
+
*/
|
|
3079
|
+
|
|
3080
|
+
declare class EvaluationUnauthorizedError extends LangfuseAPIError {
|
|
3081
|
+
constructor(body: PublicApiError$1, rawResponse?: RawResponse);
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
/**
|
|
3085
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3086
|
+
*/
|
|
3087
|
+
|
|
3088
|
+
declare class EvaluationAccessDeniedError extends LangfuseAPIError {
|
|
3089
|
+
constructor(body: PublicApiError$1, rawResponse?: RawResponse);
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3092
|
+
/**
|
|
3093
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3094
|
+
*/
|
|
3095
|
+
|
|
3096
|
+
declare class EvaluationNotFoundError extends LangfuseAPIError {
|
|
3097
|
+
constructor(body: PublicApiError$1, rawResponse?: RawResponse);
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
/**
|
|
3101
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3102
|
+
*/
|
|
3103
|
+
|
|
3104
|
+
declare class EvaluationMethodNotAllowedError extends LangfuseAPIError {
|
|
3105
|
+
constructor(body: PublicApiError$1, rawResponse?: RawResponse);
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
/**
|
|
3109
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3110
|
+
*/
|
|
3111
|
+
|
|
3112
|
+
declare class ConflictError$1 extends LangfuseAPIError {
|
|
3113
|
+
constructor(body: PublicApiError$1, rawResponse?: RawResponse);
|
|
3114
|
+
}
|
|
3115
|
+
|
|
3116
|
+
/**
|
|
3117
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3118
|
+
*/
|
|
3119
|
+
|
|
3120
|
+
declare class PreconditionFailedError extends LangfuseAPIError {
|
|
3121
|
+
constructor(body: PublicApiError$1, rawResponse?: RawResponse);
|
|
3122
|
+
}
|
|
3123
|
+
|
|
3124
|
+
/**
|
|
3125
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3126
|
+
*/
|
|
3127
|
+
|
|
3128
|
+
declare class TooManyRequestsError$1 extends LangfuseAPIError {
|
|
3129
|
+
constructor(body: PublicApiError$1, rawResponse?: RawResponse);
|
|
3130
|
+
}
|
|
3131
|
+
|
|
3132
|
+
/**
|
|
3133
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3134
|
+
*/
|
|
3135
|
+
|
|
3136
|
+
declare class InternalServerError$1 extends LangfuseAPIError {
|
|
3137
|
+
constructor(body: PublicApiError$1, rawResponse?: RawResponse);
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3140
|
+
type index$z_EvaluationAccessDeniedError = EvaluationAccessDeniedError;
|
|
3141
|
+
declare const index$z_EvaluationAccessDeniedError: typeof EvaluationAccessDeniedError;
|
|
3142
|
+
type index$z_EvaluationMethodNotAllowedError = EvaluationMethodNotAllowedError;
|
|
3143
|
+
declare const index$z_EvaluationMethodNotAllowedError: typeof EvaluationMethodNotAllowedError;
|
|
3144
|
+
type index$z_EvaluationNotFoundError = EvaluationNotFoundError;
|
|
3145
|
+
declare const index$z_EvaluationNotFoundError: typeof EvaluationNotFoundError;
|
|
3146
|
+
type index$z_EvaluationUnauthorizedError = EvaluationUnauthorizedError;
|
|
3147
|
+
declare const index$z_EvaluationUnauthorizedError: typeof EvaluationUnauthorizedError;
|
|
3148
|
+
type index$z_PreconditionFailedError = PreconditionFailedError;
|
|
3149
|
+
declare const index$z_PreconditionFailedError: typeof PreconditionFailedError;
|
|
3150
|
+
declare namespace index$z {
|
|
3151
|
+
export { BadRequestError$1 as BadRequestError, ConflictError$1 as ConflictError, index$z_EvaluationAccessDeniedError as EvaluationAccessDeniedError, index$z_EvaluationMethodNotAllowedError as EvaluationMethodNotAllowedError, index$z_EvaluationNotFoundError as EvaluationNotFoundError, index$z_EvaluationUnauthorizedError as EvaluationUnauthorizedError, InternalServerError$1 as InternalServerError, index$z_PreconditionFailedError as PreconditionFailedError, type PublicApiError$1 as PublicApiError, PublicApiErrorCode$1 as PublicApiErrorCode, type PublicApiErrorDetails$1 as PublicApiErrorDetails, type PublicApiValidationIssue$1 as PublicApiValidationIssue, TooManyRequestsError$1 as TooManyRequestsError };
|
|
3152
|
+
}
|
|
3153
|
+
|
|
3154
|
+
/**
|
|
3155
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3156
|
+
*/
|
|
3157
|
+
|
|
3158
|
+
interface EvaluationRuleEvaluatorAssignmentInput {
|
|
3159
|
+
/** Stable evaluator identifier. The rule automatically uses that evaluator's latest version. */
|
|
3160
|
+
evaluatorId: string;
|
|
3161
|
+
/**
|
|
3162
|
+
* Rule-specific prompt-variable mapping.
|
|
3163
|
+
*
|
|
3164
|
+
* Set to `null` or omit to inherit the evaluator's latest default mapping. Code evaluators use the fixed runtime mapping and should use `null`.
|
|
3165
|
+
*/
|
|
3166
|
+
variableMapping?: PromptVariableMappingInput$1[] | null;
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
/**
|
|
3170
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3171
|
+
*/
|
|
3172
|
+
|
|
3173
|
+
interface EvaluatorAssignment {
|
|
3174
|
+
/** Stable identifier of the evaluator associated with this rule. */
|
|
3175
|
+
evaluatorId: string;
|
|
3176
|
+
/** Stored rule-specific override, or `null` when the evaluator's latest default mapping is inherited. Legacy mappings are returned as an explicit `legacy` variant. */
|
|
3177
|
+
variableMapping: PromptVariableMapping[] | null;
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3180
|
+
/**
|
|
3181
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3182
|
+
*/
|
|
3183
|
+
|
|
3184
|
+
/**
|
|
3185
|
+
* Live evaluation rule for incoming observations.
|
|
3186
|
+
*
|
|
3187
|
+
* A rule determines which evaluators should be used, which observations should trigger scoring, how often scoring should run, and which observation fields should populate prompt variables.
|
|
3188
|
+
*/
|
|
3189
|
+
interface EvaluationRule$1 {
|
|
3190
|
+
/** Stable evaluation-rule identifier. */
|
|
3191
|
+
id: string;
|
|
3192
|
+
/** Human-readable rule name. This is independent from evaluator names and does not need to be unique. */
|
|
3193
|
+
name: string;
|
|
3194
|
+
/** User who created this rule, or `null` when no user can be resolved. */
|
|
3195
|
+
createdBy: Creator | null;
|
|
3196
|
+
/** Whether live execution is enabled for this rule. */
|
|
3197
|
+
enabled: boolean;
|
|
3198
|
+
/**
|
|
3199
|
+
* Fraction of matching observations that should be evaluated.
|
|
3200
|
+
*
|
|
3201
|
+
* Must be between `0` and `1`.
|
|
3202
|
+
* - `1` evaluates every matching observation.
|
|
3203
|
+
* - `0.25` evaluates approximately 25% of matching observations.
|
|
3204
|
+
*/
|
|
3205
|
+
sampling: number;
|
|
3206
|
+
/** List of stored filter conditions returned verbatim. Filters with a `key` use the keyed response shape; all others use the base shape. These response shapes are not broken down by internal filter type. An empty list matches every incoming object. */
|
|
3207
|
+
filter: EvaluationRuleReadFilter[];
|
|
3208
|
+
/** Evaluators attached to this rule in deterministic assignment order. */
|
|
3209
|
+
evaluatorAssignments: EvaluatorAssignment[];
|
|
3210
|
+
/** Timestamp when the evaluation rule was created. */
|
|
3211
|
+
createdAt: string;
|
|
3212
|
+
/** Timestamp when the evaluation rule was last updated. */
|
|
3213
|
+
updatedAt: string;
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3216
|
+
/**
|
|
3217
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3218
|
+
*/
|
|
3219
|
+
|
|
3220
|
+
interface CreateEvaluationRuleRequest$1 {
|
|
3221
|
+
/** Human-readable rule name. Names are not identifiers and do not need to be unique. */
|
|
3222
|
+
name: string;
|
|
3223
|
+
/** Whether live execution should start immediately. Enabled rules require at least one evaluator assignment. */
|
|
3224
|
+
enabled: boolean;
|
|
3225
|
+
/** Fraction of matching observations to evaluate. Omit this field to use the default of `1`, which evaluates every match. `null` is not accepted. */
|
|
3226
|
+
sampling?: number;
|
|
3227
|
+
/** Conditions used to select observations. Defaults to an empty list, which matches every incoming observation. */
|
|
3228
|
+
filter?: EvaluationRuleFilter$1[];
|
|
3229
|
+
/** Evaluators to attach to this rule. Disabled rules may use an empty list as a draft. */
|
|
3230
|
+
evaluatorAssignments: EvaluationRuleEvaluatorAssignmentInput[];
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
/**
|
|
3234
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3235
|
+
*/
|
|
3236
|
+
|
|
3237
|
+
/**
|
|
3238
|
+
* At least one field must be provided.
|
|
3239
|
+
*/
|
|
3240
|
+
interface UpdateEvaluationRuleRequest$1 {
|
|
3241
|
+
/** New human-readable rule name. */
|
|
3242
|
+
name?: string;
|
|
3243
|
+
/** New desired live-execution state. */
|
|
3244
|
+
enabled?: boolean;
|
|
3245
|
+
/** New fraction of matching observations to evaluate. Omit to keep the current value. */
|
|
3246
|
+
sampling?: number;
|
|
3247
|
+
/** Complete replacement filter list. An empty list matches every incoming observation. */
|
|
3248
|
+
filter?: EvaluationRuleFilter$1[];
|
|
3249
|
+
/** Complete replacement assignment list. An empty list disables the rule. */
|
|
3250
|
+
evaluatorAssignments?: EvaluationRuleEvaluatorAssignmentInput[];
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3253
|
+
/**
|
|
3254
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3255
|
+
*/
|
|
3256
|
+
|
|
3257
|
+
interface EvaluationRulesPage {
|
|
3258
|
+
/** Evaluation rules for this page. */
|
|
3259
|
+
data: EvaluationRule$1[];
|
|
3260
|
+
/** Cursor pagination metadata. */
|
|
3261
|
+
meta: CursorMeta;
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
/**
|
|
3265
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3266
|
+
*/
|
|
3267
|
+
/**
|
|
3268
|
+
* Confirmation returned after successful evaluation-rule deletion.
|
|
3269
|
+
*/
|
|
3270
|
+
interface DeletedEvaluationRule {
|
|
3271
|
+
/** Identifier of the deleted evaluation rule. */
|
|
3272
|
+
id: string;
|
|
3273
|
+
}
|
|
3274
|
+
|
|
3275
|
+
/**
|
|
3276
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3277
|
+
*/
|
|
3278
|
+
/**
|
|
3279
|
+
* @example
|
|
3280
|
+
* {}
|
|
3281
|
+
*/
|
|
3282
|
+
interface ListEvaluationRulesRequest$1 {
|
|
3283
|
+
/** Maximum number of items to return. Defaults to `50` and cannot exceed `100`. */
|
|
3284
|
+
limit?: number;
|
|
3285
|
+
/** Opaque cursor returned by the previous page. */
|
|
3286
|
+
cursor?: string;
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3289
|
+
type index$y_DeletedEvaluationRule = DeletedEvaluationRule;
|
|
3290
|
+
type index$y_EvaluationRuleEvaluatorAssignmentInput = EvaluationRuleEvaluatorAssignmentInput;
|
|
3291
|
+
type index$y_EvaluationRulesPage = EvaluationRulesPage;
|
|
3292
|
+
type index$y_EvaluatorAssignment = EvaluatorAssignment;
|
|
3293
|
+
declare namespace index$y {
|
|
3294
|
+
export type { CreateEvaluationRuleRequest$1 as CreateEvaluationRuleRequest, index$y_DeletedEvaluationRule as DeletedEvaluationRule, EvaluationRule$1 as EvaluationRule, index$y_EvaluationRuleEvaluatorAssignmentInput as EvaluationRuleEvaluatorAssignmentInput, index$y_EvaluationRulesPage as EvaluationRulesPage, index$y_EvaluatorAssignment as EvaluatorAssignment, ListEvaluationRulesRequest$1 as ListEvaluationRulesRequest, UpdateEvaluationRuleRequest$1 as UpdateEvaluationRuleRequest };
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3297
|
+
/**
|
|
3298
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3299
|
+
*/
|
|
3300
|
+
/**
|
|
3301
|
+
* User who created the resource, or `null` when no user can be resolved.
|
|
3302
|
+
*/
|
|
3303
|
+
interface Creator {
|
|
3304
|
+
/** User identifier. */
|
|
3305
|
+
id: string;
|
|
3306
|
+
/** User name, or `null` when unavailable. */
|
|
3307
|
+
name: string | null;
|
|
3308
|
+
}
|
|
3309
|
+
|
|
3310
|
+
/**
|
|
3311
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3312
|
+
*/
|
|
3313
|
+
/**
|
|
3314
|
+
* Explicit model configuration for an evaluator.
|
|
3315
|
+
*
|
|
3316
|
+
* If the complete `modelConfig` is `null`, Langfuse uses the project's default evaluation model.
|
|
3317
|
+
* If provided, the model must be available to the project when the evaluator or evaluation rule is enabled.
|
|
3318
|
+
*
|
|
3319
|
+
* @example
|
|
3320
|
+
* {
|
|
3321
|
+
* provider: "openai",
|
|
3322
|
+
* model: "gpt-4.1-mini"
|
|
3323
|
+
* }
|
|
3324
|
+
*/
|
|
3325
|
+
interface EvaluatorModelConfig$1 {
|
|
3326
|
+
/**
|
|
3327
|
+
* Provider identifier, for example `openai` or `anthropic`.
|
|
3328
|
+
*
|
|
3329
|
+
* To discover valid values for the current project, call `GET /api/public/llm-connections` and use one of the returned `provider` values.
|
|
3330
|
+
*/
|
|
3331
|
+
provider: string;
|
|
3332
|
+
/** Model identifier exposed by the provider, for example `gpt-4.1-mini`. */
|
|
3333
|
+
model: string;
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
/**
|
|
3337
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3338
|
+
*/
|
|
3339
|
+
/**
|
|
3340
|
+
* One user chat message in an evaluator prompt.
|
|
3341
|
+
*/
|
|
3342
|
+
interface EvaluatorChatMessage {
|
|
3343
|
+
role: "user";
|
|
3344
|
+
/** Message content. Evaluator variables use `{{variable}}` syntax. */
|
|
3345
|
+
content: string;
|
|
3346
|
+
}
|
|
3347
|
+
|
|
3348
|
+
/**
|
|
3349
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3350
|
+
*/
|
|
3351
|
+
|
|
3352
|
+
/**
|
|
3353
|
+
* A list containing exactly one user chat message.
|
|
3354
|
+
*/
|
|
3355
|
+
type EvaluatorChatPrompt = EvaluatorChatMessage[];
|
|
3356
|
+
|
|
3357
|
+
/**
|
|
3358
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3359
|
+
*/
|
|
3360
|
+
|
|
3361
|
+
/**
|
|
3362
|
+
* A user prompt string, or a list containing exactly one user chat message.
|
|
3363
|
+
*/
|
|
3364
|
+
type EvaluatorChatPromptInput = string | EvaluatorChatPrompt;
|
|
3365
|
+
|
|
3366
|
+
/**
|
|
3367
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3368
|
+
*/
|
|
3369
|
+
|
|
3370
|
+
interface EvaluatorVersionBase {
|
|
3371
|
+
/** Stable identifier of this evaluator version. */
|
|
3372
|
+
id: string;
|
|
3373
|
+
/** Monotonically increasing evaluator version number. */
|
|
3374
|
+
version: number;
|
|
3375
|
+
/** Timestamp when this evaluator version was created. */
|
|
3376
|
+
createdAt: string;
|
|
3377
|
+
/** User who created this version, or `null` when no user can be resolved. */
|
|
3378
|
+
createdBy: Creator | null;
|
|
3379
|
+
}
|
|
3380
|
+
|
|
3381
|
+
/**
|
|
3382
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3383
|
+
*/
|
|
3384
|
+
|
|
3385
|
+
interface LlmAsJudgeEvaluatorVersion extends EvaluatorVersionBase {
|
|
3386
|
+
/** Evaluator type. */
|
|
3387
|
+
type: "llm_as_judge";
|
|
3388
|
+
/** The single user chat message used during evaluation. */
|
|
3389
|
+
prompt: EvaluatorChatPrompt;
|
|
3390
|
+
/**
|
|
3391
|
+
* Variables extracted from the prompt and available for evaluation-rule mappings.
|
|
3392
|
+
*
|
|
3393
|
+
* Every variable must be mapped exactly once when a rule provides an explicit mapping.
|
|
3394
|
+
*/
|
|
3395
|
+
variables: string[];
|
|
3396
|
+
/** Default variable mapping for this evaluator version, or `null` when no default is configured. */
|
|
3397
|
+
variableMapping: PromptVariableMappingRead$1[] | null;
|
|
3398
|
+
/** Explicit model configuration, or `null` when the project's default evaluation model is used. */
|
|
3399
|
+
modelConfig: EvaluatorModelConfig$1 | null;
|
|
3400
|
+
/**
|
|
3401
|
+
* Structured output schema returned by this evaluator.
|
|
3402
|
+
*
|
|
3403
|
+
* Responses include `dataType` and omit the internal output-definition persistence version.
|
|
3404
|
+
*/
|
|
3405
|
+
outputDefinition: PublicEvaluatorOutputDefinition$1;
|
|
3406
|
+
}
|
|
3407
|
+
|
|
3408
|
+
/**
|
|
3409
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3410
|
+
*/
|
|
3411
|
+
|
|
3412
|
+
interface CodeEvaluatorVersion extends EvaluatorVersionBase {
|
|
3413
|
+
/** Evaluator type. */
|
|
3414
|
+
type: "code";
|
|
3415
|
+
/** Source code executed for each matched observation. */
|
|
3416
|
+
sourceCode: string;
|
|
3417
|
+
/** Runtime language used to execute the source code. */
|
|
3418
|
+
sourceCodeLanguage: CodeEvaluatorSourceCodeLanguage$1;
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
/**
|
|
3422
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3423
|
+
*/
|
|
3424
|
+
|
|
3425
|
+
type EvaluatorVersion = EvaluatorVersion.LlmAsJudge | EvaluatorVersion.Code;
|
|
3426
|
+
declare namespace EvaluatorVersion {
|
|
3427
|
+
interface LlmAsJudge extends LlmAsJudgeEvaluatorVersion {
|
|
3428
|
+
type: "llm_as_judge";
|
|
3429
|
+
}
|
|
3430
|
+
interface Code extends CodeEvaluatorVersion {
|
|
3431
|
+
type: "code";
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
/**
|
|
3436
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3437
|
+
*/
|
|
3438
|
+
|
|
3439
|
+
/**
|
|
3440
|
+
* Evaluation-rule assignment associated with this evaluator.
|
|
3441
|
+
*/
|
|
3442
|
+
interface EvaluationRuleAssignment {
|
|
3443
|
+
/** Stable identifier of the assigned evaluation rule. */
|
|
3444
|
+
evaluationRuleId: string;
|
|
3445
|
+
/** Rule-specific variable mapping override. Omitted when the evaluator's latest default mapping is inherited. Legacy mappings use the explicit `legacy` variant. */
|
|
3446
|
+
variableMappingOverride?: PromptVariableMapping[];
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3449
|
+
/**
|
|
3450
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3451
|
+
*/
|
|
3452
|
+
|
|
3453
|
+
interface EvaluatorBase$1 {
|
|
3454
|
+
/** Stable identifier of this evaluator across all versions. */
|
|
3455
|
+
id: string;
|
|
3456
|
+
/** Human-readable evaluator name. Names are not identifiers and do not need to be unique. */
|
|
3457
|
+
name: string;
|
|
3458
|
+
/** Optional human-readable evaluator description. */
|
|
3459
|
+
description: string | null;
|
|
3460
|
+
/** User who created this evaluator, or `null` when no user can be resolved. */
|
|
3461
|
+
createdBy: Creator | null;
|
|
3462
|
+
/** Effective evaluator status after Langfuse validates its runtime configuration. */
|
|
3463
|
+
status: EvaluatorStatus;
|
|
3464
|
+
/** Timestamp when the evaluator was paused, otherwise `null`. */
|
|
3465
|
+
pausedAt: string | null;
|
|
3466
|
+
/** Machine-readable reason when `status=paused`, otherwise `null`. */
|
|
3467
|
+
pausedReason: string | null;
|
|
3468
|
+
/** Human-readable explanation when `status=paused`, otherwise `null`. */
|
|
3469
|
+
pausedMessage: string | null;
|
|
3470
|
+
/** All modern and legacy evaluation-rule assignments in newest-assignment-first order. Rule-specific mappings are exposed as `variableMappingOverride`; inherited defaults are omitted. */
|
|
3471
|
+
evaluationRuleAssignments: EvaluationRuleAssignment[];
|
|
3472
|
+
/** Timestamp when the evaluator was created. */
|
|
3473
|
+
createdAt: string;
|
|
3474
|
+
/** Timestamp when the evaluator was last updated. */
|
|
3475
|
+
updatedAt: string;
|
|
3476
|
+
/** Stable identifier of the latest evaluator version. */
|
|
3477
|
+
versionId: string;
|
|
3478
|
+
/** Monotonically increasing latest evaluator version number. */
|
|
3479
|
+
version: number;
|
|
3480
|
+
/** Timestamp when the latest evaluator version was created. */
|
|
3481
|
+
versionCreatedAt: string;
|
|
3482
|
+
/** User who created the latest evaluator version, or `null` when no user can be resolved. */
|
|
3483
|
+
versionCreatedBy: Creator | null;
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
/**
|
|
3487
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3488
|
+
*/
|
|
3489
|
+
|
|
3490
|
+
interface LlmAsJudgeEvaluator$1 extends EvaluatorBase$1 {
|
|
3491
|
+
/** Evaluator type. */
|
|
3492
|
+
type: "llm_as_judge";
|
|
3493
|
+
/** The single user chat message used by the latest evaluator version. */
|
|
3494
|
+
prompt: EvaluatorChatPrompt;
|
|
3495
|
+
/** Variables extracted from the latest prompt and available for evaluation-rule mappings. */
|
|
3496
|
+
variables: string[];
|
|
3497
|
+
/** Default variable mapping for the latest version, or `null` when no default is configured. */
|
|
3498
|
+
variableMapping: PromptVariableMappingRead$1[] | null;
|
|
3499
|
+
/** Explicit model configuration for the latest version, or `null` when the project's default evaluation model is used. */
|
|
3500
|
+
modelConfig: EvaluatorModelConfig$1 | null;
|
|
3501
|
+
/** Structured output schema returned by the latest evaluator version. */
|
|
3502
|
+
outputDefinition: PublicEvaluatorOutputDefinition$1;
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
/**
|
|
3506
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3507
|
+
*/
|
|
3508
|
+
|
|
3509
|
+
interface CodeEvaluator$1 extends EvaluatorBase$1 {
|
|
3510
|
+
/** Evaluator type. */
|
|
3511
|
+
type: "code";
|
|
3512
|
+
/** Source code executed by the latest evaluator version. */
|
|
3513
|
+
sourceCode: string;
|
|
3514
|
+
/** Runtime language used to execute the latest source code. */
|
|
3515
|
+
sourceCodeLanguage: CodeEvaluatorSourceCodeLanguage$1;
|
|
3516
|
+
}
|
|
3517
|
+
|
|
3518
|
+
/**
|
|
3519
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3520
|
+
*/
|
|
3521
|
+
|
|
3522
|
+
/**
|
|
3523
|
+
* One evaluator that can be used for scoring.
|
|
3524
|
+
*
|
|
3525
|
+
* An evaluator describes **how** to score data. Associated evaluation rules describe **which** live objects should be evaluated.
|
|
3526
|
+
*/
|
|
3527
|
+
type Evaluator$1 = Evaluator$1.LlmAsJudge | Evaluator$1.Code;
|
|
3528
|
+
declare namespace Evaluator$1 {
|
|
3529
|
+
interface LlmAsJudge extends LlmAsJudgeEvaluator$1 {
|
|
3530
|
+
type: "llm_as_judge";
|
|
3531
|
+
}
|
|
3532
|
+
interface Code extends CodeEvaluator$1 {
|
|
3533
|
+
type: "code";
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3537
|
+
/**
|
|
3538
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3539
|
+
*/
|
|
3540
|
+
/**
|
|
3541
|
+
* Effective evaluator runtime status.
|
|
3542
|
+
*
|
|
3543
|
+
* - `active`: the evaluator can run.
|
|
3544
|
+
* - `paused`: Langfuse paused execution until the underlying issue is resolved.
|
|
3545
|
+
*/
|
|
3546
|
+
type EvaluatorStatus = "active" | "paused";
|
|
3547
|
+
declare const EvaluatorStatus: {
|
|
3548
|
+
readonly Active: "active";
|
|
3549
|
+
readonly Paused: "paused";
|
|
3550
|
+
};
|
|
3551
|
+
|
|
3552
|
+
/**
|
|
3553
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3554
|
+
*/
|
|
3555
|
+
|
|
3556
|
+
interface CreateLlmAsJudgeEvaluatorRequest$1 {
|
|
3557
|
+
/** Human-readable evaluator name. Names are not identifiers and do not need to be unique. */
|
|
3558
|
+
name: string;
|
|
3559
|
+
/** Optional human-readable evaluator description. */
|
|
3560
|
+
description?: string | null;
|
|
3561
|
+
/** Evaluator type. */
|
|
3562
|
+
type: "llm_as_judge";
|
|
3563
|
+
/** User prompt string shortcut or a list containing exactly one user chat message. */
|
|
3564
|
+
prompt: EvaluatorChatPromptInput;
|
|
3565
|
+
/** Explicit model configuration. Set to `null` or omit to use the project's default evaluation model. */
|
|
3566
|
+
modelConfig?: EvaluatorModelConfig$1 | null;
|
|
3567
|
+
/** Default prompt-variable mapping, or `null` when no default is configured. */
|
|
3568
|
+
variableMapping?: PromptVariableMappingInput$1[] | null;
|
|
3569
|
+
/** Structured output schema returned by this evaluator. Do not include an internal persistence version. */
|
|
3570
|
+
outputDefinition: EvaluatorOutputDefinition$1;
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
/**
|
|
3574
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3575
|
+
*/
|
|
3576
|
+
|
|
3577
|
+
interface CreateCodeEvaluatorRequest$1 {
|
|
3578
|
+
/** Human-readable evaluator name. Names are not identifiers and do not need to be unique. */
|
|
3579
|
+
name: string;
|
|
3580
|
+
/** Optional human-readable evaluator description. */
|
|
3581
|
+
description?: string | null;
|
|
3582
|
+
/** Evaluator type. */
|
|
3583
|
+
type: "code";
|
|
3584
|
+
/** Source code executed for each matched observation. */
|
|
3585
|
+
sourceCode: string;
|
|
3586
|
+
/** Runtime language used to execute the source code. */
|
|
3587
|
+
sourceCodeLanguage: CodeEvaluatorSourceCodeLanguage$1;
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
/**
|
|
3591
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3592
|
+
*/
|
|
3593
|
+
|
|
3594
|
+
/**
|
|
3595
|
+
* Initial evaluator definition with metadata and definition fields at the same level. The returned evaluator starts at version `1`.
|
|
3596
|
+
*/
|
|
3597
|
+
type CreateEvaluatorRequest$1 = CreateEvaluatorRequest$1.LlmAsJudge | CreateEvaluatorRequest$1.Code;
|
|
3598
|
+
declare namespace CreateEvaluatorRequest$1 {
|
|
3599
|
+
interface LlmAsJudge extends CreateLlmAsJudgeEvaluatorRequest$1 {
|
|
3600
|
+
type: "llm_as_judge";
|
|
3601
|
+
}
|
|
3602
|
+
interface Code extends CreateCodeEvaluatorRequest$1 {
|
|
3603
|
+
type: "code";
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3607
|
+
/**
|
|
3608
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3609
|
+
*/
|
|
3610
|
+
/**
|
|
3611
|
+
* Metadata-only update. At least one field must be provided.
|
|
3612
|
+
*/
|
|
3613
|
+
interface UpdateEvaluatorMetadataRequest {
|
|
3614
|
+
/** New human-readable evaluator name. */
|
|
3615
|
+
name?: string;
|
|
3616
|
+
/** New description. Set to `null` to clear it. */
|
|
3617
|
+
description?: string | null;
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
/**
|
|
3621
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3622
|
+
*/
|
|
3623
|
+
|
|
3624
|
+
interface UpdateLlmAsJudgeEvaluatorRequest {
|
|
3625
|
+
/** New human-readable evaluator name. */
|
|
3626
|
+
name?: string;
|
|
3627
|
+
/** New description. Set to `null` to clear it. */
|
|
3628
|
+
description?: string | null;
|
|
3629
|
+
/** Evaluator type. The type of an existing evaluator cannot change. */
|
|
3630
|
+
type: "llm_as_judge";
|
|
3631
|
+
/** Complete replacement user prompt string or a list containing exactly one user chat message. */
|
|
3632
|
+
prompt: EvaluatorChatPromptInput;
|
|
3633
|
+
/** Explicit model configuration. Set to `null` or omit to use the project's default evaluation model. */
|
|
3634
|
+
modelConfig?: EvaluatorModelConfig$1 | null;
|
|
3635
|
+
/** Complete replacement default variable mapping, or `null` when no default is configured. */
|
|
3636
|
+
variableMapping?: PromptVariableMappingInput$1[] | null;
|
|
3637
|
+
/** Complete replacement output schema. Do not include an internal persistence version. */
|
|
3638
|
+
outputDefinition: EvaluatorOutputDefinition$1;
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3643
|
+
*/
|
|
3644
|
+
|
|
3645
|
+
interface UpdateCodeEvaluatorRequest {
|
|
3646
|
+
/** New human-readable evaluator name. */
|
|
3647
|
+
name?: string;
|
|
3648
|
+
/** New description. Set to `null` to clear it. */
|
|
3649
|
+
description?: string | null;
|
|
3650
|
+
/** Evaluator type. The type of an existing evaluator cannot change. */
|
|
3651
|
+
type: "code";
|
|
3652
|
+
/** Complete replacement source code. */
|
|
3653
|
+
sourceCode: string;
|
|
3654
|
+
/** Runtime language used to execute the source code. */
|
|
3655
|
+
sourceCodeLanguage: CodeEvaluatorSourceCodeLanguage$1;
|
|
3656
|
+
}
|
|
3657
|
+
|
|
3658
|
+
/**
|
|
3659
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3660
|
+
*/
|
|
3661
|
+
|
|
3662
|
+
/**
|
|
3663
|
+
* Metadata-only update or complete flattened definition replacement. At least one field must be provided.
|
|
3664
|
+
*/
|
|
3665
|
+
type UpdateEvaluatorRequest = UpdateEvaluatorMetadataRequest | UpdateLlmAsJudgeEvaluatorRequest | UpdateCodeEvaluatorRequest;
|
|
3666
|
+
|
|
3667
|
+
/**
|
|
3668
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3669
|
+
*/
|
|
3670
|
+
|
|
3671
|
+
interface EvaluatorsPage {
|
|
3672
|
+
/** Evaluators for this page. */
|
|
3673
|
+
data: Evaluator$1[];
|
|
3674
|
+
/** Cursor pagination metadata. */
|
|
3675
|
+
meta: CursorMeta;
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3678
|
+
/**
|
|
3679
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3680
|
+
*/
|
|
3681
|
+
|
|
3682
|
+
interface EvaluatorVersionsPage {
|
|
3683
|
+
/** Evaluator versions for this page in newest-first order. */
|
|
3684
|
+
data: EvaluatorVersion[];
|
|
3685
|
+
/** Cursor pagination metadata. */
|
|
3686
|
+
meta: CursorMeta;
|
|
3687
|
+
}
|
|
3688
|
+
|
|
3689
|
+
/**
|
|
3690
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3691
|
+
*/
|
|
3692
|
+
interface CursorMeta {
|
|
3693
|
+
/** Opaque cursor for the next page. Omitted when there is no next page. */
|
|
3694
|
+
cursor?: string;
|
|
3695
|
+
}
|
|
3696
|
+
|
|
3697
|
+
/**
|
|
3698
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3699
|
+
*/
|
|
3700
|
+
/**
|
|
3701
|
+
* Confirmation returned after successful evaluator deletion.
|
|
3702
|
+
*/
|
|
3703
|
+
interface DeletedEvaluator {
|
|
3704
|
+
/** Identifier of the deleted evaluator. */
|
|
3705
|
+
id: string;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
/**
|
|
3709
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3710
|
+
*/
|
|
3711
|
+
/**
|
|
3712
|
+
* @example
|
|
3713
|
+
* {}
|
|
3714
|
+
*/
|
|
3715
|
+
interface ListEvaluatorsRequest$1 {
|
|
3716
|
+
/** Maximum number of items to return. Defaults to `50` and cannot exceed `100`. */
|
|
3717
|
+
limit?: number;
|
|
3718
|
+
/** Opaque cursor returned by the previous page. */
|
|
3719
|
+
cursor?: string;
|
|
3720
|
+
}
|
|
3721
|
+
|
|
3722
|
+
/**
|
|
3723
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3724
|
+
*/
|
|
3725
|
+
/**
|
|
3726
|
+
* @example
|
|
3727
|
+
* {}
|
|
3728
|
+
*/
|
|
3729
|
+
interface ListEvaluatorVersionsRequest {
|
|
3730
|
+
/** Maximum number of versions to return. Defaults to `50` and cannot exceed `100`. */
|
|
3731
|
+
limit?: number;
|
|
3732
|
+
/** Opaque cursor returned by the previous page. */
|
|
3733
|
+
cursor?: string;
|
|
3734
|
+
}
|
|
3735
|
+
|
|
3736
|
+
type index$x_CodeEvaluatorVersion = CodeEvaluatorVersion;
|
|
3737
|
+
type index$x_Creator = Creator;
|
|
3738
|
+
type index$x_CursorMeta = CursorMeta;
|
|
3739
|
+
type index$x_DeletedEvaluator = DeletedEvaluator;
|
|
3740
|
+
type index$x_EvaluationRuleAssignment = EvaluationRuleAssignment;
|
|
3741
|
+
type index$x_EvaluatorChatMessage = EvaluatorChatMessage;
|
|
3742
|
+
type index$x_EvaluatorChatPrompt = EvaluatorChatPrompt;
|
|
3743
|
+
type index$x_EvaluatorChatPromptInput = EvaluatorChatPromptInput;
|
|
3744
|
+
declare const index$x_EvaluatorStatus: typeof EvaluatorStatus;
|
|
3745
|
+
declare const index$x_EvaluatorVersion: typeof EvaluatorVersion;
|
|
3746
|
+
type index$x_EvaluatorVersionBase = EvaluatorVersionBase;
|
|
3747
|
+
type index$x_EvaluatorVersionsPage = EvaluatorVersionsPage;
|
|
3748
|
+
type index$x_EvaluatorsPage = EvaluatorsPage;
|
|
3749
|
+
type index$x_ListEvaluatorVersionsRequest = ListEvaluatorVersionsRequest;
|
|
3750
|
+
type index$x_LlmAsJudgeEvaluatorVersion = LlmAsJudgeEvaluatorVersion;
|
|
3751
|
+
type index$x_UpdateCodeEvaluatorRequest = UpdateCodeEvaluatorRequest;
|
|
3752
|
+
type index$x_UpdateEvaluatorMetadataRequest = UpdateEvaluatorMetadataRequest;
|
|
3753
|
+
type index$x_UpdateEvaluatorRequest = UpdateEvaluatorRequest;
|
|
3754
|
+
type index$x_UpdateLlmAsJudgeEvaluatorRequest = UpdateLlmAsJudgeEvaluatorRequest;
|
|
3755
|
+
declare namespace index$x {
|
|
3756
|
+
export { type CodeEvaluator$1 as CodeEvaluator, type index$x_CodeEvaluatorVersion as CodeEvaluatorVersion, type CreateCodeEvaluatorRequest$1 as CreateCodeEvaluatorRequest, CreateEvaluatorRequest$1 as CreateEvaluatorRequest, type CreateLlmAsJudgeEvaluatorRequest$1 as CreateLlmAsJudgeEvaluatorRequest, type index$x_Creator as Creator, type index$x_CursorMeta as CursorMeta, type index$x_DeletedEvaluator as DeletedEvaluator, type index$x_EvaluationRuleAssignment as EvaluationRuleAssignment, Evaluator$1 as Evaluator, type EvaluatorBase$1 as EvaluatorBase, type index$x_EvaluatorChatMessage as EvaluatorChatMessage, type index$x_EvaluatorChatPrompt as EvaluatorChatPrompt, type index$x_EvaluatorChatPromptInput as EvaluatorChatPromptInput, type EvaluatorModelConfig$1 as EvaluatorModelConfig, index$x_EvaluatorStatus as EvaluatorStatus, index$x_EvaluatorVersion as EvaluatorVersion, type index$x_EvaluatorVersionBase as EvaluatorVersionBase, type index$x_EvaluatorVersionsPage as EvaluatorVersionsPage, type index$x_EvaluatorsPage as EvaluatorsPage, type index$x_ListEvaluatorVersionsRequest as ListEvaluatorVersionsRequest, type ListEvaluatorsRequest$1 as ListEvaluatorsRequest, type LlmAsJudgeEvaluator$1 as LlmAsJudgeEvaluator, type index$x_LlmAsJudgeEvaluatorVersion as LlmAsJudgeEvaluatorVersion, type index$x_UpdateCodeEvaluatorRequest as UpdateCodeEvaluatorRequest, type index$x_UpdateEvaluatorMetadataRequest as UpdateEvaluatorMetadataRequest, type index$x_UpdateEvaluatorRequest as UpdateEvaluatorRequest, type index$x_UpdateLlmAsJudgeEvaluatorRequest as UpdateLlmAsJudgeEvaluatorRequest };
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3759
|
+
/**
|
|
3760
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3761
|
+
*/
|
|
3762
|
+
|
|
3763
|
+
interface ExperimentsResponse {
|
|
3764
|
+
data: Experiment[];
|
|
3765
|
+
meta: ExperimentsResponseMeta;
|
|
3766
|
+
}
|
|
3767
|
+
|
|
3768
|
+
/**
|
|
3769
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3770
|
+
*/
|
|
3771
|
+
interface ExperimentsResponseMeta {
|
|
3772
|
+
/** Versioned base64url cursor for retrieving the next page. Absent when there are no more results. */
|
|
3773
|
+
cursor?: string;
|
|
3774
|
+
}
|
|
3775
|
+
|
|
3776
|
+
/**
|
|
3777
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3778
|
+
*/
|
|
3779
|
+
|
|
3780
|
+
interface Experiment {
|
|
3781
|
+
id: string;
|
|
3782
|
+
name: string;
|
|
3783
|
+
description: string | null;
|
|
3784
|
+
/**
|
|
3785
|
+
* Start of the experiment, i.e. the earliest event within the
|
|
3786
|
+
* requested time range. Clipped to `fromStartTime` when the
|
|
3787
|
+
* experiment started before the requested range.
|
|
3788
|
+
*/
|
|
3789
|
+
startTime: string;
|
|
3790
|
+
/**
|
|
3791
|
+
* End of the experiment, i.e. the latest event end within the
|
|
3792
|
+
* requested time range.
|
|
3793
|
+
*/
|
|
3794
|
+
endTime: string;
|
|
3795
|
+
/** Number of experiment items within the requested time range. */
|
|
3796
|
+
itemCount: number;
|
|
3797
|
+
/** Null when the experiment is not associated with a dataset. */
|
|
3798
|
+
datasetId: string | null;
|
|
3799
|
+
/** Included only when `fields=metadata` is requested. */
|
|
3800
|
+
metadata?: Record<string, unknown> | null;
|
|
3801
|
+
/** Included only when `fields=scores` is requested. Contains scores directly attached to the experiment. */
|
|
3802
|
+
scores?: ScoreV3[];
|
|
3803
|
+
}
|
|
3804
|
+
|
|
3805
|
+
/**
|
|
3806
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3807
|
+
*/
|
|
3808
|
+
|
|
3809
|
+
interface ExperimentItemsResponse {
|
|
3810
|
+
data: ExperimentItem[];
|
|
3811
|
+
meta: ExperimentsResponseMeta;
|
|
3812
|
+
}
|
|
3813
|
+
|
|
3814
|
+
/**
|
|
3815
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3816
|
+
*/
|
|
3817
|
+
|
|
3818
|
+
interface ExperimentItem {
|
|
3819
|
+
id: string;
|
|
3820
|
+
traceId: string;
|
|
3821
|
+
startTime: string;
|
|
3822
|
+
endTime: string | null;
|
|
3823
|
+
level: ObservationLevel;
|
|
3824
|
+
environment: string;
|
|
3825
|
+
experimentId: string;
|
|
3826
|
+
experimentName: string;
|
|
3827
|
+
experimentItemId: string;
|
|
3828
|
+
/** Included when `fields=dataset` is requested. */
|
|
3829
|
+
experimentDatasetId?: string | null;
|
|
3830
|
+
/** Included when `fields=dataset` is requested. */
|
|
3831
|
+
experimentItemVersion?: string | null;
|
|
3832
|
+
/** Included when `fields=io` is requested. */
|
|
3833
|
+
input?: unknown;
|
|
3834
|
+
/** Included when `fields=io` is requested. */
|
|
3835
|
+
output?: unknown;
|
|
3836
|
+
/** Included when `fields=io` is requested. */
|
|
3837
|
+
expectedOutput?: unknown;
|
|
3838
|
+
/** Included when `fields=metadata` is requested. */
|
|
3839
|
+
metadata?: Record<string, unknown> | null;
|
|
3840
|
+
/** Included when `fields=itemMetadata` is requested. */
|
|
3841
|
+
experimentItemMetadata?: Record<string, unknown> | null;
|
|
3842
|
+
/** Included when `fields=experimentMetadata` is requested. */
|
|
3843
|
+
experimentMetadata?: Record<string, unknown> | null;
|
|
3844
|
+
/** Included when `fields=experimentMetadata` is requested. */
|
|
3845
|
+
experimentDescription?: string | null;
|
|
3846
|
+
/** Included only when `fields=scores` is requested. Contains item and trace scores only; experiment-level scores are returned by the experiments endpoint. */
|
|
3847
|
+
scores?: ScoreV3[];
|
|
3848
|
+
}
|
|
3849
|
+
|
|
3850
|
+
/**
|
|
3851
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3852
|
+
*/
|
|
3853
|
+
/**
|
|
3854
|
+
* @example
|
|
3855
|
+
* {
|
|
3856
|
+
* fromStartTime: "2024-01-15T09:30:00Z"
|
|
3857
|
+
* }
|
|
3858
|
+
*/
|
|
3859
|
+
interface ListExperimentsRequest {
|
|
3860
|
+
/**
|
|
3861
|
+
* Comma-separated list of field groups to include. Available groups:
|
|
3862
|
+
* `core`, `metadata`, `scores`. If omitted, `core` is returned.
|
|
3863
|
+
*/
|
|
3864
|
+
fields?: string;
|
|
3865
|
+
/** Number of experiments to return per page. Maximum 100, default 50. */
|
|
3866
|
+
limit?: number;
|
|
3867
|
+
/** Number of scores to return per experiment when `fields=scores` is requested. Maximum 50, default 50. */
|
|
3868
|
+
scoreLimit?: number;
|
|
3869
|
+
/** Versioned base64url cursor from the previous response page. */
|
|
3870
|
+
cursor?: string;
|
|
3871
|
+
/** Retrieve only experiments on or after this datetime. */
|
|
3872
|
+
fromStartTime: string;
|
|
3873
|
+
/** Retrieve only experiments before this datetime. */
|
|
3874
|
+
toStartTime?: string;
|
|
3875
|
+
/** Comma-separated list of experiment IDs. */
|
|
3876
|
+
id?: string;
|
|
3877
|
+
/** Comma-separated list of experiment names. */
|
|
3878
|
+
name?: string;
|
|
3879
|
+
/** Comma-separated list of dataset IDs. */
|
|
3880
|
+
datasetId?: string;
|
|
3881
|
+
/**
|
|
3882
|
+
* JSON string containing an array of structured filter conditions.
|
|
3883
|
+
* Supported columns are `id`, `name`, and `datasetId`.
|
|
3884
|
+
*/
|
|
3885
|
+
filter?: string;
|
|
3886
|
+
}
|
|
3887
|
+
|
|
3888
|
+
/**
|
|
3889
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3890
|
+
*/
|
|
3891
|
+
/**
|
|
2330
3892
|
* @example
|
|
2331
3893
|
* {
|
|
2332
3894
|
* fromStartTime: "2024-01-15T09:30:00Z"
|
|
@@ -3742,6 +5304,17 @@ interface GetMetricsV2Request {
|
|
|
3742
5304
|
* }
|
|
3743
5305
|
* }
|
|
3744
5306
|
* ```
|
|
5307
|
+
*
|
|
5308
|
+
* For example, to count semantic roots (including app roots with a non-null external parent), use a boolean filter:
|
|
5309
|
+
* ```json
|
|
5310
|
+
* {
|
|
5311
|
+
* "view": "observations",
|
|
5312
|
+
* "metrics": [{"measure": "count", "aggregation": "count"}],
|
|
5313
|
+
* "filters": [{"column": "isRootObservation", "operator": "=", "value": true, "type": "boolean"}],
|
|
5314
|
+
* "fromTimestamp": "2025-01-01T00:00:00.000Z",
|
|
5315
|
+
* "toTimestamp": "2025-02-01T00:00:00.000Z"
|
|
5316
|
+
* }
|
|
5317
|
+
* ```
|
|
3745
5318
|
*/
|
|
3746
5319
|
query: string;
|
|
3747
5320
|
}
|
|
@@ -3752,6 +5325,18 @@ declare namespace index$m {
|
|
|
3752
5325
|
export type { index$m_GetMetricsV2Request as GetMetricsV2Request, index$m_MetricsV2Response as MetricsV2Response };
|
|
3753
5326
|
}
|
|
3754
5327
|
|
|
5328
|
+
/**
|
|
5329
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5330
|
+
*/
|
|
5331
|
+
/**
|
|
5332
|
+
* Tokenizer supported by Langfuse for model usage inference.
|
|
5333
|
+
*/
|
|
5334
|
+
type ModelTokenizerId = "openai" | "claude";
|
|
5335
|
+
declare const ModelTokenizerId: {
|
|
5336
|
+
readonly Openai: "openai";
|
|
5337
|
+
readonly Claude: "claude";
|
|
5338
|
+
};
|
|
5339
|
+
|
|
3755
5340
|
/**
|
|
3756
5341
|
* This file was auto-generated by Fern from our API Definition.
|
|
3757
5342
|
*/
|
|
@@ -3771,15 +5356,15 @@ interface CreateModelRequest {
|
|
|
3771
5356
|
/** Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use `(?i)^modelname$` */
|
|
3772
5357
|
matchPattern: string;
|
|
3773
5358
|
/** Apply only to generations which are newer than this ISO date. */
|
|
3774
|
-
startDate?: string;
|
|
5359
|
+
startDate?: string | null;
|
|
3775
5360
|
/** Unit used by this model. */
|
|
3776
|
-
unit
|
|
5361
|
+
unit: ModelUsageUnit;
|
|
3777
5362
|
/** Deprecated. Use 'pricingTiers' instead. Price (USD) per input unit. Creates a default tier if pricingTiers not provided. */
|
|
3778
|
-
inputPrice?: number;
|
|
5363
|
+
inputPrice?: number | null;
|
|
3779
5364
|
/** Deprecated. Use 'pricingTiers' instead. Price (USD) per output unit. Creates a default tier if pricingTiers not provided. */
|
|
3780
|
-
outputPrice?: number;
|
|
5365
|
+
outputPrice?: number | null;
|
|
3781
5366
|
/** Deprecated. Use 'pricingTiers' instead. Price (USD) per total units. Cannot be set if input or output price is set. Creates a default tier if pricingTiers not provided. */
|
|
3782
|
-
totalPrice?: number;
|
|
5367
|
+
totalPrice?: number | null;
|
|
3783
5368
|
/**
|
|
3784
5369
|
* Optional. Array of pricing tiers for this model.
|
|
3785
5370
|
*
|
|
@@ -3800,11 +5385,11 @@ interface CreateModelRequest {
|
|
|
3800
5385
|
* If omitted, you must provide flat prices instead (inputPrice/outputPrice/totalPrice),
|
|
3801
5386
|
* which will automatically create a single default tier named "Standard".
|
|
3802
5387
|
*/
|
|
3803
|
-
pricingTiers?: PricingTierInput[];
|
|
5388
|
+
pricingTiers?: PricingTierInput[] | null;
|
|
3804
5389
|
/** Optional. Tokenizer to be applied to observations which match to this model. See docs for more details. */
|
|
3805
|
-
tokenizerId?:
|
|
5390
|
+
tokenizerId?: ModelTokenizerId | null;
|
|
3806
5391
|
/** Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details. */
|
|
3807
|
-
tokenizerConfig?: unknown;
|
|
5392
|
+
tokenizerConfig?: unknown | null;
|
|
3808
5393
|
}
|
|
3809
5394
|
|
|
3810
5395
|
/**
|
|
@@ -3823,9 +5408,10 @@ interface GetModelsRequest {
|
|
|
3823
5408
|
|
|
3824
5409
|
type index$l_CreateModelRequest = CreateModelRequest;
|
|
3825
5410
|
type index$l_GetModelsRequest = GetModelsRequest;
|
|
5411
|
+
declare const index$l_ModelTokenizerId: typeof ModelTokenizerId;
|
|
3826
5412
|
type index$l_PaginatedModels = PaginatedModels;
|
|
3827
5413
|
declare namespace index$l {
|
|
3828
|
-
export type
|
|
5414
|
+
export { type index$l_CreateModelRequest as CreateModelRequest, type index$l_GetModelsRequest as GetModelsRequest, index$l_ModelTokenizerId as ModelTokenizerId, type index$l_PaginatedModels as PaginatedModels };
|
|
3829
5415
|
}
|
|
3830
5416
|
|
|
3831
5417
|
/**
|
|
@@ -3890,6 +5476,8 @@ interface GetObservationsV2Request {
|
|
|
3890
5476
|
parseIoAsJson?: boolean;
|
|
3891
5477
|
name?: string;
|
|
3892
5478
|
userId?: string;
|
|
5479
|
+
/** Filter by session ID. */
|
|
5480
|
+
sessionId?: string;
|
|
3893
5481
|
/** Filter by observation type (e.g., "GENERATION", "SPAN", "EVENT", "AGENT", "TOOL", "CHAIN", "RETRIEVER", "EVALUATOR", "EMBEDDING", "GUARDRAIL") */
|
|
3894
5482
|
type?: string;
|
|
3895
5483
|
traceId?: string;
|
|
@@ -4970,7 +6558,11 @@ interface CreateUserRequest {
|
|
|
4970
6558
|
emails?: ScimEmail[];
|
|
4971
6559
|
/** Whether the user is active */
|
|
4972
6560
|
active?: boolean;
|
|
4973
|
-
/**
|
|
6561
|
+
/**
|
|
6562
|
+
* Ignored. Accepted only for compatibility with identity providers that always send a password on user creation (Okta sends a placeholder value even when password sync is disabled). No credential is created for the user; provisioned users authenticate via SSO or set a password themselves through the password reset flow.
|
|
6563
|
+
*
|
|
6564
|
+
* @deprecated This attribute is ignored. SCIM provisioning never sets a password; provisioned users authenticate via SSO or the password reset flow.
|
|
6565
|
+
*/
|
|
4974
6566
|
password?: string;
|
|
4975
6567
|
}
|
|
4976
6568
|
|
|
@@ -5730,7 +7322,7 @@ declare namespace index$a {
|
|
|
5730
7322
|
* This file was auto-generated by Fern from our API Definition.
|
|
5731
7323
|
*/
|
|
5732
7324
|
/**
|
|
5733
|
-
* The evaluator
|
|
7325
|
+
* The evaluator type.
|
|
5734
7326
|
*
|
|
5735
7327
|
* The unstable public API supports LLM-as-a-judge and code evaluators.
|
|
5736
7328
|
*/
|
|
@@ -5752,21 +7344,6 @@ declare const CodeEvaluatorSourceCodeLanguage: {
|
|
|
5752
7344
|
readonly Typescript: "TYPESCRIPT";
|
|
5753
7345
|
};
|
|
5754
7346
|
|
|
5755
|
-
/**
|
|
5756
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
5757
|
-
*/
|
|
5758
|
-
/**
|
|
5759
|
-
* Where an evaluator comes from.
|
|
5760
|
-
*
|
|
5761
|
-
* - `project`: created in your project
|
|
5762
|
-
* - `managed`: provided by Langfuse
|
|
5763
|
-
*/
|
|
5764
|
-
type EvaluatorScope = "project" | "managed";
|
|
5765
|
-
declare const EvaluatorScope: {
|
|
5766
|
-
readonly Project: "project";
|
|
5767
|
-
readonly Managed: "managed";
|
|
5768
|
-
};
|
|
5769
|
-
|
|
5770
7347
|
/**
|
|
5771
7348
|
* This file was auto-generated by Fern from our API Definition.
|
|
5772
7349
|
*/
|
|
@@ -5823,8 +7400,8 @@ declare const EvaluationRuleStatus: {
|
|
|
5823
7400
|
* - `expected_output`: the experiment item's expected output. Only valid for `target=experiment`.
|
|
5824
7401
|
* - `experiment_item_metadata`: the experiment item's metadata object. Only valid for `target=experiment`.
|
|
5825
7402
|
*/
|
|
5826
|
-
type
|
|
5827
|
-
declare const
|
|
7403
|
+
type PromptVariableMappingSource = "input" | "output" | "metadata" | "tool_calls" | "expected_output" | "experiment_item_metadata";
|
|
7404
|
+
declare const PromptVariableMappingSource: {
|
|
5828
7405
|
readonly Input: "input";
|
|
5829
7406
|
readonly Output: "output";
|
|
5830
7407
|
readonly Metadata: "metadata";
|
|
@@ -5902,6 +7479,7 @@ interface EvaluatorOutputFieldDefinition {
|
|
|
5902
7479
|
* - `dataType` is required.
|
|
5903
7480
|
* - Do not send `version`; that is an internal storage detail and is not part of the public request contract.
|
|
5904
7481
|
* - For `NUMERIC` and `BOOLEAN`, provide `reasoning.description` and `score.description`.
|
|
7482
|
+
* - For `NUMERIC`, `score.minValue` and `score.maxValue` optionally define inclusive bounds. If both are set, `minValue` must not exceed `maxValue`.
|
|
5905
7483
|
* - For `CATEGORICAL`, also provide `score.categories` and `score.shouldAllowMultipleMatches`.
|
|
5906
7484
|
*
|
|
5907
7485
|
* @example
|
|
@@ -5912,7 +7490,9 @@ interface EvaluatorOutputFieldDefinition {
|
|
|
5912
7490
|
* description: "Explain why the answer is correct or incorrect."
|
|
5913
7491
|
* },
|
|
5914
7492
|
* score: {
|
|
5915
|
-
* description: "Return a score between 0 and 1."
|
|
7493
|
+
* description: "Return a score between 0 and 1.",
|
|
7494
|
+
* minValue: 0,
|
|
7495
|
+
* maxValue: 1
|
|
5916
7496
|
* }
|
|
5917
7497
|
* }
|
|
5918
7498
|
*
|
|
@@ -5955,6 +7535,17 @@ declare namespace EvaluatorOutputDefinition {
|
|
|
5955
7535
|
}
|
|
5956
7536
|
}
|
|
5957
7537
|
|
|
7538
|
+
/**
|
|
7539
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
7540
|
+
*/
|
|
7541
|
+
interface PublicNumericEvaluatorOutputScoreDefinition {
|
|
7542
|
+
description: string;
|
|
7543
|
+
/** Inclusive minimum value for numeric evaluator scores. */
|
|
7544
|
+
minValue?: number;
|
|
7545
|
+
/** Inclusive maximum value for numeric evaluator scores. */
|
|
7546
|
+
maxValue?: number;
|
|
7547
|
+
}
|
|
7548
|
+
|
|
5958
7549
|
/**
|
|
5959
7550
|
* This file was auto-generated by Fern from our API Definition.
|
|
5960
7551
|
*/
|
|
@@ -5963,7 +7554,7 @@ interface PublicNumericEvaluatorOutputDefinition {
|
|
|
5963
7554
|
/** Always `NUMERIC`. */
|
|
5964
7555
|
dataType: EvaluatorOutputDataType;
|
|
5965
7556
|
reasoning: EvaluatorOutputFieldDefinition;
|
|
5966
|
-
score:
|
|
7557
|
+
score: PublicNumericEvaluatorOutputScoreDefinition;
|
|
5967
7558
|
}
|
|
5968
7559
|
|
|
5969
7560
|
/**
|
|
@@ -6020,7 +7611,9 @@ interface PublicCategoricalEvaluatorOutputDefinition {
|
|
|
6020
7611
|
* description: "Explain why the answer is correct or incorrect."
|
|
6021
7612
|
* },
|
|
6022
7613
|
* score: {
|
|
6023
|
-
* description: "Return a score between 0 and 1."
|
|
7614
|
+
* description: "Return a score between 0 and 1.",
|
|
7615
|
+
* minValue: 0,
|
|
7616
|
+
* maxValue: 1
|
|
6024
7617
|
* }
|
|
6025
7618
|
* }
|
|
6026
7619
|
*
|
|
@@ -6238,7 +7831,7 @@ interface NullEvaluationRuleFilter {
|
|
|
6238
7831
|
*/
|
|
6239
7832
|
|
|
6240
7833
|
/**
|
|
6241
|
-
*
|
|
7834
|
+
* Connects one prompt variable to the available evaluation data.
|
|
6242
7835
|
*
|
|
6243
7836
|
* Manual mappings are used for `llm_as_judge` evaluators. `code` evaluators use a fixed runtime mapping managed by Langfuse.
|
|
6244
7837
|
*
|
|
@@ -6253,30 +7846,30 @@ interface NullEvaluationRuleFilter {
|
|
|
6253
7846
|
*
|
|
6254
7847
|
* Recovery guidance:
|
|
6255
7848
|
* - `invalid_variable_mapping`: the variable name is unknown for this evaluator, or the selected `source` is not valid for the chosen `target`
|
|
6256
|
-
* - `missing_variable_mapping`: one or more LLM-as-judge
|
|
6257
|
-
* - `duplicate_variable_mapping`: the same
|
|
7849
|
+
* - `missing_variable_mapping`: one or more LLM-as-judge prompt variables are not mapped yet
|
|
7850
|
+
* - `duplicate_variable_mapping`: the same prompt variable appears more than once
|
|
6258
7851
|
* - `invalid_json_path`: the JSONPath expression is malformed. Remove it or correct it.
|
|
6259
7852
|
*
|
|
6260
7853
|
* @example
|
|
6261
7854
|
* {
|
|
6262
7855
|
* variable: "input",
|
|
6263
|
-
* source: LangfuseAPI.unstable.
|
|
7856
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Input
|
|
6264
7857
|
* }
|
|
6265
7858
|
*
|
|
6266
7859
|
* @example
|
|
6267
7860
|
* {
|
|
6268
7861
|
* variable: "customer_tier",
|
|
6269
|
-
* source: LangfuseAPI.unstable.
|
|
7862
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Metadata,
|
|
6270
7863
|
* jsonPath: "$.customer.tier"
|
|
6271
7864
|
* }
|
|
6272
7865
|
*
|
|
6273
7866
|
* @example
|
|
6274
7867
|
* {
|
|
6275
7868
|
* variable: "expected_output",
|
|
6276
|
-
* source: LangfuseAPI.unstable.
|
|
7869
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.ExpectedOutput
|
|
6277
7870
|
* }
|
|
6278
7871
|
*/
|
|
6279
|
-
interface
|
|
7872
|
+
interface PromptVariableMappingInput {
|
|
6280
7873
|
/**
|
|
6281
7874
|
* Prompt variable name without braces.
|
|
6282
7875
|
*
|
|
@@ -6290,7 +7883,7 @@ interface EvaluationRuleMapping {
|
|
|
6290
7883
|
* - `target=observation`: `input`, `output`, `metadata`, `tool_calls`
|
|
6291
7884
|
* - `target=experiment`: `input`, `output`, `metadata`, `tool_calls`, `expected_output`, `experiment_item_metadata`
|
|
6292
7885
|
*/
|
|
6293
|
-
source:
|
|
7886
|
+
source: PromptVariableMappingSource;
|
|
6294
7887
|
/**
|
|
6295
7888
|
* Optional JSONPath selector applied to the selected source before it is passed to the evaluator prompt.
|
|
6296
7889
|
*
|
|
@@ -6302,6 +7895,36 @@ interface EvaluationRuleMapping {
|
|
|
6302
7895
|
jsonPath?: string;
|
|
6303
7896
|
}
|
|
6304
7897
|
|
|
7898
|
+
/**
|
|
7899
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
7900
|
+
*/
|
|
7901
|
+
|
|
7902
|
+
/**
|
|
7903
|
+
* Connects one prompt variable to data from a target.
|
|
7904
|
+
*
|
|
7905
|
+
* `source` is `null` when the mapping is incomplete.
|
|
7906
|
+
*
|
|
7907
|
+
* @example
|
|
7908
|
+
* {
|
|
7909
|
+
* variable: "input",
|
|
7910
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Input
|
|
7911
|
+
* }
|
|
7912
|
+
*
|
|
7913
|
+
* @example
|
|
7914
|
+
* {
|
|
7915
|
+
* variable: "input",
|
|
7916
|
+
* source: null
|
|
7917
|
+
* }
|
|
7918
|
+
*/
|
|
7919
|
+
interface PromptVariableMappingRead {
|
|
7920
|
+
/** Prompt variable name without braces. */
|
|
7921
|
+
variable: string;
|
|
7922
|
+
/** Source field populating the variable, or `null` when the mapping is incomplete. */
|
|
7923
|
+
source: PromptVariableMappingSource | null;
|
|
7924
|
+
/** Optional JSONPath selector applied to the selected source. */
|
|
7925
|
+
jsonPath?: string;
|
|
7926
|
+
}
|
|
7927
|
+
|
|
6305
7928
|
/**
|
|
6306
7929
|
* This file was auto-generated by Fern from our API Definition.
|
|
6307
7930
|
*/
|
|
@@ -6324,6 +7947,7 @@ interface EvaluationRuleMapping {
|
|
|
6324
7947
|
* - `stringOptions`: `any of`, `none of`
|
|
6325
7948
|
* - `arrayOptions`: `any of`, `none of`, `all of`
|
|
6326
7949
|
* - `stringObject`: same operators as `string`
|
|
7950
|
+
* - `boolean`: `"="`, `"<>"`
|
|
6327
7951
|
* - `null`: `is null`, `is not null`
|
|
6328
7952
|
*
|
|
6329
7953
|
* Supported columns by target:
|
|
@@ -6338,6 +7962,7 @@ interface EvaluationRuleMapping {
|
|
|
6338
7962
|
* - `sessionId`: `string`
|
|
6339
7963
|
* - `tags`: `arrayOptions`, operators `any of` / `none of` / `all of`
|
|
6340
7964
|
* - `metadata`: `stringObject` with `key`
|
|
7965
|
+
* - `isRootObservation`: `boolean`, operators `=` / `<>`; true when the observation has no parent or is explicitly marked as an application root
|
|
6341
7966
|
* - `parentObservationId`: `null`, operators `is null` / `is not null`
|
|
6342
7967
|
* - `calledToolNames`: `arrayOptions`, operators `any of` / `none of` / `all of`
|
|
6343
7968
|
* - `toolCalls`: `number`
|
|
@@ -6376,6 +8001,14 @@ interface EvaluationRuleMapping {
|
|
|
6376
8001
|
*
|
|
6377
8002
|
* @example
|
|
6378
8003
|
* {
|
|
8004
|
+
* type: "boolean",
|
|
8005
|
+
* column: "isRootObservation",
|
|
8006
|
+
* operator: LangfuseAPI.unstable.EvaluationRuleBooleanFilterOperator.Equals,
|
|
8007
|
+
* value: true
|
|
8008
|
+
* }
|
|
8009
|
+
*
|
|
8010
|
+
* @example
|
|
8011
|
+
* {
|
|
6379
8012
|
* type: "arrayOptions",
|
|
6380
8013
|
* column: "tags",
|
|
6381
8014
|
* operator: LangfuseAPI.unstable.EvaluationRuleArrayOptionsFilterOperator.AnyOf,
|
|
@@ -6432,8 +8065,6 @@ type index$9_DateTimeEvaluationRuleFilter = DateTimeEvaluationRuleFilter;
|
|
|
6432
8065
|
declare const index$9_EvaluationRuleArrayOptionsFilterOperator: typeof EvaluationRuleArrayOptionsFilterOperator;
|
|
6433
8066
|
declare const index$9_EvaluationRuleBooleanFilterOperator: typeof EvaluationRuleBooleanFilterOperator;
|
|
6434
8067
|
declare const index$9_EvaluationRuleFilter: typeof EvaluationRuleFilter;
|
|
6435
|
-
type index$9_EvaluationRuleMapping = EvaluationRuleMapping;
|
|
6436
|
-
declare const index$9_EvaluationRuleMappingSource: typeof EvaluationRuleMappingSource;
|
|
6437
8068
|
declare const index$9_EvaluationRuleNullFilterOperator: typeof EvaluationRuleNullFilterOperator;
|
|
6438
8069
|
declare const index$9_EvaluationRuleNumberFilterOperator: typeof EvaluationRuleNumberFilterOperator;
|
|
6439
8070
|
declare const index$9_EvaluationRuleOptionsFilterOperator: typeof EvaluationRuleOptionsFilterOperator;
|
|
@@ -6444,21 +8075,24 @@ type index$9_EvaluatorModelConfig = EvaluatorModelConfig;
|
|
|
6444
8075
|
declare const index$9_EvaluatorOutputDataType: typeof EvaluatorOutputDataType;
|
|
6445
8076
|
declare const index$9_EvaluatorOutputDefinition: typeof EvaluatorOutputDefinition;
|
|
6446
8077
|
type index$9_EvaluatorOutputFieldDefinition = EvaluatorOutputFieldDefinition;
|
|
6447
|
-
declare const index$9_EvaluatorScope: typeof EvaluatorScope;
|
|
6448
8078
|
declare const index$9_EvaluatorType: typeof EvaluatorType;
|
|
6449
8079
|
type index$9_NullEvaluationRuleFilter = NullEvaluationRuleFilter;
|
|
6450
8080
|
type index$9_NumberEvaluationRuleFilter = NumberEvaluationRuleFilter;
|
|
6451
8081
|
type index$9_NumberObjectEvaluationRuleFilter = NumberObjectEvaluationRuleFilter;
|
|
8082
|
+
type index$9_PromptVariableMappingInput = PromptVariableMappingInput;
|
|
8083
|
+
type index$9_PromptVariableMappingRead = PromptVariableMappingRead;
|
|
8084
|
+
declare const index$9_PromptVariableMappingSource: typeof PromptVariableMappingSource;
|
|
6452
8085
|
type index$9_PublicBooleanEvaluatorOutputDefinition = PublicBooleanEvaluatorOutputDefinition;
|
|
6453
8086
|
type index$9_PublicCategoricalEvaluatorOutputDefinition = PublicCategoricalEvaluatorOutputDefinition;
|
|
6454
8087
|
type index$9_PublicCategoricalEvaluatorOutputScoreDefinition = PublicCategoricalEvaluatorOutputScoreDefinition;
|
|
6455
8088
|
declare const index$9_PublicEvaluatorOutputDefinition: typeof PublicEvaluatorOutputDefinition;
|
|
6456
8089
|
type index$9_PublicNumericEvaluatorOutputDefinition = PublicNumericEvaluatorOutputDefinition;
|
|
8090
|
+
type index$9_PublicNumericEvaluatorOutputScoreDefinition = PublicNumericEvaluatorOutputScoreDefinition;
|
|
6457
8091
|
type index$9_StringEvaluationRuleFilter = StringEvaluationRuleFilter;
|
|
6458
8092
|
type index$9_StringObjectEvaluationRuleFilter = StringObjectEvaluationRuleFilter;
|
|
6459
8093
|
type index$9_StringOptionsEvaluationRuleFilter = StringOptionsEvaluationRuleFilter;
|
|
6460
8094
|
declare namespace index$9 {
|
|
6461
|
-
export { type index$9_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, type index$9_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$9_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, index$9_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, type index$9_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, index$9_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, index$9_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, index$9_EvaluationRuleFilter as EvaluationRuleFilter,
|
|
8095
|
+
export { type index$9_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, type index$9_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$9_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, index$9_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, type index$9_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, index$9_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, index$9_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, index$9_EvaluationRuleFilter as EvaluationRuleFilter, index$9_EvaluationRuleNullFilterOperator as EvaluationRuleNullFilterOperator, index$9_EvaluationRuleNumberFilterOperator as EvaluationRuleNumberFilterOperator, index$9_EvaluationRuleOptionsFilterOperator as EvaluationRuleOptionsFilterOperator, index$9_EvaluationRuleStatus as EvaluationRuleStatus, index$9_EvaluationRuleStringFilterOperator as EvaluationRuleStringFilterOperator, index$9_EvaluationRuleTarget as EvaluationRuleTarget, type index$9_EvaluatorModelConfig as EvaluatorModelConfig, index$9_EvaluatorOutputDataType as EvaluatorOutputDataType, index$9_EvaluatorOutputDefinition as EvaluatorOutputDefinition, type index$9_EvaluatorOutputFieldDefinition as EvaluatorOutputFieldDefinition, index$9_EvaluatorType as EvaluatorType, type index$9_NullEvaluationRuleFilter as NullEvaluationRuleFilter, type index$9_NumberEvaluationRuleFilter as NumberEvaluationRuleFilter, type index$9_NumberObjectEvaluationRuleFilter as NumberObjectEvaluationRuleFilter, type index$9_PromptVariableMappingInput as PromptVariableMappingInput, type index$9_PromptVariableMappingRead as PromptVariableMappingRead, index$9_PromptVariableMappingSource as PromptVariableMappingSource, type index$9_PublicBooleanEvaluatorOutputDefinition as PublicBooleanEvaluatorOutputDefinition, type index$9_PublicCategoricalEvaluatorOutputDefinition as PublicCategoricalEvaluatorOutputDefinition, type index$9_PublicCategoricalEvaluatorOutputScoreDefinition as PublicCategoricalEvaluatorOutputScoreDefinition, index$9_PublicEvaluatorOutputDefinition as PublicEvaluatorOutputDefinition, type index$9_PublicNumericEvaluatorOutputDefinition as PublicNumericEvaluatorOutputDefinition, type index$9_PublicNumericEvaluatorOutputScoreDefinition as PublicNumericEvaluatorOutputScoreDefinition, type index$9_StringEvaluationRuleFilter as StringEvaluationRuleFilter, type index$9_StringObjectEvaluationRuleFilter as StringObjectEvaluationRuleFilter, type index$9_StringOptionsEvaluationRuleFilter as StringOptionsEvaluationRuleFilter };
|
|
6462
8096
|
}
|
|
6463
8097
|
|
|
6464
8098
|
/**
|
|
@@ -7107,10 +8741,10 @@ interface PublicApiErrorDetails {
|
|
|
7107
8741
|
*
|
|
7108
8742
|
* @example
|
|
7109
8743
|
* {
|
|
7110
|
-
* message: "This project already has the maximum number of active evaluation rules (
|
|
8744
|
+
* message: "This project already has the maximum number of active evaluation rules (500). Disable an existing active evaluation rule before enabling another one.",
|
|
7111
8745
|
* code: LangfuseAPI.unstable.PublicApiErrorCode.Conflict,
|
|
7112
8746
|
* details: {
|
|
7113
|
-
* limit:
|
|
8747
|
+
* limit: 500
|
|
7114
8748
|
* }
|
|
7115
8749
|
* }
|
|
7116
8750
|
*
|
|
@@ -7244,7 +8878,7 @@ declare namespace index$6 {
|
|
|
7244
8878
|
* - which evaluator should be used
|
|
7245
8879
|
* - which target objects should trigger scoring
|
|
7246
8880
|
* - how often scoring should run
|
|
7247
|
-
* - which target fields should populate each
|
|
8881
|
+
* - which target fields should populate each prompt variable
|
|
7248
8882
|
* - whether the deployment is active, inactive, or paused
|
|
7249
8883
|
*
|
|
7250
8884
|
* Important status semantics:
|
|
@@ -7258,13 +8892,13 @@ interface EvaluationRuleBase {
|
|
|
7258
8892
|
/** Human-readable deployment name. This is independent from the evaluator name. */
|
|
7259
8893
|
name: string;
|
|
7260
8894
|
/**
|
|
7261
|
-
*
|
|
8895
|
+
* Deprecated compatibility alias for `evaluators[0].evaluator`, or `null`
|
|
8896
|
+
* when the rule currently has no evaluator assignments.
|
|
7262
8897
|
*
|
|
7263
|
-
* `
|
|
7264
|
-
*
|
|
7265
|
-
* If you create a newer project version with the same evaluator name later, existing evaluation rules are moved to it automatically.
|
|
8898
|
+
* `id` identifies the evaluator family. The rule automatically uses the
|
|
8899
|
+
* latest available version of that evaluator.
|
|
7266
8900
|
*/
|
|
7267
|
-
evaluator: EvaluationRuleEvaluator;
|
|
8901
|
+
evaluator: EvaluationRuleEvaluator | null;
|
|
7268
8902
|
/** Desired enabled state configured by the client. */
|
|
7269
8903
|
enabled: boolean;
|
|
7270
8904
|
/** Effective runtime status after Langfuse applies validation and blocking rules. */
|
|
@@ -7299,9 +8933,22 @@ interface EvaluationRuleBase {
|
|
|
7299
8933
|
* evaluator: {
|
|
7300
8934
|
* id: "evaltmpl_123",
|
|
7301
8935
|
* name: "answer-correctness",
|
|
7302
|
-
* scope: LangfuseAPI.unstable.EvaluatorScope.Project,
|
|
7303
8936
|
* type: LangfuseAPI.unstable.EvaluatorType.LlmAsJudge
|
|
7304
8937
|
* },
|
|
8938
|
+
* evaluators: [{
|
|
8939
|
+
* evaluator: {
|
|
8940
|
+
* id: "evaltmpl_123",
|
|
8941
|
+
* name: "answer-correctness",
|
|
8942
|
+
* type: LangfuseAPI.unstable.EvaluatorType.LlmAsJudge
|
|
8943
|
+
* },
|
|
8944
|
+
* mapping: [{
|
|
8945
|
+
* variable: "input",
|
|
8946
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Input
|
|
8947
|
+
* }, {
|
|
8948
|
+
* variable: "output",
|
|
8949
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Output
|
|
8950
|
+
* }]
|
|
8951
|
+
* }],
|
|
7305
8952
|
* target: LangfuseAPI.unstable.EvaluationRuleTarget.Observation,
|
|
7306
8953
|
* enabled: true,
|
|
7307
8954
|
* status: LangfuseAPI.unstable.EvaluationRuleStatus.Active,
|
|
@@ -7316,22 +8963,24 @@ interface EvaluationRuleBase {
|
|
|
7316
8963
|
* }],
|
|
7317
8964
|
* mapping: [{
|
|
7318
8965
|
* variable: "input",
|
|
7319
|
-
* source: LangfuseAPI.unstable.
|
|
8966
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Input
|
|
7320
8967
|
* }, {
|
|
7321
8968
|
* variable: "output",
|
|
7322
|
-
* source: LangfuseAPI.unstable.
|
|
8969
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Output
|
|
7323
8970
|
* }],
|
|
7324
8971
|
* createdAt: "2026-03-30T09:20:00.000Z",
|
|
7325
8972
|
* updatedAt: "2026-03-30T09:20:00.000Z"
|
|
7326
8973
|
* }
|
|
7327
8974
|
*/
|
|
7328
8975
|
interface EvaluationRule extends EvaluationRuleBase {
|
|
8976
|
+
/** Evaluators attached to this rule in deterministic assignment order. A `null` mapping inherits the evaluator version's default mapping. */
|
|
8977
|
+
evaluators: EvaluationRuleEvaluatorAssignment[];
|
|
7329
8978
|
/** Target object type that should trigger scoring. */
|
|
7330
8979
|
target: EvaluationRuleTarget;
|
|
7331
8980
|
/** List of filter conditions used to decide whether a target should be evaluated. */
|
|
7332
8981
|
filter: EvaluationRuleFilter[];
|
|
7333
|
-
/**
|
|
7334
|
-
mapping:
|
|
8982
|
+
/** Deprecated compatibility alias containing the effective mapping for `evaluators[0]`. */
|
|
8983
|
+
mapping: PromptVariableMappingRead[];
|
|
7335
8984
|
}
|
|
7336
8985
|
|
|
7337
8986
|
/**
|
|
@@ -7339,11 +8988,13 @@ interface EvaluationRule extends EvaluationRuleBase {
|
|
|
7339
8988
|
*/
|
|
7340
8989
|
|
|
7341
8990
|
/**
|
|
7342
|
-
* Legacy trace- or dataset-level evaluation rule returned by list and get for migration.
|
|
8991
|
+
* **Deprecated:** Legacy trace- or dataset-level evaluation rule returned by list and get for migration.
|
|
7343
8992
|
*
|
|
7344
|
-
* This resource is read-only through the unstable public API. Its mapping preserves the trace, dataset item, or named observation
|
|
8993
|
+
* This resource is read-only through the unstable public API. Its mapping preserves the trace, dataset item, or named observation selected for each prompt variable.
|
|
7345
8994
|
*/
|
|
7346
8995
|
interface LegacyEvaluationRule extends EvaluationRuleBase {
|
|
8996
|
+
/** Evaluators attached to this rule in deterministic assignment order. */
|
|
8997
|
+
evaluators: LegacyEvaluationRuleEvaluatorAssignment[];
|
|
7347
8998
|
target: LegacyEvaluationRuleTarget;
|
|
7348
8999
|
/** Delay in milliseconds before the legacy evaluation job runs. */
|
|
7349
9000
|
delay: number;
|
|
@@ -7352,7 +9003,7 @@ interface LegacyEvaluationRule extends EvaluationRuleBase {
|
|
|
7352
9003
|
/** Stored filters used by the legacy trace or dataset rule. */
|
|
7353
9004
|
filter: EvaluationRuleFilter[];
|
|
7354
9005
|
/** Stored variable mappings, including the trace, dataset item, or named observation selected for each variable. */
|
|
7355
|
-
mapping:
|
|
9006
|
+
mapping: LegacyPromptVariableMapping[];
|
|
7356
9007
|
}
|
|
7357
9008
|
|
|
7358
9009
|
/**
|
|
@@ -7371,7 +9022,7 @@ type ReadableEvaluationRule = EvaluationRule | LegacyEvaluationRule;
|
|
|
7371
9022
|
/**
|
|
7372
9023
|
* Paginated list of evaluation rules.
|
|
7373
9024
|
*/
|
|
7374
|
-
interface EvaluationRules$
|
|
9025
|
+
interface EvaluationRules$2 {
|
|
7375
9026
|
/** Evaluation rules in the current page. */
|
|
7376
9027
|
data: ReadableEvaluationRule[];
|
|
7377
9028
|
/** Standard pagination metadata. */
|
|
@@ -7386,15 +9037,34 @@ interface EvaluationRules$1 {
|
|
|
7386
9037
|
* Request body for creating an evaluation rule.
|
|
7387
9038
|
*
|
|
7388
9039
|
* Checklist for agents and SDK clients:
|
|
7389
|
-
* - reference an existing evaluator family by `evaluator.name` and `evaluator.
|
|
9040
|
+
* - reference an existing evaluator family by `evaluator.name` and `evaluator.type`
|
|
7390
9041
|
* - choose `target=observation` or `target=experiment`
|
|
7391
9042
|
* - if `target=experiment` and you want a dataset filter, call `GET /api/public/v2/datasets` first and use dataset `id` values in `filter[].value`
|
|
7392
|
-
* - for `llm_as_judge`, fetch or inspect the evaluator first and provide a complete
|
|
9043
|
+
* - for `llm_as_judge`, fetch or inspect the evaluator first and provide a complete mapping for every prompt variable
|
|
7393
9044
|
* - for `code`, do not send variables or mappings; Langfuse stores the fixed code runtime mapping automatically
|
|
7394
9045
|
* - optionally narrow execution with `filter`
|
|
7395
9046
|
* - set `enabled=true` only when you want live execution immediately
|
|
7396
9047
|
*/
|
|
7397
|
-
type CreateEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest | CreateCodeEvaluationRuleRequest;
|
|
9048
|
+
type CreateEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest | CreateCodeEvaluationRuleRequest | CreateEvaluationRuleWithEvaluatorsRequest;
|
|
9049
|
+
|
|
9050
|
+
/**
|
|
9051
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
9052
|
+
*/
|
|
9053
|
+
|
|
9054
|
+
interface CreateEvaluationRuleWithEvaluatorsRequest {
|
|
9055
|
+
/** Human-readable deployment name. */
|
|
9056
|
+
name: string;
|
|
9057
|
+
/**
|
|
9058
|
+
* One or more evaluator assignments. Providing the deprecated top-level `evaluator` or `mapping` fields alongside this is rejected with `400`.
|
|
9059
|
+
*
|
|
9060
|
+
* Multiple assignments are supported on writable targets.
|
|
9061
|
+
*/
|
|
9062
|
+
evaluators: CreateEvaluationRuleEvaluatorAssignment[];
|
|
9063
|
+
target: EvaluationRuleTarget;
|
|
9064
|
+
enabled: boolean;
|
|
9065
|
+
sampling?: number;
|
|
9066
|
+
filter?: EvaluationRuleFilter[];
|
|
9067
|
+
}
|
|
7398
9068
|
|
|
7399
9069
|
/**
|
|
7400
9070
|
* This file was auto-generated by Fern from our API Definition.
|
|
@@ -7406,7 +9076,7 @@ interface CreateLlmAsJudgeEvaluationRuleRequest {
|
|
|
7406
9076
|
/**
|
|
7407
9077
|
* LLM-as-judge evaluator family to use.
|
|
7408
9078
|
*
|
|
7409
|
-
* Use `name
|
|
9079
|
+
* Use `name` and `type` from the evaluator endpoints. If `type` is omitted, Langfuse defaults it to `llm_as_judge` for backwards compatibility.
|
|
7410
9080
|
* Langfuse resolves that family to its latest version before saving the rule.
|
|
7411
9081
|
*/
|
|
7412
9082
|
evaluator: LlmAsJudgeEvaluationRuleEvaluatorReference;
|
|
@@ -7427,10 +9097,10 @@ interface CreateLlmAsJudgeEvaluationRuleRequest {
|
|
|
7427
9097
|
/**
|
|
7428
9098
|
* LLM-as-judge variable mappings.
|
|
7429
9099
|
*
|
|
7430
|
-
* Every
|
|
7431
|
-
* Build this list from the evaluator `variables` array
|
|
9100
|
+
* Every prompt variable must appear exactly once.
|
|
9101
|
+
* Build this list from the evaluator's `variables` array.
|
|
7432
9102
|
*/
|
|
7433
|
-
mapping:
|
|
9103
|
+
mapping: PromptVariableMappingInput[];
|
|
7434
9104
|
}
|
|
7435
9105
|
|
|
7436
9106
|
/**
|
|
@@ -7443,7 +9113,7 @@ interface CreateCodeEvaluationRuleRequest {
|
|
|
7443
9113
|
/**
|
|
7444
9114
|
* Code evaluator family to use.
|
|
7445
9115
|
*
|
|
7446
|
-
* Use `name
|
|
9116
|
+
* Use `name` and `type` from the evaluator endpoints.
|
|
7447
9117
|
* Langfuse resolves that family to its latest version before saving the rule.
|
|
7448
9118
|
*/
|
|
7449
9119
|
evaluator: CodeEvaluationRuleEvaluatorReference;
|
|
@@ -7475,7 +9145,9 @@ interface CreateCodeEvaluationRuleRequest {
|
|
|
7475
9145
|
*
|
|
7476
9146
|
* Practical guidance:
|
|
7477
9147
|
* - If you only want to rename the rule or change sampling, send just those fields.
|
|
7478
|
-
* -
|
|
9148
|
+
* - To add, remove, or remap evaluators, send `evaluators`. It replaces the whole assignment set, so include every evaluator the rule should keep.
|
|
9149
|
+
* - `evaluators` cannot be combined with the deprecated `evaluator`/`mapping` pair, which only ever addressed the first assignment.
|
|
9150
|
+
* - If you change to an LLM-as-judge `evaluator`, send a fresh `mapping` unless you are certain the existing mapping still matches the prompt variables.
|
|
7479
9151
|
* - If you change `target` for an LLM-as-judge rule, usually send both `filter` and `mapping` in the same request.
|
|
7480
9152
|
* - For code evaluator rules, omit `mapping`; Langfuse stores the fixed code runtime mapping automatically.
|
|
7481
9153
|
* - If you change an experiment `datasetId` filter, call `GET /api/public/v2/datasets` and use dataset `id` values from that response.
|
|
@@ -7484,10 +9156,17 @@ interface UpdateEvaluationRuleRequest {
|
|
|
7484
9156
|
/** Updated deployment name. */
|
|
7485
9157
|
name?: string;
|
|
7486
9158
|
/**
|
|
7487
|
-
*
|
|
9159
|
+
* Full replacement of the rule's evaluator assignments: entries that are
|
|
9160
|
+
* not listed are detached.
|
|
9161
|
+
*
|
|
9162
|
+
* Mutually exclusive with the deprecated `evaluator` and `mapping` fields.
|
|
9163
|
+
*/
|
|
9164
|
+
evaluators?: CreateEvaluationRuleEvaluatorAssignment[];
|
|
9165
|
+
/**
|
|
9166
|
+
* Deprecated single-evaluator alias: updates the first assignment only. Prefer `evaluators`.
|
|
7488
9167
|
*
|
|
7489
9168
|
* Langfuse resolves the provided evaluator family to its latest version before saving the rule.
|
|
7490
|
-
* A rule's evaluator type cannot be changed: provide `name`
|
|
9169
|
+
* A rule's evaluator type cannot be changed: provide `name` for an evaluator family of the rule's current type. To use a different evaluator type, create a new rule.
|
|
7491
9170
|
*/
|
|
7492
9171
|
evaluator?: EvaluationRuleEvaluatorReference;
|
|
7493
9172
|
/** Updated target object type. */
|
|
@@ -7507,7 +9186,7 @@ interface UpdateEvaluationRuleRequest {
|
|
|
7507
9186
|
*
|
|
7508
9187
|
* Do not send this field for code evaluator rules. Langfuse stores the fixed code runtime mapping automatically and returns it in the response.
|
|
7509
9188
|
*/
|
|
7510
|
-
mapping?:
|
|
9189
|
+
mapping?: PromptVariableMappingInput[];
|
|
7511
9190
|
}
|
|
7512
9191
|
|
|
7513
9192
|
/**
|
|
@@ -7524,18 +9203,15 @@ interface DeleteEvaluationRuleResponse {
|
|
|
7524
9203
|
/**
|
|
7525
9204
|
* This file was auto-generated by Fern from our API Definition.
|
|
7526
9205
|
*/
|
|
7527
|
-
|
|
7528
9206
|
/**
|
|
7529
9207
|
* Evaluator family reference used when updating an evaluation rule.
|
|
7530
9208
|
*
|
|
7531
|
-
* `name`
|
|
9209
|
+
* `name` identifies the evaluator family in the authenticated project context.
|
|
7532
9210
|
* A rule's evaluator type cannot be changed, so this reference does not accept a `type`; the family must match the rule's current evaluator type.
|
|
7533
9211
|
*/
|
|
7534
9212
|
interface EvaluationRuleEvaluatorReference {
|
|
7535
9213
|
/** Evaluator family name. */
|
|
7536
9214
|
name: string;
|
|
7537
|
-
/** Whether the evaluator family is project-owned or Langfuse-managed. */
|
|
7538
|
-
scope: EvaluatorScope;
|
|
7539
9215
|
}
|
|
7540
9216
|
|
|
7541
9217
|
/**
|
|
@@ -7548,24 +9224,19 @@ interface EvaluationRuleEvaluatorReference {
|
|
|
7548
9224
|
interface LlmAsJudgeEvaluationRuleEvaluatorReference {
|
|
7549
9225
|
/** Evaluator family name. */
|
|
7550
9226
|
name: string;
|
|
7551
|
-
/**
|
|
7552
|
-
scope: EvaluatorScope;
|
|
7553
|
-
/** Evaluator engine type. Defaults to `llm_as_judge` when omitted. */
|
|
9227
|
+
/** Evaluator type. Defaults to `llm_as_judge` when omitted. */
|
|
7554
9228
|
type?: LlmAsJudgeEvaluatorType;
|
|
7555
9229
|
}
|
|
7556
9230
|
|
|
7557
9231
|
/**
|
|
7558
9232
|
* This file was auto-generated by Fern from our API Definition.
|
|
7559
9233
|
*/
|
|
7560
|
-
|
|
7561
9234
|
/**
|
|
7562
9235
|
* Code evaluator family reference used when creating an evaluation rule.
|
|
7563
9236
|
*/
|
|
7564
9237
|
interface CodeEvaluationRuleEvaluatorReference {
|
|
7565
9238
|
/** Evaluator family name. */
|
|
7566
9239
|
name: string;
|
|
7567
|
-
/** Whether the evaluator family is project-owned or Langfuse-managed. */
|
|
7568
|
-
scope: EvaluatorScope;
|
|
7569
9240
|
/** Must be `code`. */
|
|
7570
9241
|
type: "code";
|
|
7571
9242
|
}
|
|
@@ -7578,6 +9249,47 @@ declare const LlmAsJudgeEvaluatorType: {
|
|
|
7578
9249
|
readonly LlmAsJudge: "llm_as_judge";
|
|
7579
9250
|
};
|
|
7580
9251
|
|
|
9252
|
+
/**
|
|
9253
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
9254
|
+
*/
|
|
9255
|
+
|
|
9256
|
+
/**
|
|
9257
|
+
* Resolved evaluator currently used by the evaluation rule.
|
|
9258
|
+
*
|
|
9259
|
+
* `id` identifies the evaluator family. Evaluation runs automatically use
|
|
9260
|
+
* the latest available evaluator version.
|
|
9261
|
+
*/
|
|
9262
|
+
interface EvaluationRuleEvaluator {
|
|
9263
|
+
/** Identifier of the exact evaluator version currently used by the rule. */
|
|
9264
|
+
id: string;
|
|
9265
|
+
/** Evaluator family name. */
|
|
9266
|
+
name: string;
|
|
9267
|
+
/** Evaluator type. */
|
|
9268
|
+
type: EvaluatorType;
|
|
9269
|
+
}
|
|
9270
|
+
|
|
9271
|
+
/**
|
|
9272
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
9273
|
+
*/
|
|
9274
|
+
|
|
9275
|
+
interface EvaluationRuleEvaluatorAssignment {
|
|
9276
|
+
evaluator: EvaluationRuleEvaluator;
|
|
9277
|
+
/** Rule-specific override, or `null` to inherit the evaluator version's default mapping. */
|
|
9278
|
+
mapping: PromptVariableMappingRead[] | null;
|
|
9279
|
+
}
|
|
9280
|
+
|
|
9281
|
+
/**
|
|
9282
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
9283
|
+
*/
|
|
9284
|
+
|
|
9285
|
+
/**
|
|
9286
|
+
* **Deprecated:** Evaluator assignment on a legacy trace or dataset rule.
|
|
9287
|
+
*/
|
|
9288
|
+
interface LegacyEvaluationRuleEvaluatorAssignment {
|
|
9289
|
+
evaluator: EvaluationRuleEvaluator;
|
|
9290
|
+
mapping: LegacyPromptVariableMapping[] | null;
|
|
9291
|
+
}
|
|
9292
|
+
|
|
7581
9293
|
/**
|
|
7582
9294
|
* This file was auto-generated by Fern from our API Definition.
|
|
7583
9295
|
*/
|
|
@@ -7590,6 +9302,9 @@ declare const EvaluationRuleTimeScope: {
|
|
|
7590
9302
|
/**
|
|
7591
9303
|
* This file was auto-generated by Fern from our API Definition.
|
|
7592
9304
|
*/
|
|
9305
|
+
/**
|
|
9306
|
+
* **Deprecated:** Legacy trace or dataset evaluation target.
|
|
9307
|
+
*/
|
|
7593
9308
|
type LegacyEvaluationRuleTarget = "trace" | "dataset";
|
|
7594
9309
|
declare const LegacyEvaluationRuleTarget: {
|
|
7595
9310
|
readonly Trace: "trace";
|
|
@@ -7601,24 +9316,23 @@ declare const LegacyEvaluationRuleTarget: {
|
|
|
7601
9316
|
*/
|
|
7602
9317
|
|
|
7603
9318
|
/**
|
|
7604
|
-
*
|
|
9319
|
+
* **Deprecated:** Connects one prompt variable to data from a trace, dataset item, or named observation in a legacy rule.
|
|
7605
9320
|
*/
|
|
7606
|
-
interface
|
|
7607
|
-
/** Evaluator prompt variable populated by this mapping. */
|
|
9321
|
+
interface LegacyPromptVariableMapping {
|
|
7608
9322
|
variable: string;
|
|
7609
|
-
/** Trace, dataset item, or observation type from which the value is read. */
|
|
7610
9323
|
langfuseObject: LegacyEvaluationObject;
|
|
7611
9324
|
/** Observation name to match, or `null` when `langfuseObject` is `trace` or `dataset_item`. */
|
|
7612
9325
|
objectName: string | null;
|
|
7613
|
-
/** Stored field selected from the trace, dataset item, or observation. */
|
|
7614
9326
|
source: string;
|
|
7615
|
-
/** Optional JSONPath selector applied to the selected field. */
|
|
7616
9327
|
jsonPath?: string;
|
|
7617
9328
|
}
|
|
7618
9329
|
|
|
7619
9330
|
/**
|
|
7620
9331
|
* This file was auto-generated by Fern from our API Definition.
|
|
7621
9332
|
*/
|
|
9333
|
+
/**
|
|
9334
|
+
* **Deprecated:** Legacy Langfuse object used by a trace or dataset evaluation rule.
|
|
9335
|
+
*/
|
|
7622
9336
|
type LegacyEvaluationObject = "trace" | "span" | "generation" | "event" | "agent" | "tool" | "chain" | "retriever" | "evaluator" | "embedding" | "guardrail" | "dataset_item";
|
|
7623
9337
|
declare const LegacyEvaluationObject: {
|
|
7624
9338
|
readonly Trace: "trace";
|
|
@@ -7639,21 +9353,20 @@ declare const LegacyEvaluationObject: {
|
|
|
7639
9353
|
* This file was auto-generated by Fern from our API Definition.
|
|
7640
9354
|
*/
|
|
7641
9355
|
|
|
9356
|
+
interface CreateEvaluationRuleEvaluatorAssignment {
|
|
9357
|
+
evaluator: CreateEvaluationRuleEvaluatorReference;
|
|
9358
|
+
/** Optional rule-specific override. Omit to inherit the evaluator version's default mapping. Omit for code evaluators. */
|
|
9359
|
+
mapping?: PromptVariableMappingInput[];
|
|
9360
|
+
}
|
|
9361
|
+
|
|
7642
9362
|
/**
|
|
7643
|
-
*
|
|
7644
|
-
*
|
|
7645
|
-
* `id` is the exact active evaluator version.
|
|
7646
|
-
* `name`, `scope`, and `type` identify the evaluator family conceptually.
|
|
9363
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
7647
9364
|
*/
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
id: string;
|
|
7651
|
-
/** Evaluator family name. */
|
|
9365
|
+
|
|
9366
|
+
interface CreateEvaluationRuleEvaluatorReference {
|
|
7652
9367
|
name: string;
|
|
7653
|
-
/**
|
|
7654
|
-
|
|
7655
|
-
/** Evaluator engine type. */
|
|
7656
|
-
type: EvaluatorType;
|
|
9368
|
+
/** Defaults to `llm_as_judge`. */
|
|
9369
|
+
type?: EvaluatorType;
|
|
7657
9370
|
}
|
|
7658
9371
|
|
|
7659
9372
|
/**
|
|
@@ -7672,25 +9385,30 @@ interface ListEvaluationRulesRequest {
|
|
|
7672
9385
|
|
|
7673
9386
|
type index$5_CodeEvaluationRuleEvaluatorReference = CodeEvaluationRuleEvaluatorReference;
|
|
7674
9387
|
type index$5_CreateCodeEvaluationRuleRequest = CreateCodeEvaluationRuleRequest;
|
|
9388
|
+
type index$5_CreateEvaluationRuleEvaluatorAssignment = CreateEvaluationRuleEvaluatorAssignment;
|
|
9389
|
+
type index$5_CreateEvaluationRuleEvaluatorReference = CreateEvaluationRuleEvaluatorReference;
|
|
7675
9390
|
type index$5_CreateEvaluationRuleRequest = CreateEvaluationRuleRequest;
|
|
9391
|
+
type index$5_CreateEvaluationRuleWithEvaluatorsRequest = CreateEvaluationRuleWithEvaluatorsRequest;
|
|
7676
9392
|
type index$5_CreateLlmAsJudgeEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest;
|
|
7677
9393
|
type index$5_DeleteEvaluationRuleResponse = DeleteEvaluationRuleResponse;
|
|
7678
9394
|
type index$5_EvaluationRule = EvaluationRule;
|
|
7679
9395
|
type index$5_EvaluationRuleBase = EvaluationRuleBase;
|
|
7680
9396
|
type index$5_EvaluationRuleEvaluator = EvaluationRuleEvaluator;
|
|
9397
|
+
type index$5_EvaluationRuleEvaluatorAssignment = EvaluationRuleEvaluatorAssignment;
|
|
7681
9398
|
type index$5_EvaluationRuleEvaluatorReference = EvaluationRuleEvaluatorReference;
|
|
7682
9399
|
declare const index$5_EvaluationRuleTimeScope: typeof EvaluationRuleTimeScope;
|
|
7683
9400
|
declare const index$5_LegacyEvaluationObject: typeof LegacyEvaluationObject;
|
|
7684
9401
|
type index$5_LegacyEvaluationRule = LegacyEvaluationRule;
|
|
7685
|
-
type index$
|
|
9402
|
+
type index$5_LegacyEvaluationRuleEvaluatorAssignment = LegacyEvaluationRuleEvaluatorAssignment;
|
|
7686
9403
|
declare const index$5_LegacyEvaluationRuleTarget: typeof LegacyEvaluationRuleTarget;
|
|
9404
|
+
type index$5_LegacyPromptVariableMapping = LegacyPromptVariableMapping;
|
|
7687
9405
|
type index$5_ListEvaluationRulesRequest = ListEvaluationRulesRequest;
|
|
7688
9406
|
type index$5_LlmAsJudgeEvaluationRuleEvaluatorReference = LlmAsJudgeEvaluationRuleEvaluatorReference;
|
|
7689
9407
|
declare const index$5_LlmAsJudgeEvaluatorType: typeof LlmAsJudgeEvaluatorType;
|
|
7690
9408
|
type index$5_ReadableEvaluationRule = ReadableEvaluationRule;
|
|
7691
9409
|
type index$5_UpdateEvaluationRuleRequest = UpdateEvaluationRuleRequest;
|
|
7692
9410
|
declare namespace index$5 {
|
|
7693
|
-
export { type index$5_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$5_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$5_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, type index$5_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$5_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$5_EvaluationRule as EvaluationRule, type index$5_EvaluationRuleBase as EvaluationRuleBase, type index$5_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$5_EvaluationRuleEvaluatorReference as EvaluationRuleEvaluatorReference, index$5_EvaluationRuleTimeScope as EvaluationRuleTimeScope, type EvaluationRules$
|
|
9411
|
+
export { type index$5_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$5_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$5_CreateEvaluationRuleEvaluatorAssignment as CreateEvaluationRuleEvaluatorAssignment, type index$5_CreateEvaluationRuleEvaluatorReference as CreateEvaluationRuleEvaluatorReference, type index$5_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, type index$5_CreateEvaluationRuleWithEvaluatorsRequest as CreateEvaluationRuleWithEvaluatorsRequest, type index$5_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$5_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$5_EvaluationRule as EvaluationRule, type index$5_EvaluationRuleBase as EvaluationRuleBase, type index$5_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$5_EvaluationRuleEvaluatorAssignment as EvaluationRuleEvaluatorAssignment, type index$5_EvaluationRuleEvaluatorReference as EvaluationRuleEvaluatorReference, index$5_EvaluationRuleTimeScope as EvaluationRuleTimeScope, type EvaluationRules$2 as EvaluationRules, index$5_LegacyEvaluationObject as LegacyEvaluationObject, type index$5_LegacyEvaluationRule as LegacyEvaluationRule, type index$5_LegacyEvaluationRuleEvaluatorAssignment as LegacyEvaluationRuleEvaluatorAssignment, index$5_LegacyEvaluationRuleTarget as LegacyEvaluationRuleTarget, type index$5_LegacyPromptVariableMapping as LegacyPromptVariableMapping, type index$5_ListEvaluationRulesRequest as ListEvaluationRulesRequest, type index$5_LlmAsJudgeEvaluationRuleEvaluatorReference as LlmAsJudgeEvaluationRuleEvaluatorReference, index$5_LlmAsJudgeEvaluatorType as LlmAsJudgeEvaluatorType, type index$5_ReadableEvaluationRule as ReadableEvaluationRule, type index$5_UpdateEvaluationRuleRequest as UpdateEvaluationRuleRequest };
|
|
7694
9412
|
}
|
|
7695
9413
|
|
|
7696
9414
|
/**
|
|
@@ -7721,7 +9439,8 @@ interface DeleteEvaluatorResponse {
|
|
|
7721
9439
|
*
|
|
7722
9440
|
* Versioning behavior:
|
|
7723
9441
|
* - `GET /evaluators` returns the latest version of each available evaluator.
|
|
7724
|
-
* - `GET /evaluators/{id}`
|
|
9442
|
+
* - `GET /evaluators/{id}` returns the latest version.
|
|
9443
|
+
* - `id` identifies the evaluator family and remains stable when a new version is created.
|
|
7725
9444
|
* - Evaluation rules always run against the latest version for the selected evaluator name within the same source (`project` or `managed`).
|
|
7726
9445
|
*/
|
|
7727
9446
|
type Evaluator = Evaluator.LlmAsJudge | Evaluator.Code;
|
|
@@ -7739,21 +9458,27 @@ declare namespace Evaluator {
|
|
|
7739
9458
|
*/
|
|
7740
9459
|
|
|
7741
9460
|
interface EvaluatorBase {
|
|
7742
|
-
/**
|
|
9461
|
+
/** Stable identifier of this evaluator across all versions. */
|
|
7743
9462
|
id: string;
|
|
7744
9463
|
/** Evaluator name. */
|
|
7745
9464
|
name: string;
|
|
7746
9465
|
/** Version number of this evaluator. */
|
|
7747
9466
|
version: number;
|
|
7748
|
-
/** Where this evaluator comes from: your project or Langfuse-managed defaults. */
|
|
7749
|
-
scope: EvaluatorScope;
|
|
7750
9467
|
/**
|
|
7751
9468
|
* Variables that can be mapped when creating an evaluation rule.
|
|
7752
9469
|
*
|
|
7753
9470
|
* LLM evaluators require every variable to be mapped exactly once. Code evaluators always expose the fixed runtime payload fields and Langfuse maps them automatically.
|
|
7754
9471
|
*/
|
|
7755
9472
|
variables: string[];
|
|
7756
|
-
/**
|
|
9473
|
+
/**
|
|
9474
|
+
* Default variable mapping for this evaluator version, or `null` when no default is configured.
|
|
9475
|
+
*
|
|
9476
|
+
* An entry's `source` is `null` when that variable was never fully configured, and sources
|
|
9477
|
+
* are not restricted by rule `target` here, because the default is stored on the evaluator
|
|
9478
|
+
* rather than on any one rule.
|
|
9479
|
+
*/
|
|
9480
|
+
mapping: PromptVariableMappingRead[] | null;
|
|
9481
|
+
/** Number of evaluation rules in the project that currently use this evaluator. */
|
|
7757
9482
|
evaluationRuleCount: number;
|
|
7758
9483
|
/** Timestamp when this evaluator was created. */
|
|
7759
9484
|
createdAt: string;
|
|
@@ -7794,7 +9519,7 @@ interface CodeEvaluator extends EvaluatorBase {
|
|
|
7794
9519
|
* This file was auto-generated by Fern from our API Definition.
|
|
7795
9520
|
*/
|
|
7796
9521
|
|
|
7797
|
-
interface Evaluators$
|
|
9522
|
+
interface Evaluators$2 {
|
|
7798
9523
|
data: Evaluator[];
|
|
7799
9524
|
meta: MetaResponse;
|
|
7800
9525
|
}
|
|
@@ -7807,7 +9532,7 @@ interface Evaluators$1 {
|
|
|
7807
9532
|
* Request body for creating an evaluator.
|
|
7808
9533
|
*
|
|
7809
9534
|
* If the same `name` already exists in your project, Langfuse creates the next version and returns it.
|
|
7810
|
-
* Existing evaluation rules
|
|
9535
|
+
* Existing evaluation rules automatically use the latest evaluator version.
|
|
7811
9536
|
* If `type` is omitted, Langfuse defaults it to `llm_as_judge` for backwards compatibility.
|
|
7812
9537
|
*/
|
|
7813
9538
|
type CreateEvaluatorRequest = CreateEvaluatorRequest.LlmAsJudge | CreateEvaluatorRequest.Code;
|
|
@@ -7838,6 +9563,8 @@ interface CreateLlmAsJudgeEvaluatorRequest {
|
|
|
7838
9563
|
outputDefinition: EvaluatorOutputDefinition;
|
|
7839
9564
|
/** Optional explicit model configuration. Omit or set to `null` to use the project default evaluation model. */
|
|
7840
9565
|
modelConfig?: EvaluatorModelConfig | null;
|
|
9566
|
+
/** Optional default variable mapping inherited by rule assignments that do not provide an override. */
|
|
9567
|
+
mapping?: PromptVariableMappingInput[];
|
|
7841
9568
|
}
|
|
7842
9569
|
|
|
7843
9570
|
/**
|
|
@@ -7877,7 +9604,7 @@ type index$4_EvaluatorBase = EvaluatorBase;
|
|
|
7877
9604
|
type index$4_ListEvaluatorsRequest = ListEvaluatorsRequest;
|
|
7878
9605
|
type index$4_LlmAsJudgeEvaluator = LlmAsJudgeEvaluator;
|
|
7879
9606
|
declare namespace index$4 {
|
|
7880
|
-
export { type index$4_CodeEvaluator as CodeEvaluator, type index$4_CreateCodeEvaluatorRequest as CreateCodeEvaluatorRequest, index$4_CreateEvaluatorRequest as CreateEvaluatorRequest, type index$4_CreateLlmAsJudgeEvaluatorRequest as CreateLlmAsJudgeEvaluatorRequest, type index$4_DeleteEvaluatorResponse as DeleteEvaluatorResponse, index$4_Evaluator as Evaluator, type index$4_EvaluatorBase as EvaluatorBase, type Evaluators$
|
|
9607
|
+
export { type index$4_CodeEvaluator as CodeEvaluator, type index$4_CreateCodeEvaluatorRequest as CreateCodeEvaluatorRequest, index$4_CreateEvaluatorRequest as CreateEvaluatorRequest, type index$4_CreateLlmAsJudgeEvaluatorRequest as CreateLlmAsJudgeEvaluatorRequest, type index$4_DeleteEvaluatorResponse as DeleteEvaluatorResponse, index$4_Evaluator as Evaluator, type index$4_EvaluatorBase as EvaluatorBase, type Evaluators$2 as Evaluators, type index$4_ListEvaluatorsRequest as ListEvaluatorsRequest, type index$4_LlmAsJudgeEvaluator as LlmAsJudgeEvaluator };
|
|
7881
9608
|
}
|
|
7882
9609
|
|
|
7883
9610
|
type index$3_AccessDeniedError = AccessDeniedError;
|
|
@@ -7897,7 +9624,10 @@ type index$3_CreateCodeEvaluatorRequest = CreateCodeEvaluatorRequest;
|
|
|
7897
9624
|
declare const index$3_CreateDashboardPlacementRequest: typeof CreateDashboardPlacementRequest;
|
|
7898
9625
|
type index$3_CreateDashboardRequest = CreateDashboardRequest;
|
|
7899
9626
|
type index$3_CreateDashboardWidgetRequest = CreateDashboardWidgetRequest;
|
|
9627
|
+
type index$3_CreateEvaluationRuleEvaluatorAssignment = CreateEvaluationRuleEvaluatorAssignment;
|
|
9628
|
+
type index$3_CreateEvaluationRuleEvaluatorReference = CreateEvaluationRuleEvaluatorReference;
|
|
7900
9629
|
type index$3_CreateEvaluationRuleRequest = CreateEvaluationRuleRequest;
|
|
9630
|
+
type index$3_CreateEvaluationRuleWithEvaluatorsRequest = CreateEvaluationRuleWithEvaluatorsRequest;
|
|
7901
9631
|
declare const index$3_CreateEvaluatorRequest: typeof CreateEvaluatorRequest;
|
|
7902
9632
|
type index$3_CreateLlmAsJudgeEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest;
|
|
7903
9633
|
type index$3_CreateLlmAsJudgeEvaluatorRequest = CreateLlmAsJudgeEvaluatorRequest;
|
|
@@ -7931,10 +9661,9 @@ declare const index$3_EvaluationRuleArrayOptionsFilterOperator: typeof Evaluatio
|
|
|
7931
9661
|
type index$3_EvaluationRuleBase = EvaluationRuleBase;
|
|
7932
9662
|
declare const index$3_EvaluationRuleBooleanFilterOperator: typeof EvaluationRuleBooleanFilterOperator;
|
|
7933
9663
|
type index$3_EvaluationRuleEvaluator = EvaluationRuleEvaluator;
|
|
9664
|
+
type index$3_EvaluationRuleEvaluatorAssignment = EvaluationRuleEvaluatorAssignment;
|
|
7934
9665
|
type index$3_EvaluationRuleEvaluatorReference = EvaluationRuleEvaluatorReference;
|
|
7935
9666
|
declare const index$3_EvaluationRuleFilter: typeof EvaluationRuleFilter;
|
|
7936
|
-
type index$3_EvaluationRuleMapping = EvaluationRuleMapping;
|
|
7937
|
-
declare const index$3_EvaluationRuleMappingSource: typeof EvaluationRuleMappingSource;
|
|
7938
9667
|
declare const index$3_EvaluationRuleNullFilterOperator: typeof EvaluationRuleNullFilterOperator;
|
|
7939
9668
|
declare const index$3_EvaluationRuleNumberFilterOperator: typeof EvaluationRuleNumberFilterOperator;
|
|
7940
9669
|
declare const index$3_EvaluationRuleOptionsFilterOperator: typeof EvaluationRuleOptionsFilterOperator;
|
|
@@ -7948,14 +9677,14 @@ type index$3_EvaluatorModelConfig = EvaluatorModelConfig;
|
|
|
7948
9677
|
declare const index$3_EvaluatorOutputDataType: typeof EvaluatorOutputDataType;
|
|
7949
9678
|
declare const index$3_EvaluatorOutputDefinition: typeof EvaluatorOutputDefinition;
|
|
7950
9679
|
type index$3_EvaluatorOutputFieldDefinition = EvaluatorOutputFieldDefinition;
|
|
7951
|
-
declare const index$3_EvaluatorScope: typeof EvaluatorScope;
|
|
7952
9680
|
declare const index$3_EvaluatorType: typeof EvaluatorType;
|
|
7953
9681
|
type index$3_InternalServerError = InternalServerError;
|
|
7954
9682
|
declare const index$3_InternalServerError: typeof InternalServerError;
|
|
7955
9683
|
declare const index$3_LegacyEvaluationObject: typeof LegacyEvaluationObject;
|
|
7956
9684
|
type index$3_LegacyEvaluationRule = LegacyEvaluationRule;
|
|
7957
|
-
type index$
|
|
9685
|
+
type index$3_LegacyEvaluationRuleEvaluatorAssignment = LegacyEvaluationRuleEvaluatorAssignment;
|
|
7958
9686
|
declare const index$3_LegacyEvaluationRuleTarget: typeof LegacyEvaluationRuleTarget;
|
|
9687
|
+
type index$3_LegacyPromptVariableMapping = LegacyPromptVariableMapping;
|
|
7959
9688
|
type index$3_ListDashboardWidgetsRequest = ListDashboardWidgetsRequest;
|
|
7960
9689
|
type index$3_ListDashboardsRequest = ListDashboardsRequest;
|
|
7961
9690
|
type index$3_ListEvaluationRulesRequest = ListEvaluationRulesRequest;
|
|
@@ -7971,6 +9700,9 @@ type index$3_NullEvaluationRuleFilter = NullEvaluationRuleFilter;
|
|
|
7971
9700
|
type index$3_NumberEvaluationRuleFilter = NumberEvaluationRuleFilter;
|
|
7972
9701
|
type index$3_NumberObjectEvaluationRuleFilter = NumberObjectEvaluationRuleFilter;
|
|
7973
9702
|
type index$3_PresetPlacement = PresetPlacement;
|
|
9703
|
+
type index$3_PromptVariableMappingInput = PromptVariableMappingInput;
|
|
9704
|
+
type index$3_PromptVariableMappingRead = PromptVariableMappingRead;
|
|
9705
|
+
declare const index$3_PromptVariableMappingSource: typeof PromptVariableMappingSource;
|
|
7974
9706
|
type index$3_PublicApiError = PublicApiError;
|
|
7975
9707
|
declare const index$3_PublicApiErrorCode: typeof PublicApiErrorCode;
|
|
7976
9708
|
type index$3_PublicApiErrorDetails = PublicApiErrorDetails;
|
|
@@ -7980,6 +9712,7 @@ type index$3_PublicCategoricalEvaluatorOutputDefinition = PublicCategoricalEvalu
|
|
|
7980
9712
|
type index$3_PublicCategoricalEvaluatorOutputScoreDefinition = PublicCategoricalEvaluatorOutputScoreDefinition;
|
|
7981
9713
|
declare const index$3_PublicEvaluatorOutputDefinition: typeof PublicEvaluatorOutputDefinition;
|
|
7982
9714
|
type index$3_PublicNumericEvaluatorOutputDefinition = PublicNumericEvaluatorOutputDefinition;
|
|
9715
|
+
type index$3_PublicNumericEvaluatorOutputScoreDefinition = PublicNumericEvaluatorOutputScoreDefinition;
|
|
7983
9716
|
type index$3_ReadableEvaluationRule = ReadableEvaluationRule;
|
|
7984
9717
|
type index$3_StringEvaluationRuleFilter = StringEvaluationRuleFilter;
|
|
7985
9718
|
type index$3_StringObjectEvaluationRuleFilter = StringObjectEvaluationRuleFilter;
|
|
@@ -7996,7 +9729,7 @@ type index$3_UpdateDashboardWidgetRequest = UpdateDashboardWidgetRequest;
|
|
|
7996
9729
|
type index$3_UpdateEvaluationRuleRequest = UpdateEvaluationRuleRequest;
|
|
7997
9730
|
type index$3_WidgetPlacement = WidgetPlacement;
|
|
7998
9731
|
declare namespace index$3 {
|
|
7999
|
-
export { index$3_AccessDeniedError as AccessDeniedError, type index$3_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, index$3_BadRequestError as BadRequestError, type index$3_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$3_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, type index$3_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$3_CodeEvaluator as CodeEvaluator, index$3_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, index$3_ConflictError as ConflictError, type index$3_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$3_CreateCodeEvaluatorRequest as CreateCodeEvaluatorRequest, index$3_CreateDashboardPlacementRequest as CreateDashboardPlacementRequest, type index$3_CreateDashboardRequest as CreateDashboardRequest, type index$3_CreateDashboardWidgetRequest as CreateDashboardWidgetRequest, type index$3_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, index$3_CreateEvaluatorRequest as CreateEvaluatorRequest, type index$3_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$3_CreateLlmAsJudgeEvaluatorRequest as CreateLlmAsJudgeEvaluatorRequest, type index$3_CreatePresetPlacement as CreatePresetPlacement, type index$3_CreateWidgetPlacement as CreateWidgetPlacement, type index$3_Dashboard as Dashboard, type index$3_DashboardDefinition as DashboardDefinition, type index$3_DashboardList as DashboardList, index$3_DashboardPlacement as DashboardPlacement, type index$3_DashboardWidget as DashboardWidget, type index$3_DashboardWidgetChartConfig as DashboardWidgetChartConfig, type index$3_DashboardWidgetChartConfigInput as DashboardWidgetChartConfigInput, index$3_DashboardWidgetChartType as DashboardWidgetChartType, type index$3_DashboardWidgetDefaultSort as DashboardWidgetDefaultSort, type index$3_DashboardWidgetDimension as DashboardWidgetDimension, type index$3_DashboardWidgetFilter as DashboardWidgetFilter, type index$3_DashboardWidgetList as DashboardWidgetList, type index$3_DashboardWidgetMetric as DashboardWidgetMetric, index$3_DashboardWidgetMetricAggregation as DashboardWidgetMetricAggregation, index$3_DashboardWidgetSortOrder as DashboardWidgetSortOrder, index$3_DashboardWidgetView as DashboardWidgetView, index$3_DashboardWidgetViewWithLegacy as DashboardWidgetViewWithLegacy, type index$3_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, type index$3_DeleteDashboardPlacementResponse as DeleteDashboardPlacementResponse, type index$3_DeleteDashboardResponse as DeleteDashboardResponse, type index$3_DeleteDashboardWidgetResponse as DeleteDashboardWidgetResponse, type index$3_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$3_DeleteEvaluatorResponse as DeleteEvaluatorResponse, type index$3_EvaluationRule as EvaluationRule, index$3_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, type index$3_EvaluationRuleBase as EvaluationRuleBase, index$3_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, type index$3_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$
|
|
9732
|
+
export { index$3_AccessDeniedError as AccessDeniedError, type index$3_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, index$3_BadRequestError as BadRequestError, type index$3_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$3_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, type index$3_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$3_CodeEvaluator as CodeEvaluator, index$3_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, index$3_ConflictError as ConflictError, type index$3_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$3_CreateCodeEvaluatorRequest as CreateCodeEvaluatorRequest, index$3_CreateDashboardPlacementRequest as CreateDashboardPlacementRequest, type index$3_CreateDashboardRequest as CreateDashboardRequest, type index$3_CreateDashboardWidgetRequest as CreateDashboardWidgetRequest, type index$3_CreateEvaluationRuleEvaluatorAssignment as CreateEvaluationRuleEvaluatorAssignment, type index$3_CreateEvaluationRuleEvaluatorReference as CreateEvaluationRuleEvaluatorReference, type index$3_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, type index$3_CreateEvaluationRuleWithEvaluatorsRequest as CreateEvaluationRuleWithEvaluatorsRequest, index$3_CreateEvaluatorRequest as CreateEvaluatorRequest, type index$3_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$3_CreateLlmAsJudgeEvaluatorRequest as CreateLlmAsJudgeEvaluatorRequest, type index$3_CreatePresetPlacement as CreatePresetPlacement, type index$3_CreateWidgetPlacement as CreateWidgetPlacement, type index$3_Dashboard as Dashboard, type index$3_DashboardDefinition as DashboardDefinition, type index$3_DashboardList as DashboardList, index$3_DashboardPlacement as DashboardPlacement, type index$3_DashboardWidget as DashboardWidget, type index$3_DashboardWidgetChartConfig as DashboardWidgetChartConfig, type index$3_DashboardWidgetChartConfigInput as DashboardWidgetChartConfigInput, index$3_DashboardWidgetChartType as DashboardWidgetChartType, type index$3_DashboardWidgetDefaultSort as DashboardWidgetDefaultSort, type index$3_DashboardWidgetDimension as DashboardWidgetDimension, type index$3_DashboardWidgetFilter as DashboardWidgetFilter, type index$3_DashboardWidgetList as DashboardWidgetList, type index$3_DashboardWidgetMetric as DashboardWidgetMetric, index$3_DashboardWidgetMetricAggregation as DashboardWidgetMetricAggregation, index$3_DashboardWidgetSortOrder as DashboardWidgetSortOrder, index$3_DashboardWidgetView as DashboardWidgetView, index$3_DashboardWidgetViewWithLegacy as DashboardWidgetViewWithLegacy, type index$3_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, type index$3_DeleteDashboardPlacementResponse as DeleteDashboardPlacementResponse, type index$3_DeleteDashboardResponse as DeleteDashboardResponse, type index$3_DeleteDashboardWidgetResponse as DeleteDashboardWidgetResponse, type index$3_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$3_DeleteEvaluatorResponse as DeleteEvaluatorResponse, type index$3_EvaluationRule as EvaluationRule, index$3_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, type index$3_EvaluationRuleBase as EvaluationRuleBase, index$3_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, type index$3_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$3_EvaluationRuleEvaluatorAssignment as EvaluationRuleEvaluatorAssignment, type index$3_EvaluationRuleEvaluatorReference as EvaluationRuleEvaluatorReference, index$3_EvaluationRuleFilter as EvaluationRuleFilter, index$3_EvaluationRuleNullFilterOperator as EvaluationRuleNullFilterOperator, index$3_EvaluationRuleNumberFilterOperator as EvaluationRuleNumberFilterOperator, index$3_EvaluationRuleOptionsFilterOperator as EvaluationRuleOptionsFilterOperator, index$3_EvaluationRuleStatus as EvaluationRuleStatus, index$3_EvaluationRuleStringFilterOperator as EvaluationRuleStringFilterOperator, index$3_EvaluationRuleTarget as EvaluationRuleTarget, index$3_EvaluationRuleTimeScope as EvaluationRuleTimeScope, type EvaluationRules$2 as EvaluationRules, index$3_Evaluator as Evaluator, type index$3_EvaluatorBase as EvaluatorBase, type index$3_EvaluatorModelConfig as EvaluatorModelConfig, index$3_EvaluatorOutputDataType as EvaluatorOutputDataType, index$3_EvaluatorOutputDefinition as EvaluatorOutputDefinition, type index$3_EvaluatorOutputFieldDefinition as EvaluatorOutputFieldDefinition, index$3_EvaluatorType as EvaluatorType, type Evaluators$2 as Evaluators, index$3_InternalServerError as InternalServerError, index$3_LegacyEvaluationObject as LegacyEvaluationObject, type index$3_LegacyEvaluationRule as LegacyEvaluationRule, type index$3_LegacyEvaluationRuleEvaluatorAssignment as LegacyEvaluationRuleEvaluatorAssignment, index$3_LegacyEvaluationRuleTarget as LegacyEvaluationRuleTarget, type index$3_LegacyPromptVariableMapping as LegacyPromptVariableMapping, type index$3_ListDashboardWidgetsRequest as ListDashboardWidgetsRequest, type index$3_ListDashboardsRequest as ListDashboardsRequest, type index$3_ListEvaluationRulesRequest as ListEvaluationRulesRequest, type index$3_ListEvaluatorsRequest as ListEvaluatorsRequest, type index$3_LlmAsJudgeEvaluationRuleEvaluatorReference as LlmAsJudgeEvaluationRuleEvaluatorReference, type index$3_LlmAsJudgeEvaluator as LlmAsJudgeEvaluator, index$3_LlmAsJudgeEvaluatorType as LlmAsJudgeEvaluatorType, index$3_MethodNotAllowedError as MethodNotAllowedError, index$3_NotFoundError as NotFoundError, type index$3_NullEvaluationRuleFilter as NullEvaluationRuleFilter, type index$3_NumberEvaluationRuleFilter as NumberEvaluationRuleFilter, type index$3_NumberObjectEvaluationRuleFilter as NumberObjectEvaluationRuleFilter, type index$3_PresetPlacement as PresetPlacement, type index$3_PromptVariableMappingInput as PromptVariableMappingInput, type index$3_PromptVariableMappingRead as PromptVariableMappingRead, index$3_PromptVariableMappingSource as PromptVariableMappingSource, type index$3_PublicApiError as PublicApiError, index$3_PublicApiErrorCode as PublicApiErrorCode, type index$3_PublicApiErrorDetails as PublicApiErrorDetails, type index$3_PublicApiValidationIssue as PublicApiValidationIssue, type index$3_PublicBooleanEvaluatorOutputDefinition as PublicBooleanEvaluatorOutputDefinition, type index$3_PublicCategoricalEvaluatorOutputDefinition as PublicCategoricalEvaluatorOutputDefinition, type index$3_PublicCategoricalEvaluatorOutputScoreDefinition as PublicCategoricalEvaluatorOutputScoreDefinition, index$3_PublicEvaluatorOutputDefinition as PublicEvaluatorOutputDefinition, type index$3_PublicNumericEvaluatorOutputDefinition as PublicNumericEvaluatorOutputDefinition, type index$3_PublicNumericEvaluatorOutputScoreDefinition as PublicNumericEvaluatorOutputScoreDefinition, type index$3_ReadableEvaluationRule as ReadableEvaluationRule, type index$3_StringEvaluationRuleFilter as StringEvaluationRuleFilter, type index$3_StringObjectEvaluationRuleFilter as StringObjectEvaluationRuleFilter, type index$3_StringOptionsEvaluationRuleFilter as StringOptionsEvaluationRuleFilter, index$3_TooManyRequestsError as TooManyRequestsError, index$3_UnauthorizedError as UnauthorizedError, index$3_UnprocessableContentError as UnprocessableContentError, type index$3_UpdateDashboardPlacementRequest as UpdateDashboardPlacementRequest, type index$3_UpdateDashboardRequest as UpdateDashboardRequest, type index$3_UpdateDashboardWidgetRequest as UpdateDashboardWidgetRequest, type index$3_UpdateEvaluationRuleRequest as UpdateEvaluationRuleRequest, type index$3_WidgetPlacement as WidgetPlacement, index$9 as commons, index$8 as dashboardWidgets, index$7 as dashboards, index$6 as errors, index$5 as evaluationRules, index$4 as evaluators };
|
|
8000
9733
|
}
|
|
8001
9734
|
|
|
8002
9735
|
/**
|
|
@@ -8597,11 +10330,265 @@ declare class DatasetItems {
|
|
|
8597
10330
|
get(id: string, requestOptions?: DatasetItems.RequestOptions): HttpResponsePromise<DatasetItem>;
|
|
8598
10331
|
private __get;
|
|
8599
10332
|
/**
|
|
8600
|
-
* Get dataset items. Optionally specify a version to get the items as they existed at that point in time.
|
|
8601
|
-
* Note: If version parameter is provided, datasetName must also be provided.
|
|
10333
|
+
* Get dataset items. Optionally specify a version to get the items as they existed at that point in time.
|
|
10334
|
+
* Note: If version parameter is provided, datasetName must also be provided.
|
|
10335
|
+
*
|
|
10336
|
+
* @param {LangfuseAPI.GetDatasetItemsRequest} request
|
|
10337
|
+
* @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
10338
|
+
*
|
|
10339
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10340
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10341
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10342
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10343
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10344
|
+
*
|
|
10345
|
+
* @example
|
|
10346
|
+
* await client.datasetItems.list()
|
|
10347
|
+
*/
|
|
10348
|
+
list(request?: GetDatasetItemsRequest, requestOptions?: DatasetItems.RequestOptions): HttpResponsePromise<PaginatedDatasetItems>;
|
|
10349
|
+
private __list;
|
|
10350
|
+
/**
|
|
10351
|
+
* Delete a dataset item and all its run items. This action is irreversible.
|
|
10352
|
+
*
|
|
10353
|
+
* @param {string} id
|
|
10354
|
+
* @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
10355
|
+
*
|
|
10356
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10357
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10358
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10359
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10360
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10361
|
+
*
|
|
10362
|
+
* @example
|
|
10363
|
+
* await client.datasetItems.delete("id")
|
|
10364
|
+
*/
|
|
10365
|
+
delete(id: string, requestOptions?: DatasetItems.RequestOptions): HttpResponsePromise<DeleteDatasetItemResponse>;
|
|
10366
|
+
private __delete;
|
|
10367
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
10368
|
+
}
|
|
10369
|
+
|
|
10370
|
+
/**
|
|
10371
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
10372
|
+
*/
|
|
10373
|
+
|
|
10374
|
+
declare namespace DatasetRunItems {
|
|
10375
|
+
interface Options {
|
|
10376
|
+
environment: Supplier<string>;
|
|
10377
|
+
/** Specify a custom URL to connect the client to. */
|
|
10378
|
+
baseUrl?: Supplier<string>;
|
|
10379
|
+
username?: Supplier<string | undefined>;
|
|
10380
|
+
password?: Supplier<string | undefined>;
|
|
10381
|
+
/** Override the X-Langfuse-Sdk-Name header */
|
|
10382
|
+
xLangfuseSdkName?: Supplier<string | undefined>;
|
|
10383
|
+
/** Override the X-Langfuse-Sdk-Version header */
|
|
10384
|
+
xLangfuseSdkVersion?: Supplier<string | undefined>;
|
|
10385
|
+
/** Override the X-Langfuse-Public-Key header */
|
|
10386
|
+
xLangfusePublicKey?: Supplier<string | undefined>;
|
|
10387
|
+
/** Additional headers to include in requests. */
|
|
10388
|
+
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
10389
|
+
}
|
|
10390
|
+
interface RequestOptions {
|
|
10391
|
+
/** The maximum time to wait for a response in seconds. */
|
|
10392
|
+
timeoutInSeconds?: number;
|
|
10393
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
10394
|
+
maxRetries?: number;
|
|
10395
|
+
/** A hook to abort the request. */
|
|
10396
|
+
abortSignal?: AbortSignal;
|
|
10397
|
+
/** Override the X-Langfuse-Sdk-Name header */
|
|
10398
|
+
xLangfuseSdkName?: string | undefined;
|
|
10399
|
+
/** Override the X-Langfuse-Sdk-Version header */
|
|
10400
|
+
xLangfuseSdkVersion?: string | undefined;
|
|
10401
|
+
/** Override the X-Langfuse-Public-Key header */
|
|
10402
|
+
xLangfusePublicKey?: string | undefined;
|
|
10403
|
+
/** Additional query string parameters to include in the request. */
|
|
10404
|
+
queryParams?: Record<string, unknown>;
|
|
10405
|
+
/** Additional headers to include in the request. */
|
|
10406
|
+
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
10407
|
+
}
|
|
10408
|
+
}
|
|
10409
|
+
declare class DatasetRunItems {
|
|
10410
|
+
protected readonly _options: DatasetRunItems.Options;
|
|
10411
|
+
constructor(_options: DatasetRunItems.Options);
|
|
10412
|
+
/**
|
|
10413
|
+
* Create a dataset run item
|
|
10414
|
+
*
|
|
10415
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, create experiment data via the SDK experiment runner or the OpenTelemetry endpoint at POST /api/public/otel/v1/traces. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
10416
|
+
*
|
|
10417
|
+
* @param {LangfuseAPI.CreateDatasetRunItemRequest} request
|
|
10418
|
+
* @param {DatasetRunItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
10419
|
+
*
|
|
10420
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10421
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10422
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10423
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10424
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10425
|
+
*
|
|
10426
|
+
* @example
|
|
10427
|
+
* await client.datasetRunItems.create({
|
|
10428
|
+
* runName: "runName",
|
|
10429
|
+
* runDescription: undefined,
|
|
10430
|
+
* metadata: undefined,
|
|
10431
|
+
* datasetItemId: "datasetItemId",
|
|
10432
|
+
* observationId: undefined,
|
|
10433
|
+
* traceId: undefined,
|
|
10434
|
+
* datasetVersion: undefined,
|
|
10435
|
+
* createdAt: undefined
|
|
10436
|
+
* })
|
|
10437
|
+
*/
|
|
10438
|
+
create(request: CreateDatasetRunItemRequest, requestOptions?: DatasetRunItems.RequestOptions): HttpResponsePromise<DatasetRunItem>;
|
|
10439
|
+
private __create;
|
|
10440
|
+
/**
|
|
10441
|
+
* List dataset run items
|
|
10442
|
+
*
|
|
10443
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset run items are replaced by experiment items; use `GET /api/public/experiment-items?fromStartTime=<from>&toStartTime=<to>` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
10444
|
+
*
|
|
10445
|
+
* @param {LangfuseAPI.ListDatasetRunItemsRequest} request
|
|
10446
|
+
* @param {DatasetRunItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
10447
|
+
*
|
|
10448
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10449
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10450
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10451
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10452
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10453
|
+
*
|
|
10454
|
+
* @example
|
|
10455
|
+
* await client.datasetRunItems.list({
|
|
10456
|
+
* datasetId: "datasetId",
|
|
10457
|
+
* runName: "runName"
|
|
10458
|
+
* })
|
|
10459
|
+
*/
|
|
10460
|
+
list(request: ListDatasetRunItemsRequest, requestOptions?: DatasetRunItems.RequestOptions): HttpResponsePromise<PaginatedDatasetRunItems>;
|
|
10461
|
+
private __list;
|
|
10462
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
10463
|
+
}
|
|
10464
|
+
|
|
10465
|
+
/**
|
|
10466
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
10467
|
+
*/
|
|
10468
|
+
|
|
10469
|
+
declare namespace Datasets {
|
|
10470
|
+
interface Options {
|
|
10471
|
+
environment: Supplier<string>;
|
|
10472
|
+
/** Specify a custom URL to connect the client to. */
|
|
10473
|
+
baseUrl?: Supplier<string>;
|
|
10474
|
+
username?: Supplier<string | undefined>;
|
|
10475
|
+
password?: Supplier<string | undefined>;
|
|
10476
|
+
/** Override the X-Langfuse-Sdk-Name header */
|
|
10477
|
+
xLangfuseSdkName?: Supplier<string | undefined>;
|
|
10478
|
+
/** Override the X-Langfuse-Sdk-Version header */
|
|
10479
|
+
xLangfuseSdkVersion?: Supplier<string | undefined>;
|
|
10480
|
+
/** Override the X-Langfuse-Public-Key header */
|
|
10481
|
+
xLangfusePublicKey?: Supplier<string | undefined>;
|
|
10482
|
+
/** Additional headers to include in requests. */
|
|
10483
|
+
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
10484
|
+
}
|
|
10485
|
+
interface RequestOptions {
|
|
10486
|
+
/** The maximum time to wait for a response in seconds. */
|
|
10487
|
+
timeoutInSeconds?: number;
|
|
10488
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
10489
|
+
maxRetries?: number;
|
|
10490
|
+
/** A hook to abort the request. */
|
|
10491
|
+
abortSignal?: AbortSignal;
|
|
10492
|
+
/** Override the X-Langfuse-Sdk-Name header */
|
|
10493
|
+
xLangfuseSdkName?: string | undefined;
|
|
10494
|
+
/** Override the X-Langfuse-Sdk-Version header */
|
|
10495
|
+
xLangfuseSdkVersion?: string | undefined;
|
|
10496
|
+
/** Override the X-Langfuse-Public-Key header */
|
|
10497
|
+
xLangfusePublicKey?: string | undefined;
|
|
10498
|
+
/** Additional query string parameters to include in the request. */
|
|
10499
|
+
queryParams?: Record<string, unknown>;
|
|
10500
|
+
/** Additional headers to include in the request. */
|
|
10501
|
+
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
10502
|
+
}
|
|
10503
|
+
}
|
|
10504
|
+
declare class Datasets {
|
|
10505
|
+
protected readonly _options: Datasets.Options;
|
|
10506
|
+
constructor(_options: Datasets.Options);
|
|
10507
|
+
/**
|
|
10508
|
+
* Get all datasets
|
|
10509
|
+
*
|
|
10510
|
+
* @param {LangfuseAPI.GetDatasetsRequest} request
|
|
10511
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
10512
|
+
*
|
|
10513
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10514
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10515
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10516
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10517
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10518
|
+
*
|
|
10519
|
+
* @example
|
|
10520
|
+
* await client.datasets.list()
|
|
10521
|
+
*/
|
|
10522
|
+
list(request?: GetDatasetsRequest, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<PaginatedDatasets>;
|
|
10523
|
+
private __list;
|
|
10524
|
+
/**
|
|
10525
|
+
* Get a dataset
|
|
10526
|
+
*
|
|
10527
|
+
* @param {string} datasetName
|
|
10528
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
10529
|
+
*
|
|
10530
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10531
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10532
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10533
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10534
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10535
|
+
*
|
|
10536
|
+
* @example
|
|
10537
|
+
* await client.datasets.get("datasetName")
|
|
10538
|
+
*/
|
|
10539
|
+
get(datasetName: string, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<Dataset>;
|
|
10540
|
+
private __get;
|
|
10541
|
+
/**
|
|
10542
|
+
* Create a dataset
|
|
10543
|
+
*
|
|
10544
|
+
* @param {LangfuseAPI.CreateDatasetRequest} request
|
|
10545
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
10546
|
+
*
|
|
10547
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10548
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10549
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10550
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10551
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10552
|
+
*
|
|
10553
|
+
* @example
|
|
10554
|
+
* await client.datasets.create({
|
|
10555
|
+
* name: "name",
|
|
10556
|
+
* description: undefined,
|
|
10557
|
+
* metadata: undefined,
|
|
10558
|
+
* inputSchema: undefined,
|
|
10559
|
+
* expectedOutputSchema: undefined
|
|
10560
|
+
* })
|
|
10561
|
+
*/
|
|
10562
|
+
create(request: CreateDatasetRequest, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<Dataset>;
|
|
10563
|
+
private __create;
|
|
10564
|
+
/**
|
|
10565
|
+
* Get a dataset run and its items
|
|
10566
|
+
*
|
|
10567
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
10568
|
+
*
|
|
10569
|
+
* @param {string} datasetName
|
|
10570
|
+
* @param {string} runName
|
|
10571
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
10572
|
+
*
|
|
10573
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10574
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10575
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10576
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10577
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10578
|
+
*
|
|
10579
|
+
* @example
|
|
10580
|
+
* await client.datasets.getRun("datasetName", "runName")
|
|
10581
|
+
*/
|
|
10582
|
+
getRun(datasetName: string, runName: string, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DatasetRunWithItems>;
|
|
10583
|
+
private __getRun;
|
|
10584
|
+
/**
|
|
10585
|
+
* Delete a dataset run and all its run items. This action is irreversible.
|
|
8602
10586
|
*
|
|
8603
|
-
* @
|
|
8604
|
-
*
|
|
10587
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
10588
|
+
*
|
|
10589
|
+
* @param {string} datasetName
|
|
10590
|
+
* @param {string} runName
|
|
10591
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
8605
10592
|
*
|
|
8606
10593
|
* @throws {@link LangfuseAPI.Error}
|
|
8607
10594
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
@@ -8610,15 +10597,18 @@ declare class DatasetItems {
|
|
|
8610
10597
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8611
10598
|
*
|
|
8612
10599
|
* @example
|
|
8613
|
-
* await client.
|
|
10600
|
+
* await client.datasets.deleteRun("datasetName", "runName")
|
|
8614
10601
|
*/
|
|
8615
|
-
|
|
8616
|
-
private
|
|
10602
|
+
deleteRun(datasetName: string, runName: string, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DeleteDatasetRunResponse>;
|
|
10603
|
+
private __deleteRun;
|
|
8617
10604
|
/**
|
|
8618
|
-
*
|
|
10605
|
+
* Get dataset runs
|
|
8619
10606
|
*
|
|
8620
|
-
* @
|
|
8621
|
-
*
|
|
10607
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
10608
|
+
*
|
|
10609
|
+
* @param {string} datasetName
|
|
10610
|
+
* @param {LangfuseAPI.GetDatasetRunsRequest} request
|
|
10611
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
8622
10612
|
*
|
|
8623
10613
|
* @throws {@link LangfuseAPI.Error}
|
|
8624
10614
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
@@ -8627,10 +10617,10 @@ declare class DatasetItems {
|
|
|
8627
10617
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8628
10618
|
*
|
|
8629
10619
|
* @example
|
|
8630
|
-
* await client.
|
|
10620
|
+
* await client.datasets.getRuns("datasetName")
|
|
8631
10621
|
*/
|
|
8632
|
-
|
|
8633
|
-
private
|
|
10622
|
+
getRuns(datasetName: string, request?: GetDatasetRunsRequest, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<PaginatedDatasetRuns>;
|
|
10623
|
+
private __getRuns;
|
|
8634
10624
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
8635
10625
|
}
|
|
8636
10626
|
|
|
@@ -8638,7 +10628,7 @@ declare class DatasetItems {
|
|
|
8638
10628
|
* This file was auto-generated by Fern from our API Definition.
|
|
8639
10629
|
*/
|
|
8640
10630
|
|
|
8641
|
-
declare namespace
|
|
10631
|
+
declare namespace EvaluationRules$1 {
|
|
8642
10632
|
interface Options {
|
|
8643
10633
|
environment: Supplier<string>;
|
|
8644
10634
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -8673,15 +10663,33 @@ declare namespace DatasetRunItems {
|
|
|
8673
10663
|
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
8674
10664
|
}
|
|
8675
10665
|
}
|
|
8676
|
-
declare class
|
|
8677
|
-
protected readonly _options:
|
|
8678
|
-
constructor(_options:
|
|
10666
|
+
declare class EvaluationRules$1 {
|
|
10667
|
+
protected readonly _options: EvaluationRules$1.Options;
|
|
10668
|
+
constructor(_options: EvaluationRules$1.Options);
|
|
8679
10669
|
/**
|
|
8680
|
-
* Create
|
|
10670
|
+
* Create an evaluation rule using stable evaluator identifiers.
|
|
8681
10671
|
*
|
|
8682
|
-
*
|
|
8683
|
-
*
|
|
10672
|
+
* An evaluation rule defines **which** incoming observations should be evaluated and how prompt variables should be populated.
|
|
10673
|
+
*
|
|
10674
|
+
* Key behavior:
|
|
10675
|
+
* - rule names are not identifiers and do not need to be unique
|
|
10676
|
+
* - rules always use the latest version of each associated evaluator
|
|
10677
|
+
* - an enabled rule requires at least one evaluator assignment
|
|
10678
|
+
* - omit `sampling` to evaluate every matching observation
|
|
10679
|
+
* - omit `filter` to match every incoming observation
|
|
10680
|
+
* - `datasetId` is the public filter name for selecting experiment datasets
|
|
8684
10681
|
*
|
|
10682
|
+
* @param {LangfuseAPI.CreateEvaluationRuleRequest} request
|
|
10683
|
+
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
10684
|
+
*
|
|
10685
|
+
* @throws {@link LangfuseAPI.BadRequestError}
|
|
10686
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
10687
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
10688
|
+
* @throws {@link LangfuseAPI.EvaluationNotFoundError}
|
|
10689
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
10690
|
+
* @throws {@link LangfuseAPI.ConflictError}
|
|
10691
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
10692
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
8685
10693
|
* @throws {@link LangfuseAPI.Error}
|
|
8686
10694
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8687
10695
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8689,25 +10697,36 @@ declare class DatasetRunItems {
|
|
|
8689
10697
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8690
10698
|
*
|
|
8691
10699
|
* @example
|
|
8692
|
-
* await client.
|
|
8693
|
-
*
|
|
8694
|
-
*
|
|
8695
|
-
*
|
|
8696
|
-
*
|
|
8697
|
-
*
|
|
8698
|
-
*
|
|
8699
|
-
*
|
|
8700
|
-
*
|
|
10700
|
+
* await client.evaluationRules.create({
|
|
10701
|
+
* name: "name",
|
|
10702
|
+
* enabled: true,
|
|
10703
|
+
* sampling: undefined,
|
|
10704
|
+
* filter: undefined,
|
|
10705
|
+
* evaluatorAssignments: [{
|
|
10706
|
+
* evaluatorId: "evaluatorId",
|
|
10707
|
+
* variableMapping: undefined
|
|
10708
|
+
* }, {
|
|
10709
|
+
* evaluatorId: "evaluatorId",
|
|
10710
|
+
* variableMapping: undefined
|
|
10711
|
+
* }]
|
|
8701
10712
|
* })
|
|
8702
10713
|
*/
|
|
8703
|
-
create(request:
|
|
10714
|
+
create(request: CreateEvaluationRuleRequest$1, requestOptions?: EvaluationRules$1.RequestOptions): HttpResponsePromise<EvaluationRule$1>;
|
|
8704
10715
|
private __create;
|
|
8705
10716
|
/**
|
|
8706
|
-
* List
|
|
10717
|
+
* List evaluation rules in newest-first creation order.
|
|
8707
10718
|
*
|
|
8708
|
-
*
|
|
8709
|
-
*
|
|
10719
|
+
* This includes legacy trace and dataset rules so they can be inspected and migrated. Treat the cursor as opaque and return it unchanged.
|
|
10720
|
+
*
|
|
10721
|
+
* @param {LangfuseAPI.ListEvaluationRulesRequest} request
|
|
10722
|
+
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
8710
10723
|
*
|
|
10724
|
+
* @throws {@link LangfuseAPI.BadRequestError}
|
|
10725
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
10726
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
10727
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
10728
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
10729
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
8711
10730
|
* @throws {@link LangfuseAPI.Error}
|
|
8712
10731
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8713
10732
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8715,13 +10734,96 @@ declare class DatasetRunItems {
|
|
|
8715
10734
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8716
10735
|
*
|
|
8717
10736
|
* @example
|
|
8718
|
-
* await client.
|
|
8719
|
-
* datasetId: "datasetId",
|
|
8720
|
-
* runName: "runName"
|
|
8721
|
-
* })
|
|
10737
|
+
* await client.evaluationRules.list()
|
|
8722
10738
|
*/
|
|
8723
|
-
list(request
|
|
10739
|
+
list(request?: ListEvaluationRulesRequest$1, requestOptions?: EvaluationRules$1.RequestOptions): HttpResponsePromise<EvaluationRulesPage>;
|
|
8724
10740
|
private __list;
|
|
10741
|
+
/**
|
|
10742
|
+
* Get one evaluation rule, including a legacy trace or dataset rule, by its stable identifier.
|
|
10743
|
+
*
|
|
10744
|
+
* @param {string} evaluationRuleId - Stable evaluation-rule identifier returned by the evaluation-rule endpoints.
|
|
10745
|
+
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
10746
|
+
*
|
|
10747
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
10748
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
10749
|
+
* @throws {@link LangfuseAPI.EvaluationNotFoundError}
|
|
10750
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
10751
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
10752
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
10753
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10754
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10755
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10756
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10757
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10758
|
+
*
|
|
10759
|
+
* @example
|
|
10760
|
+
* await client.evaluationRules.get("evaluationRuleId")
|
|
10761
|
+
*/
|
|
10762
|
+
get(evaluationRuleId: string, requestOptions?: EvaluationRules$1.RequestOptions): HttpResponsePromise<EvaluationRule$1>;
|
|
10763
|
+
private __get;
|
|
10764
|
+
/**
|
|
10765
|
+
* Update an evaluation rule by its stable identifier.
|
|
10766
|
+
*
|
|
10767
|
+
* Provide only the fields to change. Providing `evaluatorAssignments` replaces the complete assignment list. Replacing the list with an empty array disables the rule. Setting `enabled=true` is rejected when the resulting assignment list is empty, including when both fields are sent in the same request.
|
|
10768
|
+
*
|
|
10769
|
+
* Legacy trace and dataset rules follow the existing lifecycle restrictions: they can be deactivated with `enabled=false`, but their name, filters, sampling, and evaluator assignments cannot be changed.
|
|
10770
|
+
*
|
|
10771
|
+
* @param {string} evaluationRuleId - Stable evaluation-rule identifier returned by the evaluation-rule endpoints.
|
|
10772
|
+
* @param {LangfuseAPI.UpdateEvaluationRuleRequest} request
|
|
10773
|
+
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
10774
|
+
*
|
|
10775
|
+
* @throws {@link LangfuseAPI.BadRequestError}
|
|
10776
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
10777
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
10778
|
+
* @throws {@link LangfuseAPI.EvaluationNotFoundError}
|
|
10779
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
10780
|
+
* @throws {@link LangfuseAPI.ConflictError}
|
|
10781
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
10782
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
10783
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10784
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10785
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10786
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10787
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10788
|
+
*
|
|
10789
|
+
* @example
|
|
10790
|
+
* await client.evaluationRules.update("evaluationRuleId", {
|
|
10791
|
+
* name: undefined,
|
|
10792
|
+
* enabled: undefined,
|
|
10793
|
+
* sampling: undefined,
|
|
10794
|
+
* filter: undefined,
|
|
10795
|
+
* evaluatorAssignments: undefined
|
|
10796
|
+
* })
|
|
10797
|
+
*/
|
|
10798
|
+
update(evaluationRuleId: string, request: UpdateEvaluationRuleRequest$1, requestOptions?: EvaluationRules$1.RequestOptions): HttpResponsePromise<EvaluationRule$1>;
|
|
10799
|
+
private __update;
|
|
10800
|
+
/**
|
|
10801
|
+
* Delete an evaluation rule.
|
|
10802
|
+
*
|
|
10803
|
+
* This removes the live-ingestion rule only. It does not delete associated evaluators or scores already produced by them.
|
|
10804
|
+
*
|
|
10805
|
+
* Legacy trace and dataset rules can also be deleted. Their evaluators and previously produced scores are preserved.
|
|
10806
|
+
*
|
|
10807
|
+
* @param {string} evaluationRuleId - Stable evaluation-rule identifier returned by the evaluation-rule endpoints.
|
|
10808
|
+
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
10809
|
+
*
|
|
10810
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
10811
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
10812
|
+
* @throws {@link LangfuseAPI.EvaluationNotFoundError}
|
|
10813
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
10814
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
10815
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
10816
|
+
* @throws {@link LangfuseAPI.Error}
|
|
10817
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
10818
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
10819
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
10820
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
10821
|
+
*
|
|
10822
|
+
* @example
|
|
10823
|
+
* await client.evaluationRules.delete("evaluationRuleId")
|
|
10824
|
+
*/
|
|
10825
|
+
delete(evaluationRuleId: string, requestOptions?: EvaluationRules$1.RequestOptions): HttpResponsePromise<DeletedEvaluationRule>;
|
|
10826
|
+
private __delete;
|
|
8725
10827
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
8726
10828
|
}
|
|
8727
10829
|
|
|
@@ -8729,7 +10831,7 @@ declare class DatasetRunItems {
|
|
|
8729
10831
|
* This file was auto-generated by Fern from our API Definition.
|
|
8730
10832
|
*/
|
|
8731
10833
|
|
|
8732
|
-
declare namespace
|
|
10834
|
+
declare namespace Evaluators$1 {
|
|
8733
10835
|
interface Options {
|
|
8734
10836
|
environment: Supplier<string>;
|
|
8735
10837
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -8764,15 +10866,26 @@ declare namespace Datasets {
|
|
|
8764
10866
|
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
8765
10867
|
}
|
|
8766
10868
|
}
|
|
8767
|
-
declare class
|
|
8768
|
-
protected readonly _options:
|
|
8769
|
-
constructor(_options:
|
|
10869
|
+
declare class Evaluators$1 {
|
|
10870
|
+
protected readonly _options: Evaluators$1.Options;
|
|
10871
|
+
constructor(_options: Evaluators$1.Options);
|
|
8770
10872
|
/**
|
|
8771
|
-
*
|
|
10873
|
+
* Create an evaluator in the authenticated project.
|
|
8772
10874
|
*
|
|
8773
|
-
*
|
|
8774
|
-
*
|
|
10875
|
+
* An evaluator defines **how** Langfuse should score data. LLM-as-a-judge evaluators define a prompt, expected structured output, and optional model configuration. Code evaluators define source code and a runtime language.
|
|
10876
|
+
*
|
|
10877
|
+
* This always creates a new evaluator with version `1`. Names are not identifiers and do not need to be unique.
|
|
10878
|
+
*
|
|
10879
|
+
* @param {LangfuseAPI.CreateEvaluatorRequest} request
|
|
10880
|
+
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
8775
10881
|
*
|
|
10882
|
+
* @throws {@link LangfuseAPI.BadRequestError}
|
|
10883
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
10884
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
10885
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
10886
|
+
* @throws {@link LangfuseAPI.PreconditionFailedError}
|
|
10887
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
10888
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
8776
10889
|
* @throws {@link LangfuseAPI.Error}
|
|
8777
10890
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8778
10891
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8780,16 +10893,40 @@ declare class Datasets {
|
|
|
8780
10893
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8781
10894
|
*
|
|
8782
10895
|
* @example
|
|
8783
|
-
* await client.
|
|
10896
|
+
* await client.evaluators.create({
|
|
10897
|
+
* type: "llm_as_judge",
|
|
10898
|
+
* name: "name",
|
|
10899
|
+
* description: undefined,
|
|
10900
|
+
* type: "llm_as_judge",
|
|
10901
|
+
* prompt: "prompt",
|
|
10902
|
+
* modelConfig: undefined,
|
|
10903
|
+
* variableMapping: undefined,
|
|
10904
|
+
* outputDefinition: {
|
|
10905
|
+
* dataType: "NUMERIC",
|
|
10906
|
+
* dataType: "NUMERIC",
|
|
10907
|
+
* minValue: undefined,
|
|
10908
|
+
* maxValue: undefined,
|
|
10909
|
+
* scoreReasoningInstructions: undefined,
|
|
10910
|
+
* scoreValueInstructions: undefined
|
|
10911
|
+
* }
|
|
10912
|
+
* })
|
|
8784
10913
|
*/
|
|
8785
|
-
|
|
8786
|
-
private
|
|
10914
|
+
create(request: CreateEvaluatorRequest$1, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<Evaluator$1>;
|
|
10915
|
+
private __create;
|
|
8787
10916
|
/**
|
|
8788
|
-
*
|
|
10917
|
+
* List evaluators in newest-first creation order.
|
|
8789
10918
|
*
|
|
8790
|
-
*
|
|
8791
|
-
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
10919
|
+
* Every evaluator includes its latest definition and version metadata flattened into the evaluator object, plus associated evaluation rules. Treat the cursor as opaque and return it unchanged.
|
|
8792
10920
|
*
|
|
10921
|
+
* @param {LangfuseAPI.ListEvaluatorsRequest} request
|
|
10922
|
+
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
10923
|
+
*
|
|
10924
|
+
* @throws {@link LangfuseAPI.BadRequestError}
|
|
10925
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
10926
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
10927
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
10928
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
10929
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
8793
10930
|
* @throws {@link LangfuseAPI.Error}
|
|
8794
10931
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8795
10932
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8797,16 +10934,24 @@ declare class Datasets {
|
|
|
8797
10934
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8798
10935
|
*
|
|
8799
10936
|
* @example
|
|
8800
|
-
* await client.
|
|
10937
|
+
* await client.evaluators.list()
|
|
8801
10938
|
*/
|
|
8802
|
-
|
|
8803
|
-
private
|
|
10939
|
+
list(request?: ListEvaluatorsRequest$1, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<EvaluatorsPage>;
|
|
10940
|
+
private __list;
|
|
8804
10941
|
/**
|
|
8805
|
-
*
|
|
10942
|
+
* Get one evaluator by its stable identifier.
|
|
8806
10943
|
*
|
|
8807
|
-
*
|
|
8808
|
-
*
|
|
10944
|
+
* The response includes the evaluator's latest definition and version metadata flattened into the evaluator object, plus associated evaluation rules. Use the version-history endpoint when older definitions are needed.
|
|
10945
|
+
*
|
|
10946
|
+
* @param {string} evaluatorId - Stable evaluator identifier returned by the evaluator endpoints.
|
|
10947
|
+
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
8809
10948
|
*
|
|
10949
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
10950
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
10951
|
+
* @throws {@link LangfuseAPI.EvaluationNotFoundError}
|
|
10952
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
10953
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
10954
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
8810
10955
|
* @throws {@link LangfuseAPI.Error}
|
|
8811
10956
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8812
10957
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8814,23 +10959,32 @@ declare class Datasets {
|
|
|
8814
10959
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8815
10960
|
*
|
|
8816
10961
|
* @example
|
|
8817
|
-
* await client.
|
|
8818
|
-
* name: "name",
|
|
8819
|
-
* description: undefined,
|
|
8820
|
-
* metadata: undefined,
|
|
8821
|
-
* inputSchema: undefined,
|
|
8822
|
-
* expectedOutputSchema: undefined
|
|
8823
|
-
* })
|
|
10962
|
+
* await client.evaluators.get("evaluatorId")
|
|
8824
10963
|
*/
|
|
8825
|
-
|
|
8826
|
-
private
|
|
10964
|
+
get(evaluatorId: string, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<Evaluator$1>;
|
|
10965
|
+
private __get;
|
|
8827
10966
|
/**
|
|
8828
|
-
*
|
|
10967
|
+
* Update an evaluator by its stable identifier.
|
|
8829
10968
|
*
|
|
8830
|
-
*
|
|
8831
|
-
*
|
|
8832
|
-
*
|
|
10969
|
+
* Provide only the top-level fields to change. Metadata-only changes do not create a version. Evaluator type cannot change.
|
|
10970
|
+
*
|
|
10971
|
+
* Definition fields are flattened into the request. To replace a definition, include `type` and every definition field for that type. Definition fields are replaced as a complete unit rather than merged. For LLM-as-a-judge evaluators, omitting or setting `modelConfig` to `null` selects the project's default evaluation model.
|
|
10972
|
+
*
|
|
10973
|
+
* Replacing a definition automatically returns an evaluator paused by an invalid or missing model configuration to `active`, while preserving its id and evaluation-rule assignments. Pauses caused by provider authentication, billing, connectivity, account state, or an unknown legacy reason remain paused until the explicit reactivation check succeeds.
|
|
10974
|
+
*
|
|
10975
|
+
* @param {string} evaluatorId - Stable evaluator identifier returned by the evaluator endpoints.
|
|
10976
|
+
* @param {LangfuseAPI.UpdateEvaluatorRequest} request
|
|
10977
|
+
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
8833
10978
|
*
|
|
10979
|
+
* @throws {@link LangfuseAPI.BadRequestError}
|
|
10980
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
10981
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
10982
|
+
* @throws {@link LangfuseAPI.EvaluationNotFoundError}
|
|
10983
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
10984
|
+
* @throws {@link LangfuseAPI.ConflictError}
|
|
10985
|
+
* @throws {@link LangfuseAPI.PreconditionFailedError}
|
|
10986
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
10987
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
8834
10988
|
* @throws {@link LangfuseAPI.Error}
|
|
8835
10989
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8836
10990
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8838,17 +10992,27 @@ declare class Datasets {
|
|
|
8838
10992
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8839
10993
|
*
|
|
8840
10994
|
* @example
|
|
8841
|
-
* await client.
|
|
10995
|
+
* await client.evaluators.update("evaluatorId", {
|
|
10996
|
+
* name: undefined,
|
|
10997
|
+
* description: undefined
|
|
10998
|
+
* })
|
|
8842
10999
|
*/
|
|
8843
|
-
|
|
8844
|
-
private
|
|
11000
|
+
update(evaluatorId: string, request: UpdateEvaluatorRequest, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<Evaluator$1>;
|
|
11001
|
+
private __update;
|
|
8845
11002
|
/**
|
|
8846
|
-
* Delete
|
|
11003
|
+
* Delete an evaluator and all of its stored versions.
|
|
8847
11004
|
*
|
|
8848
|
-
*
|
|
8849
|
-
* @param {string} runName
|
|
8850
|
-
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
11005
|
+
* Associated evaluation-rule assignments are also removed. Scores already produced by the evaluator are preserved.
|
|
8851
11006
|
*
|
|
11007
|
+
* @param {string} evaluatorId - Stable evaluator identifier returned by the evaluator endpoints.
|
|
11008
|
+
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
11009
|
+
*
|
|
11010
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
11011
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
11012
|
+
* @throws {@link LangfuseAPI.EvaluationNotFoundError}
|
|
11013
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
11014
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
11015
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
8852
11016
|
* @throws {@link LangfuseAPI.Error}
|
|
8853
11017
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8854
11018
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8856,17 +11020,26 @@ declare class Datasets {
|
|
|
8856
11020
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8857
11021
|
*
|
|
8858
11022
|
* @example
|
|
8859
|
-
* await client.
|
|
11023
|
+
* await client.evaluators.delete("evaluatorId")
|
|
8860
11024
|
*/
|
|
8861
|
-
|
|
8862
|
-
private
|
|
11025
|
+
delete(evaluatorId: string, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<DeletedEvaluator>;
|
|
11026
|
+
private __delete;
|
|
8863
11027
|
/**
|
|
8864
|
-
*
|
|
11028
|
+
* List an evaluator's version history in newest-first order.
|
|
8865
11029
|
*
|
|
8866
|
-
*
|
|
8867
|
-
*
|
|
8868
|
-
* @param {
|
|
11030
|
+
* This endpoint is intended for history and audit use cases. Ordinary clients can use the flattened `version` and definition fields on the evaluator response.
|
|
11031
|
+
*
|
|
11032
|
+
* @param {string} evaluatorId - Stable evaluator identifier returned by the evaluator endpoints.
|
|
11033
|
+
* @param {LangfuseAPI.ListEvaluatorVersionsRequest} request
|
|
11034
|
+
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
8869
11035
|
*
|
|
11036
|
+
* @throws {@link LangfuseAPI.BadRequestError}
|
|
11037
|
+
* @throws {@link LangfuseAPI.EvaluationUnauthorizedError}
|
|
11038
|
+
* @throws {@link LangfuseAPI.EvaluationAccessDeniedError}
|
|
11039
|
+
* @throws {@link LangfuseAPI.EvaluationNotFoundError}
|
|
11040
|
+
* @throws {@link LangfuseAPI.EvaluationMethodNotAllowedError}
|
|
11041
|
+
* @throws {@link LangfuseAPI.TooManyRequestsError}
|
|
11042
|
+
* @throws {@link LangfuseAPI.InternalServerError}
|
|
8870
11043
|
* @throws {@link LangfuseAPI.Error}
|
|
8871
11044
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8872
11045
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8874,10 +11047,10 @@ declare class Datasets {
|
|
|
8874
11047
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8875
11048
|
*
|
|
8876
11049
|
* @example
|
|
8877
|
-
* await client.
|
|
11050
|
+
* await client.evaluators.listVersions("evaluatorId")
|
|
8878
11051
|
*/
|
|
8879
|
-
|
|
8880
|
-
private
|
|
11052
|
+
listVersions(evaluatorId: string, request?: ListEvaluatorVersionsRequest, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<EvaluatorVersionsPage>;
|
|
11053
|
+
private __listVersions;
|
|
8881
11054
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
8882
11055
|
}
|
|
8883
11056
|
|
|
@@ -9013,6 +11186,8 @@ declare class Feedback {
|
|
|
9013
11186
|
/**
|
|
9014
11187
|
* Submit explicit user-approved feedback about Langfuse skills, MCP tools, CLI, docs, or public API. Do not include secrets, credentials, customer data, trace payloads, or unrelated use-case details.
|
|
9015
11188
|
*
|
|
11189
|
+
* Not available in the HIPAA cloud region.
|
|
11190
|
+
*
|
|
9016
11191
|
* @param {LangfuseAPI.SubmitFeedbackRequest} request
|
|
9017
11192
|
* @param {Feedback.RequestOptions} requestOptions - Request-specific configuration.
|
|
9018
11193
|
*
|
|
@@ -9158,6 +11333,8 @@ declare class Ingestion {
|
|
|
9158
11333
|
* - Batch sizes are limited to 3.5 MB in total. You need to adjust the number of events per batch accordingly.
|
|
9159
11334
|
* - The API does not return a 4xx status code for input errors. Instead, it responds with a 207 status code, which includes a list of the encountered errors.
|
|
9160
11335
|
*
|
|
11336
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Send data via the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` instead, see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
11337
|
+
*
|
|
9161
11338
|
* @param {LangfuseAPI.IngestionRequest} request
|
|
9162
11339
|
* @param {Ingestion.RequestOptions} requestOptions - Request-specific configuration.
|
|
9163
11340
|
*
|
|
@@ -9276,6 +11453,8 @@ declare class MetricsV1 {
|
|
|
9276
11453
|
*
|
|
9277
11454
|
* For more details, see the [Metrics API documentation](https://langfuse.com/docs/metrics/features/metrics-api).
|
|
9278
11455
|
*
|
|
11456
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/metrics?query=<urlencoded json query>` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
11457
|
+
*
|
|
9279
11458
|
* @param {LangfuseAPI.legacy.GetMetricsRequest} request
|
|
9280
11459
|
* @param {MetricsV1.RequestOptions} requestOptions - Request-specific configuration.
|
|
9281
11460
|
*
|
|
@@ -9340,6 +11519,8 @@ declare class ObservationsV1 {
|
|
|
9340
11519
|
/**
|
|
9341
11520
|
* Get a observation
|
|
9342
11521
|
*
|
|
11522
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
11523
|
+
*
|
|
9343
11524
|
* @param {string} observationId - The unique langfuse identifier of an observation, can be an event, span or generation
|
|
9344
11525
|
* @param {ObservationsV1.RequestOptions} requestOptions - Request-specific configuration.
|
|
9345
11526
|
*
|
|
@@ -9359,6 +11540,8 @@ declare class ObservationsV1 {
|
|
|
9359
11540
|
*
|
|
9360
11541
|
* Consider using the [v2 observations endpoint](/api-reference#tag/observationsv2/GET/api/public/v2/observations) for cursor-based pagination and field selection.
|
|
9361
11542
|
*
|
|
11543
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
11544
|
+
*
|
|
9362
11545
|
* @param {LangfuseAPI.legacy.GetObservationsRequest} request
|
|
9363
11546
|
* @param {ObservationsV1.RequestOptions} requestOptions - Request-specific configuration.
|
|
9364
11547
|
*
|
|
@@ -9741,6 +11924,7 @@ declare class Metrics {
|
|
|
9741
11924
|
* ## V2 Differences
|
|
9742
11925
|
* - Supports `observations`, `scores-numeric`, `scores-boolean`, and `scores-categorical` views only (traces view not supported)
|
|
9743
11926
|
* - Direct access to tags and release fields on observations
|
|
11927
|
+
* - Semantic-root filtering and grouping through the v2-only `isRootObservation` dimension
|
|
9744
11928
|
* - Backwards-compatible: traceName, traceRelease, traceVersion dimensions are still available on observations view
|
|
9745
11929
|
* - High cardinality dimensions are not supported and will return a 400 error (see below)
|
|
9746
11930
|
*
|
|
@@ -9765,6 +11949,7 @@ declare class Metrics {
|
|
|
9765
11949
|
* - `providedModelName` - Name of the model used
|
|
9766
11950
|
* - `promptName` - Name of the prompt used
|
|
9767
11951
|
* - `promptVersion` - Version of the prompt used
|
|
11952
|
+
* - `isRootObservation` - Boolean semantic-root status. `true` includes physical roots and app roots whose SDK parent is external (so `parentObservationId` may be non-null).
|
|
9768
11953
|
* - `startTimeMonth` - Month of start_time in YYYY-MM format
|
|
9769
11954
|
*
|
|
9770
11955
|
* **Measures:**
|
|
@@ -9926,7 +12111,7 @@ declare class Models {
|
|
|
9926
12111
|
* modelName: "modelName",
|
|
9927
12112
|
* matchPattern: "matchPattern",
|
|
9928
12113
|
* startDate: undefined,
|
|
9929
|
-
* unit:
|
|
12114
|
+
* unit: "CHARACTERS",
|
|
9930
12115
|
* inputPrice: undefined,
|
|
9931
12116
|
* outputPrice: undefined,
|
|
9932
12117
|
* totalPrice: undefined,
|
|
@@ -9937,6 +12122,35 @@ declare class Models {
|
|
|
9937
12122
|
*/
|
|
9938
12123
|
create(request: CreateModelRequest, requestOptions?: Models.RequestOptions): HttpResponsePromise<Model>;
|
|
9939
12124
|
private __create;
|
|
12125
|
+
/**
|
|
12126
|
+
* Create or replace a project-owned model using its id. Built-in models cannot be modified.
|
|
12127
|
+
*
|
|
12128
|
+
* @param {string} id
|
|
12129
|
+
* @param {LangfuseAPI.CreateModelRequest} request
|
|
12130
|
+
* @param {Models.RequestOptions} requestOptions - Request-specific configuration.
|
|
12131
|
+
*
|
|
12132
|
+
* @throws {@link LangfuseAPI.Error}
|
|
12133
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
12134
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
12135
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
12136
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
12137
|
+
*
|
|
12138
|
+
* @example
|
|
12139
|
+
* await client.models.upsert("id", {
|
|
12140
|
+
* modelName: "modelName",
|
|
12141
|
+
* matchPattern: "matchPattern",
|
|
12142
|
+
* startDate: undefined,
|
|
12143
|
+
* unit: "CHARACTERS",
|
|
12144
|
+
* inputPrice: undefined,
|
|
12145
|
+
* outputPrice: undefined,
|
|
12146
|
+
* totalPrice: undefined,
|
|
12147
|
+
* pricingTiers: undefined,
|
|
12148
|
+
* tokenizerId: undefined,
|
|
12149
|
+
* tokenizerConfig: undefined
|
|
12150
|
+
* })
|
|
12151
|
+
*/
|
|
12152
|
+
upsert(id: string, request: CreateModelRequest, requestOptions?: Models.RequestOptions): HttpResponsePromise<Model>;
|
|
12153
|
+
private __upsert;
|
|
9940
12154
|
/**
|
|
9941
12155
|
* Get all models
|
|
9942
12156
|
*
|
|
@@ -11209,11 +13423,10 @@ declare class Scores {
|
|
|
11209
13423
|
create(request: CreateScoreRequest, requestOptions?: Scores.RequestOptions): HttpResponsePromise<CreateScoreResponse>;
|
|
11210
13424
|
private __create;
|
|
11211
13425
|
/**
|
|
11212
|
-
* **Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint
|
|
11213
|
-
* is no longer available on Langfuse v4 and later.
|
|
11214
|
-
*
|
|
11215
13426
|
* Get a list of scores (supports both trace and session scores)
|
|
11216
13427
|
*
|
|
13428
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
13429
|
+
*
|
|
11217
13430
|
* @param {LangfuseAPI.GetScoresRequest} request
|
|
11218
13431
|
* @param {Scores.RequestOptions} requestOptions - Request-specific configuration.
|
|
11219
13432
|
*
|
|
@@ -11229,11 +13442,10 @@ declare class Scores {
|
|
|
11229
13442
|
getMany(request?: GetScoresRequest, requestOptions?: Scores.RequestOptions): HttpResponsePromise<GetScoresResponse>;
|
|
11230
13443
|
private __getMany;
|
|
11231
13444
|
/**
|
|
11232
|
-
* **Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter
|
|
11233
|
-
* instead. This endpoint is no longer available on Langfuse v4 and later.
|
|
11234
|
-
*
|
|
11235
13445
|
* Get a score (supports both trace and session scores)
|
|
11236
13446
|
*
|
|
13447
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` with the `id` filter instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
13448
|
+
*
|
|
11237
13449
|
* @param {string} scoreId - The unique langfuse identifier of a score
|
|
11238
13450
|
* @param {Scores.RequestOptions} requestOptions - Request-specific configuration.
|
|
11239
13451
|
*
|
|
@@ -11301,6 +13513,8 @@ declare class Sessions {
|
|
|
11301
13513
|
* `sessionId` instead:
|
|
11302
13514
|
* `GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`.
|
|
11303
13515
|
*
|
|
13516
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=<urlencoded sessionId filter>&fromStartTime=<from>&toStartTime=<to>`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
13517
|
+
*
|
|
11304
13518
|
* @param {LangfuseAPI.GetSessionsRequest} request
|
|
11305
13519
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
11306
13520
|
*
|
|
@@ -11323,6 +13537,8 @@ declare class Sessions {
|
|
|
11323
13537
|
* with a URL-encoded `sessionId` filter and a bounded time range:
|
|
11324
13538
|
* `GET /api/public/v2/observations?filter=<sessionId filter>&fromStartTime=<from>&toStartTime=<to>`.
|
|
11325
13539
|
*
|
|
13540
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=<urlencoded sessionId filter>&fromStartTime=<from>&toStartTime=<to>`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
13541
|
+
*
|
|
11326
13542
|
* @param {string} sessionId - The unique id of a session
|
|
11327
13543
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
11328
13544
|
*
|
|
@@ -11385,6 +13601,8 @@ declare class Trace {
|
|
|
11385
13601
|
/**
|
|
11386
13602
|
* Get a specific trace
|
|
11387
13603
|
*
|
|
13604
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
13605
|
+
*
|
|
11388
13606
|
* @param {string} traceId - The unique langfuse identifier of a trace
|
|
11389
13607
|
* @param {LangfuseAPI.GetTraceRequest} request
|
|
11390
13608
|
* @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -11420,6 +13638,8 @@ declare class Trace {
|
|
|
11420
13638
|
/**
|
|
11421
13639
|
* Get list of traces
|
|
11422
13640
|
*
|
|
13641
|
+
* @deprecated On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
13642
|
+
*
|
|
11423
13643
|
* @param {LangfuseAPI.GetTracesRequest} request
|
|
11424
13644
|
* @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
|
|
11425
13645
|
*
|
|
@@ -12008,19 +14228,21 @@ declare class EvaluationRules {
|
|
|
12008
14228
|
* Key rules:
|
|
12009
14229
|
* - `name` must be unique within the project for public evaluation rules
|
|
12010
14230
|
* - `target` must be `observation` or `experiment`
|
|
12011
|
-
* -
|
|
14231
|
+
* - provide either the compatibility `evaluator` field or the new `evaluators` array, never both
|
|
14232
|
+
* - each evaluator `name` + `type` must identify an existing evaluator family returned by the evaluator endpoints
|
|
12012
14233
|
* - Langfuse resolves that family to its latest version before saving the evaluation rule
|
|
12013
14234
|
* - for `target=experiment`, use dataset `id` values from `GET /api/public/v2/datasets` when filtering by `datasetId`
|
|
12014
|
-
* -
|
|
14235
|
+
* - an omitted LLM-as-judge assignment mapping inherits the evaluator version's default mapping
|
|
14236
|
+
* - the effective mapping must map every evaluator prompt variable exactly once
|
|
12015
14237
|
* - for `code` evaluators, Langfuse uses the fixed code runtime mapping; omit `mapping` in create and update requests
|
|
12016
14238
|
* - for user-provided `llm_as_judge` mappings, `expected_output` and `experiment_item_metadata` are only valid for `target=experiment`
|
|
12017
14239
|
* - if `enabled=true`, Langfuse validates that the referenced evaluator can currently run
|
|
12018
|
-
* - at most
|
|
14240
|
+
* - at most 500 evaluation rules can be effectively active in one project at the same time (enforced identically by the API, the MCP tools, and the app)
|
|
12019
14241
|
*
|
|
12020
14242
|
* If an evaluation rule with the same `name` already exists in the project, the API returns `409`.
|
|
12021
14243
|
* In that case, update the existing resource with `PATCH /api/public/unstable/evaluation-rules/{evaluationRuleId}` instead of creating a second one.
|
|
12022
14244
|
*
|
|
12023
|
-
* If enabling this resource would exceed the
|
|
14245
|
+
* If enabling this resource would exceed the 500-active limit, the API also returns `409`.
|
|
12024
14246
|
* In that case, disable or pause another active evaluation rule before enabling a new one.
|
|
12025
14247
|
*
|
|
12026
14248
|
* Current scope:
|
|
@@ -12036,6 +14258,8 @@ declare class EvaluationRules {
|
|
|
12036
14258
|
* - `400 invalid_json_path`: remove or correct the `jsonPath`
|
|
12037
14259
|
* - `422 evaluator_preflight_failed`: the selected evaluator cannot run with the resolved model configuration. Fix the evaluator/default model setup, then retry the create request.
|
|
12038
14260
|
*
|
|
14261
|
+
* @deprecated On Langfuse Cloud, this unstable endpoint is deprecated and will be removed on November 16, 2026. Use the stable `/api/public/v2/evaluation-rules` API instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
14262
|
+
*
|
|
12039
14263
|
* @param {LangfuseAPI.unstable.CreateEvaluationRuleRequest} request
|
|
12040
14264
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
12041
14265
|
*
|
|
@@ -12059,7 +14283,6 @@ declare class EvaluationRules {
|
|
|
12059
14283
|
* name: "answer-correctness-live",
|
|
12060
14284
|
* evaluator: {
|
|
12061
14285
|
* name: "answer-correctness",
|
|
12062
|
-
* scope: "project",
|
|
12063
14286
|
* type: "llm_as_judge"
|
|
12064
14287
|
* },
|
|
12065
14288
|
* target: "observation",
|
|
@@ -12085,7 +14308,6 @@ declare class EvaluationRules {
|
|
|
12085
14308
|
* name: "toxicity-code-live",
|
|
12086
14309
|
* evaluator: {
|
|
12087
14310
|
* name: "toxicity-detector",
|
|
12088
|
-
* scope: "project",
|
|
12089
14311
|
* type: "code"
|
|
12090
14312
|
* },
|
|
12091
14313
|
* target: "observation",
|
|
@@ -12104,7 +14326,6 @@ declare class EvaluationRules {
|
|
|
12104
14326
|
* name: "experiment-expected-output-match",
|
|
12105
14327
|
* evaluator: {
|
|
12106
14328
|
* name: "expected-output-match",
|
|
12107
|
-
* scope: "project",
|
|
12108
14329
|
* type: "llm_as_judge"
|
|
12109
14330
|
* },
|
|
12110
14331
|
* target: "experiment",
|
|
@@ -12132,6 +14353,8 @@ declare class EvaluationRules {
|
|
|
12132
14353
|
*
|
|
12133
14354
|
* This includes legacy `trace` and `dataset` rules so they can be inspected and migrated to v4 rules. Legacy rules are read-only through this API; create, update, and delete continue to support only `observation` and `experiment` rules.
|
|
12134
14355
|
*
|
|
14356
|
+
* @deprecated On Langfuse Cloud, this unstable endpoint is deprecated and will be removed on November 16, 2026. Use the stable `/api/public/v2/evaluation-rules` API instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
14357
|
+
*
|
|
12135
14358
|
* @param {LangfuseAPI.unstable.ListEvaluationRulesRequest} request
|
|
12136
14359
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
12137
14360
|
*
|
|
@@ -12150,13 +14373,15 @@ declare class EvaluationRules {
|
|
|
12150
14373
|
* @example
|
|
12151
14374
|
* await client.unstable.evaluationRules.list()
|
|
12152
14375
|
*/
|
|
12153
|
-
list(request?: ListEvaluationRulesRequest, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<EvaluationRules$
|
|
14376
|
+
list(request?: ListEvaluationRulesRequest, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<EvaluationRules$2>;
|
|
12154
14377
|
private __list;
|
|
12155
14378
|
/**
|
|
12156
14379
|
* Get one evaluation rule by its identifier.
|
|
12157
14380
|
*
|
|
12158
14381
|
* Use this endpoint to inspect the current evaluator, target, mapping, filters, execution timing, and effective runtime status. Legacy `trace` and `dataset` rules are returned for migration and are read-only through this API.
|
|
12159
14382
|
*
|
|
14383
|
+
* @deprecated On Langfuse Cloud, this unstable endpoint is deprecated and will be removed on November 16, 2026. Use the stable `/api/public/v2/evaluation-rules` API instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
14384
|
+
*
|
|
12160
14385
|
* @param {string} evaluationRuleId - Evaluation rule identifier returned by the evaluation rule endpoints.
|
|
12161
14386
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
12162
14387
|
*
|
|
@@ -12195,12 +14420,14 @@ declare class EvaluationRules {
|
|
|
12195
14420
|
* - if you change `target` for an LLM-as-judge rule, also send a compatible `filter` and `mapping` in the same request unless the existing ones are still valid for the new target
|
|
12196
14421
|
* - for `code` evaluator rules, omit `mapping`; Langfuse stores the fixed code runtime mapping automatically
|
|
12197
14422
|
* - if the resulting config is enabled, Langfuse re-validates that the selected evaluator can run
|
|
12198
|
-
* - if the update would move a non-active evaluation rule into the active state and the project already has
|
|
14423
|
+
* - if the update would move a non-active evaluation rule into the active state and the project already has 500 active evaluation rules, the API returns `409`
|
|
12199
14424
|
*
|
|
12200
14425
|
* Recovery guidance:
|
|
12201
14426
|
* - if an LLM-as-judge update fails with `missing_variable_mapping` or `invalid_variable_mapping` after changing `evaluator` or `target`, resend the request with a complete new `mapping`
|
|
12202
14427
|
* - if the update fails with `invalid_filter_value` after changing `target`, resend the request with a target-compatible `filter`
|
|
12203
14428
|
*
|
|
14429
|
+
* @deprecated On Langfuse Cloud, this unstable endpoint is deprecated and will be removed on November 16, 2026. Use the stable `/api/public/v2/evaluation-rules` API instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
14430
|
+
*
|
|
12204
14431
|
* @param {string} evaluationRuleId - Evaluation rule identifier.
|
|
12205
14432
|
* @param {LangfuseAPI.unstable.UpdateEvaluationRuleRequest} request
|
|
12206
14433
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12222,6 +14449,7 @@ declare class EvaluationRules {
|
|
|
12222
14449
|
* @example
|
|
12223
14450
|
* await client.unstable.evaluationRules.update("evaluationRuleId", {
|
|
12224
14451
|
* name: undefined,
|
|
14452
|
+
* evaluators: undefined,
|
|
12225
14453
|
* evaluator: undefined,
|
|
12226
14454
|
* target: undefined,
|
|
12227
14455
|
* enabled: undefined,
|
|
@@ -12237,6 +14465,8 @@ declare class EvaluationRules {
|
|
|
12237
14465
|
*
|
|
12238
14466
|
* This removes the live-ingestion rule only. It does not delete the referenced evaluator.
|
|
12239
14467
|
*
|
|
14468
|
+
* @deprecated On Langfuse Cloud, this unstable endpoint is deprecated and will be removed on November 16, 2026. Use the stable `/api/public/v2/evaluation-rules` API instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
14469
|
+
*
|
|
12240
14470
|
* @param {string} evaluationRuleId - Evaluation rule identifier.
|
|
12241
14471
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
12242
14472
|
*
|
|
@@ -12313,13 +14543,14 @@ declare class Evaluators {
|
|
|
12313
14543
|
* Naming behavior:
|
|
12314
14544
|
* - If this is a new evaluator name in your project, Langfuse creates version `1`.
|
|
12315
14545
|
* - If the name already exists in your project, Langfuse creates the next version and returns it.
|
|
12316
|
-
* -
|
|
14546
|
+
* - The evaluator `id` remains stable across versions.
|
|
14547
|
+
* - Existing evaluation rules automatically use the latest evaluator version; no rule update is required.
|
|
12317
14548
|
*
|
|
12318
14549
|
* Recommended workflow:
|
|
12319
14550
|
* 1. Create the evaluator.
|
|
12320
14551
|
* 2. Read the returned `variables` array.
|
|
12321
14552
|
* 3. Read the returned `outputDefinition.dataType` so the client knows whether future scores will be numeric, boolean, or categorical.
|
|
12322
|
-
* 4. Create one or more evaluation rules that reference the returned evaluator family using `name` and `
|
|
14553
|
+
* 4. Create one or more evaluation rules that reference the returned evaluator family using `name` and `type`.
|
|
12323
14554
|
*
|
|
12324
14555
|
* Code evaluator validation:
|
|
12325
14556
|
* - At creation, Langfuse only validates the request shape
|
|
@@ -12334,6 +14565,8 @@ declare class Evaluators {
|
|
|
12334
14565
|
* Unstable API note:
|
|
12335
14566
|
* - This surface may evolve while the underlying evaluation data model is being redesigned.
|
|
12336
14567
|
*
|
|
14568
|
+
* @deprecated On Langfuse Cloud, this unstable endpoint is deprecated and will be removed on November 16, 2026. Use the stable `/api/public/v2/evaluators` API instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
14569
|
+
*
|
|
12337
14570
|
* @param {LangfuseAPI.unstable.CreateEvaluatorRequest} request
|
|
12338
14571
|
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
12339
14572
|
*
|
|
@@ -12369,7 +14602,14 @@ declare class Evaluators {
|
|
|
12369
14602
|
* modelConfig: {
|
|
12370
14603
|
* provider: "openai",
|
|
12371
14604
|
* model: "gpt-4.1-mini"
|
|
12372
|
-
* }
|
|
14605
|
+
* },
|
|
14606
|
+
* mapping: [{
|
|
14607
|
+
* variable: "input",
|
|
14608
|
+
* source: "input"
|
|
14609
|
+
* }, {
|
|
14610
|
+
* variable: "output",
|
|
14611
|
+
* source: "output"
|
|
14612
|
+
* }]
|
|
12373
14613
|
* })
|
|
12374
14614
|
*
|
|
12375
14615
|
* @example
|
|
@@ -12395,8 +14635,9 @@ declare class Evaluators {
|
|
|
12395
14635
|
*
|
|
12396
14636
|
* Important behavior:
|
|
12397
14637
|
* - This endpoint returns the latest version of each available evaluator.
|
|
12398
|
-
* -
|
|
12399
|
-
*
|
|
14638
|
+
* - Every evaluator is owned by the authenticated project.
|
|
14639
|
+
*
|
|
14640
|
+
* @deprecated On Langfuse Cloud, this unstable endpoint is deprecated and will be removed on November 16, 2026. Use the stable `/api/public/v2/evaluators` API instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
12400
14641
|
*
|
|
12401
14642
|
* @param {LangfuseAPI.unstable.ListEvaluatorsRequest} request
|
|
12402
14643
|
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12416,12 +14657,14 @@ declare class Evaluators {
|
|
|
12416
14657
|
* @example
|
|
12417
14658
|
* await client.unstable.evaluators.list()
|
|
12418
14659
|
*/
|
|
12419
|
-
list(request?: ListEvaluatorsRequest, requestOptions?: Evaluators.RequestOptions): HttpResponsePromise<Evaluators$
|
|
14660
|
+
list(request?: ListEvaluatorsRequest, requestOptions?: Evaluators.RequestOptions): HttpResponsePromise<Evaluators$2>;
|
|
12420
14661
|
private __list;
|
|
12421
14662
|
/**
|
|
12422
14663
|
* Get one evaluator by `id`.
|
|
12423
14664
|
*
|
|
12424
|
-
* Use
|
|
14665
|
+
* This endpoint always returns the evaluator's latest version. Use it when you want the current prompt, output definition, model configuration, and derived variables for the evaluator you plan to use in an evaluation rule.
|
|
14666
|
+
*
|
|
14667
|
+
* @deprecated On Langfuse Cloud, this unstable endpoint is deprecated and will be removed on November 16, 2026. Use the stable `/api/public/v2/evaluators` API instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
12425
14668
|
*
|
|
12426
14669
|
* @param {string} evaluatorId - Evaluator identifier returned by the evaluator endpoints.
|
|
12427
14670
|
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12448,11 +14691,12 @@ declare class Evaluators {
|
|
|
12448
14691
|
* Delete an evaluator.
|
|
12449
14692
|
*
|
|
12450
14693
|
* Important behavior:
|
|
12451
|
-
* - This deletes the evaluator including all of its stored versions
|
|
12452
|
-
* -
|
|
12453
|
-
* - Langfuse-managed evaluators (`scope=managed`) cannot be deleted; the API returns `403`.
|
|
14694
|
+
* - This deletes the evaluator including all of its stored versions.
|
|
14695
|
+
* - Evaluation rule assignments referencing the evaluator are also deleted.
|
|
12454
14696
|
* - Scores already produced by the evaluator are not deleted.
|
|
12455
14697
|
*
|
|
14698
|
+
* @deprecated On Langfuse Cloud, this unstable endpoint is deprecated and will be removed on November 16, 2026. Use the stable `/api/public/v2/evaluators` API instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.
|
|
14699
|
+
*
|
|
12456
14700
|
* @param {string} evaluatorId - Evaluator identifier returned by the evaluator endpoints.
|
|
12457
14701
|
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
12458
14702
|
*
|
|
@@ -12461,7 +14705,6 @@ declare class Evaluators {
|
|
|
12461
14705
|
* @throws {@link LangfuseAPI.unstable.AccessDeniedError}
|
|
12462
14706
|
* @throws {@link LangfuseAPI.unstable.NotFoundError}
|
|
12463
14707
|
* @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
|
|
12464
|
-
* @throws {@link LangfuseAPI.unstable.ConflictError}
|
|
12465
14708
|
* @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
|
|
12466
14709
|
* @throws {@link LangfuseAPI.unstable.InternalServerError}
|
|
12467
14710
|
* @throws {@link LangfuseAPI.Error}
|
|
@@ -12559,6 +14802,8 @@ declare class LangfuseAPIClient {
|
|
|
12559
14802
|
protected _datasetItems: DatasetItems | undefined;
|
|
12560
14803
|
protected _datasetRunItems: DatasetRunItems | undefined;
|
|
12561
14804
|
protected _datasets: Datasets | undefined;
|
|
14805
|
+
protected _evaluationRules: EvaluationRules$1 | undefined;
|
|
14806
|
+
protected _evaluators: Evaluators$1 | undefined;
|
|
12562
14807
|
protected _experiments: Experiments | undefined;
|
|
12563
14808
|
protected _feedback: Feedback | undefined;
|
|
12564
14809
|
protected _health: Health | undefined;
|
|
@@ -12588,6 +14833,8 @@ declare class LangfuseAPIClient {
|
|
|
12588
14833
|
get datasetItems(): DatasetItems;
|
|
12589
14834
|
get datasetRunItems(): DatasetRunItems;
|
|
12590
14835
|
get datasets(): Datasets;
|
|
14836
|
+
get evaluationRules(): EvaluationRules$1;
|
|
14837
|
+
get evaluators(): Evaluators$1;
|
|
12591
14838
|
get experiments(): Experiments;
|
|
12592
14839
|
get feedback(): Feedback;
|
|
12593
14840
|
get health(): Health;
|
|
@@ -13229,4 +15476,4 @@ interface PropagateAttributesParams {
|
|
|
13229
15476
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
13230
15477
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[] | number>;
|
|
13231
15478
|
|
|
13232
|
-
export { AccessDeniedError$1 as AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, type BaseScoreV3, BlobStorageExportFieldGroup, BlobStorageExportFrequency, BlobStorageExportMode, BlobStorageExportSource, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, BlobStorageIntegrationFileTypeResponse, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BooleanScoreV3, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type CategoricalScoreV3, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CorrectionScoreV3, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreRequest, type CreateScoreResponse, CreateScoreSource, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetItemMediaReference, DatasetItemMediaReferenceField, type DatasetItemMediaReferenceMedia, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteLlmConnectionResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type Deprecation, type EmptyResponse, Error$1 as Error, type Experiment, type ExperimentItem, type ExperimentItemsResponse, type ExperimentsResponse, type ExperimentsResponseMeta, FeedbackNotConfiguredError, FeedbackTargetType, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseDataText, type GetScoresResponseTraceData, type GetScoresV3Meta, type GetScoresV3Request, type GetScoresV3Response, type GetSessionsRequest, type GetTraceRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LANGFUSE_TRACE_ID_BAGGAGE_KEY, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseMediaReference, type LangfuseMediaReferenceParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListExperimentItemsRequest, type ListExperimentsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError$1 as MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError$1 as NotFoundError, type NumericScore, type NumericScoreV1, type NumericScoreV3, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type ObservationsViewSingle, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type PropagatedPromptInput, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, type ScoreSubjectExperimentV3, type ScoreSubjectObservationV3, type ScoreSubjectSessionV3, type ScoreSubjectTraceV3, ScoreSubjectV3, ScoreV1$1 as ScoreV1, ScoreV3, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type TextPrompt, type TextScore, type TextScoreV1, type TextScoreV3, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError$1 as UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UploadMediaParams, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$D as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$C as blobStorageIntegrations, bytesToBase64, index$B as comments, index$A as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$z as datasetItems, index$y as datasetRunItems, index$x as datasets, index$w as experiments, index$v as feedback, generateUUID, getEnv, getGlobalLogger, getLangfuseTraceIdFromBaggage, getPropagatedAttributesFromContext, index$u as health, index$t as ingestion, index$p as legacy, index$o as llmConnections, LoggerSingleton as logger, index$n as media, index$m as metrics, index$l as models, index$k as observations, index$j as opentelemetry, index$i as organizations, index$h as projects, index as promptVersion, index$g as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$f as scim, index$e as scoreConfigs, index$c as scores, index$d as scoresV3, serializeValue, index$b as sessions, setLangfuseTraceIdInBaggage, index$a as trace, index$3 as unstable, uploadMedia, index$1 as utils };
|
|
15479
|
+
export { AccessDeniedError$1 as AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type ArrayOptionsEvaluationRuleFilter$1 as ArrayOptionsEvaluationRuleFilter, type AuthenticationScheme, BadRequestError$1 as BadRequestError, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, type BaseScoreV3, BlobStorageExportFieldGroup, BlobStorageExportFrequency, BlobStorageExportMode, BlobStorageExportSource, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, BlobStorageIntegrationFileTypeResponse, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanEvaluationRuleFilter$1 as BooleanEvaluationRuleFilter, type BooleanScore, type BooleanScoreV1, type BooleanScoreV3, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type CategoricalScoreV3, type CategoryOptionsEvaluationRuleFilter$1 as CategoryOptionsEvaluationRuleFilter, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type CodeEvaluator$1 as CodeEvaluator, CodeEvaluatorSourceCodeLanguage$1 as CodeEvaluatorSourceCodeLanguage, type CodeEvaluatorVersion, type Comment, CommentObjectType, type ConfigCategory, ConflictError$1 as ConflictError, type CorrectionScore, type CorrectionScoreV3, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCodeEvaluatorRequest$1 as CreateCodeEvaluatorRequest, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEvaluationRuleRequest$1 as CreateEvaluationRuleRequest, CreateEvaluatorRequest$1 as CreateEvaluatorRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateLlmAsJudgeEvaluatorRequest$1 as CreateLlmAsJudgeEvaluatorRequest, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreRequest, type CreateScoreResponse, CreateScoreSource, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Creator, type CursorMeta, type Dataset, type DatasetItem, type DatasetItemMediaReference, DatasetItemMediaReferenceField, type DatasetItemMediaReferenceMedia, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DateTimeEvaluationRuleFilter$1 as DateTimeEvaluationRuleFilter, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteLlmConnectionResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type DeletedEvaluationRule, type DeletedEvaluator, type Deprecation, type EmptyResponse, Error$1 as Error, EvaluationAccessDeniedError, EvaluationMethodNotAllowedError, EvaluationNotFoundError, type EvaluationRule$1 as EvaluationRule, EvaluationRuleArrayOptionsFilterOperator$1 as EvaluationRuleArrayOptionsFilterOperator, type EvaluationRuleAssignment, EvaluationRuleBooleanFilterOperator$1 as EvaluationRuleBooleanFilterOperator, type EvaluationRuleEvaluatorAssignmentInput, EvaluationRuleFilter$1 as EvaluationRuleFilter, EvaluationRuleNullFilterOperator$1 as EvaluationRuleNullFilterOperator, EvaluationRuleNumberFilterOperator$1 as EvaluationRuleNumberFilterOperator, EvaluationRuleOptionsFilterOperator$1 as EvaluationRuleOptionsFilterOperator, type EvaluationRuleReadFilter, type EvaluationRuleReadFilterBase, type EvaluationRuleReadFilterWithKey, EvaluationRuleStringFilterOperator$1 as EvaluationRuleStringFilterOperator, type EvaluationRulesPage, EvaluationUnauthorizedError, Evaluator$1 as Evaluator, type EvaluatorAssignment, type EvaluatorBase$1 as EvaluatorBase, type EvaluatorChatMessage, type EvaluatorChatPrompt, type EvaluatorChatPromptInput, type EvaluatorModelConfig$1 as EvaluatorModelConfig, EvaluatorOutputDefinition$1 as EvaluatorOutputDefinition, type EvaluatorOutputDefinitionBase, EvaluatorOutputScoreType, EvaluatorStatus, EvaluatorType$1 as EvaluatorType, EvaluatorVersion, type EvaluatorVersionBase, type EvaluatorVersionsPage, type EvaluatorsPage, type Experiment, type ExperimentItem, type ExperimentItemsResponse, type ExperimentsResponse, type ExperimentsResponseMeta, FeedbackNotConfiguredError, FeedbackTargetType, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseDataText, type GetScoresResponseTraceData, type GetScoresV3Meta, type GetScoresV3Request, type GetScoresV3Response, type GetSessionsRequest, type GetTraceRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, InternalServerError$1 as InternalServerError, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LANGFUSE_TRACE_ID_BAGGAGE_KEY, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseMediaReference, type LangfuseMediaReferenceParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, LegacyEvaluationObject$1 as LegacyEvaluationObject, type LegacyPromptVariableMapping$1 as LegacyPromptVariableMapping, type ListDatasetRunItemsRequest, type ListEvaluationRulesRequest$1 as ListEvaluationRulesRequest, type ListEvaluatorVersionsRequest, type ListEvaluatorsRequest$1 as ListEvaluatorsRequest, type ListExperimentItemsRequest, type ListExperimentsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmAsJudgeEvaluator$1 as LlmAsJudgeEvaluator, type LlmAsJudgeEvaluatorVersion, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError$1 as MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelTokenizerId, ModelUsageUnit, NotFoundError$1 as NotFoundError, type NullEvaluationRuleFilter$1 as NullEvaluationRuleFilter, type NumberEvaluationRuleFilter$1 as NumberEvaluationRuleFilter, type NumberObjectEvaluationRuleFilter$1 as NumberObjectEvaluationRuleFilter, type NumericScore, type NumericScoreV1, type NumericScoreV3, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type ObservationsViewSingle, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, PreconditionFailedError, type PricingTier, type PricingTierAttributeCondition, PricingTierAttributeSource, type PricingTierCondition, type PricingTierConditionInput, type PricingTierInput, PricingTierOperator, type PricingTierUsageCondition, type PricingTierUsageConditionInput, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PromptVariableMapping, type PromptVariableMappingInput$1 as PromptVariableMappingInput, type PromptVariableMappingRead$1 as PromptVariableMappingRead, PromptVariableMappingSource$1 as PromptVariableMappingSource, type PropagateAttributesParams, type PropagatedPromptInput, type PublicApiError$1 as PublicApiError, PublicApiErrorCode$1 as PublicApiErrorCode, type PublicApiErrorDetails$1 as PublicApiErrorDetails, type PublicApiValidationIssue$1 as PublicApiValidationIssue, type PublicEvaluatorBooleanScore, type PublicEvaluatorCategoricalScore, type PublicEvaluatorNumericScore, PublicEvaluatorOutputDefinition$1 as PublicEvaluatorOutputDefinition, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, type ScoreSubjectExperimentV3, type ScoreSubjectObservationV3, type ScoreSubjectSessionV3, type ScoreSubjectTraceV3, ScoreSubjectV3, ScoreV1$1 as ScoreV1, ScoreV3, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type StringEvaluationRuleFilter$1 as StringEvaluationRuleFilter, type StringObjectEvaluationRuleFilter$1 as StringObjectEvaluationRuleFilter, type StringOptionsEvaluationRuleFilter$1 as StringOptionsEvaluationRuleFilter, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type TextPrompt, type TextScore, type TextScoreV1, type TextScoreV3, TooManyRequestsError$1 as TooManyRequestsError, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError$1 as UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateCodeEvaluatorRequest, type UpdateEvaluationRuleRequest$1 as UpdateEvaluationRuleRequest, type UpdateEvaluatorMetadataRequest, type UpdateEvaluatorRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateLlmAsJudgeEvaluatorRequest, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UploadMediaParams, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$H as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$G as blobStorageIntegrations, bytesToBase64, index$F as comments, index$E as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$D as datasetItems, index$C as datasetRunItems, index$B as datasets, index$A as evaluationCommons, index$z as evaluationErrors, index$y as evaluationRules, index$x as evaluators, index$w as experiments, index$v as feedback, generateUUID, getEnv, getGlobalLogger, getLangfuseTraceIdFromBaggage, getPropagatedAttributesFromContext, index$u as health, index$t as ingestion, index$p as legacy, index$o as llmConnections, LoggerSingleton as logger, index$n as media, index$m as metrics, index$l as models, index$k as observations, index$j as opentelemetry, index$i as organizations, index$h as projects, index as promptVersion, index$g as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$f as scim, index$e as scoreConfigs, index$c as scores, index$d as scoresV3, serializeValue, index$b as sessions, setLangfuseTraceIdInBaggage, index$a as trace, index$3 as unstable, uploadMedia, index$1 as utils };
|