@langfuse/core 5.10.1 → 5.11.0
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 +2351 -113
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2698 -470
- package/dist/index.d.ts +2698 -470
- package/dist/index.mjs +2323 -113
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
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
|
/**
|
|
@@ -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
|
/**
|
|
@@ -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"
|
|
@@ -3763,6 +5325,18 @@ declare namespace index$m {
|
|
|
3763
5325
|
export type { index$m_GetMetricsV2Request as GetMetricsV2Request, index$m_MetricsV2Response as MetricsV2Response };
|
|
3764
5326
|
}
|
|
3765
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
|
+
|
|
3766
5340
|
/**
|
|
3767
5341
|
* This file was auto-generated by Fern from our API Definition.
|
|
3768
5342
|
*/
|
|
@@ -3782,15 +5356,15 @@ interface CreateModelRequest {
|
|
|
3782
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$` */
|
|
3783
5357
|
matchPattern: string;
|
|
3784
5358
|
/** Apply only to generations which are newer than this ISO date. */
|
|
3785
|
-
startDate?: string;
|
|
5359
|
+
startDate?: string | null;
|
|
3786
5360
|
/** Unit used by this model. */
|
|
3787
|
-
unit
|
|
5361
|
+
unit: ModelUsageUnit;
|
|
3788
5362
|
/** Deprecated. Use 'pricingTiers' instead. Price (USD) per input unit. Creates a default tier if pricingTiers not provided. */
|
|
3789
|
-
inputPrice?: number;
|
|
5363
|
+
inputPrice?: number | null;
|
|
3790
5364
|
/** Deprecated. Use 'pricingTiers' instead. Price (USD) per output unit. Creates a default tier if pricingTiers not provided. */
|
|
3791
|
-
outputPrice?: number;
|
|
5365
|
+
outputPrice?: number | null;
|
|
3792
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. */
|
|
3793
|
-
totalPrice?: number;
|
|
5367
|
+
totalPrice?: number | null;
|
|
3794
5368
|
/**
|
|
3795
5369
|
* Optional. Array of pricing tiers for this model.
|
|
3796
5370
|
*
|
|
@@ -3811,11 +5385,11 @@ interface CreateModelRequest {
|
|
|
3811
5385
|
* If omitted, you must provide flat prices instead (inputPrice/outputPrice/totalPrice),
|
|
3812
5386
|
* which will automatically create a single default tier named "Standard".
|
|
3813
5387
|
*/
|
|
3814
|
-
pricingTiers?: PricingTierInput[];
|
|
5388
|
+
pricingTiers?: PricingTierInput[] | null;
|
|
3815
5389
|
/** Optional. Tokenizer to be applied to observations which match to this model. See docs for more details. */
|
|
3816
|
-
tokenizerId?:
|
|
5390
|
+
tokenizerId?: ModelTokenizerId | null;
|
|
3817
5391
|
/** Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details. */
|
|
3818
|
-
tokenizerConfig?: unknown;
|
|
5392
|
+
tokenizerConfig?: unknown | null;
|
|
3819
5393
|
}
|
|
3820
5394
|
|
|
3821
5395
|
/**
|
|
@@ -3834,9 +5408,10 @@ interface GetModelsRequest {
|
|
|
3834
5408
|
|
|
3835
5409
|
type index$l_CreateModelRequest = CreateModelRequest;
|
|
3836
5410
|
type index$l_GetModelsRequest = GetModelsRequest;
|
|
5411
|
+
declare const index$l_ModelTokenizerId: typeof ModelTokenizerId;
|
|
3837
5412
|
type index$l_PaginatedModels = PaginatedModels;
|
|
3838
5413
|
declare namespace index$l {
|
|
3839
|
-
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 };
|
|
3840
5415
|
}
|
|
3841
5416
|
|
|
3842
5417
|
/**
|
|
@@ -4983,7 +6558,11 @@ interface CreateUserRequest {
|
|
|
4983
6558
|
emails?: ScimEmail[];
|
|
4984
6559
|
/** Whether the user is active */
|
|
4985
6560
|
active?: boolean;
|
|
4986
|
-
/**
|
|
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
|
+
*/
|
|
4987
6566
|
password?: string;
|
|
4988
6567
|
}
|
|
4989
6568
|
|
|
@@ -5743,7 +7322,7 @@ declare namespace index$a {
|
|
|
5743
7322
|
* This file was auto-generated by Fern from our API Definition.
|
|
5744
7323
|
*/
|
|
5745
7324
|
/**
|
|
5746
|
-
* The evaluator
|
|
7325
|
+
* The evaluator type.
|
|
5747
7326
|
*
|
|
5748
7327
|
* The unstable public API supports LLM-as-a-judge and code evaluators.
|
|
5749
7328
|
*/
|
|
@@ -5765,21 +7344,6 @@ declare const CodeEvaluatorSourceCodeLanguage: {
|
|
|
5765
7344
|
readonly Typescript: "TYPESCRIPT";
|
|
5766
7345
|
};
|
|
5767
7346
|
|
|
5768
|
-
/**
|
|
5769
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
5770
|
-
*/
|
|
5771
|
-
/**
|
|
5772
|
-
* Where an evaluator comes from.
|
|
5773
|
-
*
|
|
5774
|
-
* - `project`: created in your project
|
|
5775
|
-
* - `managed`: provided by Langfuse
|
|
5776
|
-
*/
|
|
5777
|
-
type EvaluatorScope = "project" | "managed";
|
|
5778
|
-
declare const EvaluatorScope: {
|
|
5779
|
-
readonly Project: "project";
|
|
5780
|
-
readonly Managed: "managed";
|
|
5781
|
-
};
|
|
5782
|
-
|
|
5783
7347
|
/**
|
|
5784
7348
|
* This file was auto-generated by Fern from our API Definition.
|
|
5785
7349
|
*/
|
|
@@ -5836,8 +7400,8 @@ declare const EvaluationRuleStatus: {
|
|
|
5836
7400
|
* - `expected_output`: the experiment item's expected output. Only valid for `target=experiment`.
|
|
5837
7401
|
* - `experiment_item_metadata`: the experiment item's metadata object. Only valid for `target=experiment`.
|
|
5838
7402
|
*/
|
|
5839
|
-
type
|
|
5840
|
-
declare const
|
|
7403
|
+
type PromptVariableMappingSource = "input" | "output" | "metadata" | "tool_calls" | "expected_output" | "experiment_item_metadata";
|
|
7404
|
+
declare const PromptVariableMappingSource: {
|
|
5841
7405
|
readonly Input: "input";
|
|
5842
7406
|
readonly Output: "output";
|
|
5843
7407
|
readonly Metadata: "metadata";
|
|
@@ -5915,6 +7479,7 @@ interface EvaluatorOutputFieldDefinition {
|
|
|
5915
7479
|
* - `dataType` is required.
|
|
5916
7480
|
* - Do not send `version`; that is an internal storage detail and is not part of the public request contract.
|
|
5917
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`.
|
|
5918
7483
|
* - For `CATEGORICAL`, also provide `score.categories` and `score.shouldAllowMultipleMatches`.
|
|
5919
7484
|
*
|
|
5920
7485
|
* @example
|
|
@@ -5925,7 +7490,9 @@ interface EvaluatorOutputFieldDefinition {
|
|
|
5925
7490
|
* description: "Explain why the answer is correct or incorrect."
|
|
5926
7491
|
* },
|
|
5927
7492
|
* score: {
|
|
5928
|
-
* description: "Return a score between 0 and 1."
|
|
7493
|
+
* description: "Return a score between 0 and 1.",
|
|
7494
|
+
* minValue: 0,
|
|
7495
|
+
* maxValue: 1
|
|
5929
7496
|
* }
|
|
5930
7497
|
* }
|
|
5931
7498
|
*
|
|
@@ -5968,6 +7535,17 @@ declare namespace EvaluatorOutputDefinition {
|
|
|
5968
7535
|
}
|
|
5969
7536
|
}
|
|
5970
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
|
+
|
|
5971
7549
|
/**
|
|
5972
7550
|
* This file was auto-generated by Fern from our API Definition.
|
|
5973
7551
|
*/
|
|
@@ -5976,7 +7554,7 @@ interface PublicNumericEvaluatorOutputDefinition {
|
|
|
5976
7554
|
/** Always `NUMERIC`. */
|
|
5977
7555
|
dataType: EvaluatorOutputDataType;
|
|
5978
7556
|
reasoning: EvaluatorOutputFieldDefinition;
|
|
5979
|
-
score:
|
|
7557
|
+
score: PublicNumericEvaluatorOutputScoreDefinition;
|
|
5980
7558
|
}
|
|
5981
7559
|
|
|
5982
7560
|
/**
|
|
@@ -6033,7 +7611,9 @@ interface PublicCategoricalEvaluatorOutputDefinition {
|
|
|
6033
7611
|
* description: "Explain why the answer is correct or incorrect."
|
|
6034
7612
|
* },
|
|
6035
7613
|
* score: {
|
|
6036
|
-
* description: "Return a score between 0 and 1."
|
|
7614
|
+
* description: "Return a score between 0 and 1.",
|
|
7615
|
+
* minValue: 0,
|
|
7616
|
+
* maxValue: 1
|
|
6037
7617
|
* }
|
|
6038
7618
|
* }
|
|
6039
7619
|
*
|
|
@@ -6251,7 +7831,7 @@ interface NullEvaluationRuleFilter {
|
|
|
6251
7831
|
*/
|
|
6252
7832
|
|
|
6253
7833
|
/**
|
|
6254
|
-
*
|
|
7834
|
+
* Connects one prompt variable to the available evaluation data.
|
|
6255
7835
|
*
|
|
6256
7836
|
* Manual mappings are used for `llm_as_judge` evaluators. `code` evaluators use a fixed runtime mapping managed by Langfuse.
|
|
6257
7837
|
*
|
|
@@ -6266,30 +7846,30 @@ interface NullEvaluationRuleFilter {
|
|
|
6266
7846
|
*
|
|
6267
7847
|
* Recovery guidance:
|
|
6268
7848
|
* - `invalid_variable_mapping`: the variable name is unknown for this evaluator, or the selected `source` is not valid for the chosen `target`
|
|
6269
|
-
* - `missing_variable_mapping`: one or more LLM-as-judge
|
|
6270
|
-
* - `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
|
|
6271
7851
|
* - `invalid_json_path`: the JSONPath expression is malformed. Remove it or correct it.
|
|
6272
7852
|
*
|
|
6273
7853
|
* @example
|
|
6274
7854
|
* {
|
|
6275
7855
|
* variable: "input",
|
|
6276
|
-
* source: LangfuseAPI.unstable.
|
|
7856
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Input
|
|
6277
7857
|
* }
|
|
6278
7858
|
*
|
|
6279
7859
|
* @example
|
|
6280
7860
|
* {
|
|
6281
7861
|
* variable: "customer_tier",
|
|
6282
|
-
* source: LangfuseAPI.unstable.
|
|
7862
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Metadata,
|
|
6283
7863
|
* jsonPath: "$.customer.tier"
|
|
6284
7864
|
* }
|
|
6285
7865
|
*
|
|
6286
7866
|
* @example
|
|
6287
7867
|
* {
|
|
6288
7868
|
* variable: "expected_output",
|
|
6289
|
-
* source: LangfuseAPI.unstable.
|
|
7869
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.ExpectedOutput
|
|
6290
7870
|
* }
|
|
6291
7871
|
*/
|
|
6292
|
-
interface
|
|
7872
|
+
interface PromptVariableMappingInput {
|
|
6293
7873
|
/**
|
|
6294
7874
|
* Prompt variable name without braces.
|
|
6295
7875
|
*
|
|
@@ -6303,7 +7883,7 @@ interface EvaluationRuleMapping {
|
|
|
6303
7883
|
* - `target=observation`: `input`, `output`, `metadata`, `tool_calls`
|
|
6304
7884
|
* - `target=experiment`: `input`, `output`, `metadata`, `tool_calls`, `expected_output`, `experiment_item_metadata`
|
|
6305
7885
|
*/
|
|
6306
|
-
source:
|
|
7886
|
+
source: PromptVariableMappingSource;
|
|
6307
7887
|
/**
|
|
6308
7888
|
* Optional JSONPath selector applied to the selected source before it is passed to the evaluator prompt.
|
|
6309
7889
|
*
|
|
@@ -6315,6 +7895,36 @@ interface EvaluationRuleMapping {
|
|
|
6315
7895
|
jsonPath?: string;
|
|
6316
7896
|
}
|
|
6317
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
|
+
|
|
6318
7928
|
/**
|
|
6319
7929
|
* This file was auto-generated by Fern from our API Definition.
|
|
6320
7930
|
*/
|
|
@@ -6455,8 +8065,6 @@ type index$9_DateTimeEvaluationRuleFilter = DateTimeEvaluationRuleFilter;
|
|
|
6455
8065
|
declare const index$9_EvaluationRuleArrayOptionsFilterOperator: typeof EvaluationRuleArrayOptionsFilterOperator;
|
|
6456
8066
|
declare const index$9_EvaluationRuleBooleanFilterOperator: typeof EvaluationRuleBooleanFilterOperator;
|
|
6457
8067
|
declare const index$9_EvaluationRuleFilter: typeof EvaluationRuleFilter;
|
|
6458
|
-
type index$9_EvaluationRuleMapping = EvaluationRuleMapping;
|
|
6459
|
-
declare const index$9_EvaluationRuleMappingSource: typeof EvaluationRuleMappingSource;
|
|
6460
8068
|
declare const index$9_EvaluationRuleNullFilterOperator: typeof EvaluationRuleNullFilterOperator;
|
|
6461
8069
|
declare const index$9_EvaluationRuleNumberFilterOperator: typeof EvaluationRuleNumberFilterOperator;
|
|
6462
8070
|
declare const index$9_EvaluationRuleOptionsFilterOperator: typeof EvaluationRuleOptionsFilterOperator;
|
|
@@ -6467,21 +8075,24 @@ type index$9_EvaluatorModelConfig = EvaluatorModelConfig;
|
|
|
6467
8075
|
declare const index$9_EvaluatorOutputDataType: typeof EvaluatorOutputDataType;
|
|
6468
8076
|
declare const index$9_EvaluatorOutputDefinition: typeof EvaluatorOutputDefinition;
|
|
6469
8077
|
type index$9_EvaluatorOutputFieldDefinition = EvaluatorOutputFieldDefinition;
|
|
6470
|
-
declare const index$9_EvaluatorScope: typeof EvaluatorScope;
|
|
6471
8078
|
declare const index$9_EvaluatorType: typeof EvaluatorType;
|
|
6472
8079
|
type index$9_NullEvaluationRuleFilter = NullEvaluationRuleFilter;
|
|
6473
8080
|
type index$9_NumberEvaluationRuleFilter = NumberEvaluationRuleFilter;
|
|
6474
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;
|
|
6475
8085
|
type index$9_PublicBooleanEvaluatorOutputDefinition = PublicBooleanEvaluatorOutputDefinition;
|
|
6476
8086
|
type index$9_PublicCategoricalEvaluatorOutputDefinition = PublicCategoricalEvaluatorOutputDefinition;
|
|
6477
8087
|
type index$9_PublicCategoricalEvaluatorOutputScoreDefinition = PublicCategoricalEvaluatorOutputScoreDefinition;
|
|
6478
8088
|
declare const index$9_PublicEvaluatorOutputDefinition: typeof PublicEvaluatorOutputDefinition;
|
|
6479
8089
|
type index$9_PublicNumericEvaluatorOutputDefinition = PublicNumericEvaluatorOutputDefinition;
|
|
8090
|
+
type index$9_PublicNumericEvaluatorOutputScoreDefinition = PublicNumericEvaluatorOutputScoreDefinition;
|
|
6480
8091
|
type index$9_StringEvaluationRuleFilter = StringEvaluationRuleFilter;
|
|
6481
8092
|
type index$9_StringObjectEvaluationRuleFilter = StringObjectEvaluationRuleFilter;
|
|
6482
8093
|
type index$9_StringOptionsEvaluationRuleFilter = StringOptionsEvaluationRuleFilter;
|
|
6483
8094
|
declare namespace index$9 {
|
|
6484
|
-
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 };
|
|
6485
8096
|
}
|
|
6486
8097
|
|
|
6487
8098
|
/**
|
|
@@ -7130,10 +8741,10 @@ interface PublicApiErrorDetails {
|
|
|
7130
8741
|
*
|
|
7131
8742
|
* @example
|
|
7132
8743
|
* {
|
|
7133
|
-
* 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.",
|
|
7134
8745
|
* code: LangfuseAPI.unstable.PublicApiErrorCode.Conflict,
|
|
7135
8746
|
* details: {
|
|
7136
|
-
* limit:
|
|
8747
|
+
* limit: 500
|
|
7137
8748
|
* }
|
|
7138
8749
|
* }
|
|
7139
8750
|
*
|
|
@@ -7267,7 +8878,7 @@ declare namespace index$6 {
|
|
|
7267
8878
|
* - which evaluator should be used
|
|
7268
8879
|
* - which target objects should trigger scoring
|
|
7269
8880
|
* - how often scoring should run
|
|
7270
|
-
* - which target fields should populate each
|
|
8881
|
+
* - which target fields should populate each prompt variable
|
|
7271
8882
|
* - whether the deployment is active, inactive, or paused
|
|
7272
8883
|
*
|
|
7273
8884
|
* Important status semantics:
|
|
@@ -7281,13 +8892,13 @@ interface EvaluationRuleBase {
|
|
|
7281
8892
|
/** Human-readable deployment name. This is independent from the evaluator name. */
|
|
7282
8893
|
name: string;
|
|
7283
8894
|
/**
|
|
7284
|
-
*
|
|
8895
|
+
* Deprecated compatibility alias for `evaluators[0].evaluator`, or `null`
|
|
8896
|
+
* when the rule currently has no evaluator assignments.
|
|
7285
8897
|
*
|
|
7286
|
-
* `
|
|
7287
|
-
*
|
|
7288
|
-
* 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.
|
|
7289
8900
|
*/
|
|
7290
|
-
evaluator: EvaluationRuleEvaluator;
|
|
8901
|
+
evaluator: EvaluationRuleEvaluator | null;
|
|
7291
8902
|
/** Desired enabled state configured by the client. */
|
|
7292
8903
|
enabled: boolean;
|
|
7293
8904
|
/** Effective runtime status after Langfuse applies validation and blocking rules. */
|
|
@@ -7322,9 +8933,22 @@ interface EvaluationRuleBase {
|
|
|
7322
8933
|
* evaluator: {
|
|
7323
8934
|
* id: "evaltmpl_123",
|
|
7324
8935
|
* name: "answer-correctness",
|
|
7325
|
-
* scope: LangfuseAPI.unstable.EvaluatorScope.Project,
|
|
7326
8936
|
* type: LangfuseAPI.unstable.EvaluatorType.LlmAsJudge
|
|
7327
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
|
+
* }],
|
|
7328
8952
|
* target: LangfuseAPI.unstable.EvaluationRuleTarget.Observation,
|
|
7329
8953
|
* enabled: true,
|
|
7330
8954
|
* status: LangfuseAPI.unstable.EvaluationRuleStatus.Active,
|
|
@@ -7339,22 +8963,24 @@ interface EvaluationRuleBase {
|
|
|
7339
8963
|
* }],
|
|
7340
8964
|
* mapping: [{
|
|
7341
8965
|
* variable: "input",
|
|
7342
|
-
* source: LangfuseAPI.unstable.
|
|
8966
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Input
|
|
7343
8967
|
* }, {
|
|
7344
8968
|
* variable: "output",
|
|
7345
|
-
* source: LangfuseAPI.unstable.
|
|
8969
|
+
* source: LangfuseAPI.unstable.PromptVariableMappingSource.Output
|
|
7346
8970
|
* }],
|
|
7347
8971
|
* createdAt: "2026-03-30T09:20:00.000Z",
|
|
7348
8972
|
* updatedAt: "2026-03-30T09:20:00.000Z"
|
|
7349
8973
|
* }
|
|
7350
8974
|
*/
|
|
7351
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[];
|
|
7352
8978
|
/** Target object type that should trigger scoring. */
|
|
7353
8979
|
target: EvaluationRuleTarget;
|
|
7354
8980
|
/** List of filter conditions used to decide whether a target should be evaluated. */
|
|
7355
8981
|
filter: EvaluationRuleFilter[];
|
|
7356
|
-
/**
|
|
7357
|
-
mapping:
|
|
8982
|
+
/** Deprecated compatibility alias containing the effective mapping for `evaluators[0]`. */
|
|
8983
|
+
mapping: PromptVariableMappingRead[];
|
|
7358
8984
|
}
|
|
7359
8985
|
|
|
7360
8986
|
/**
|
|
@@ -7362,11 +8988,13 @@ interface EvaluationRule extends EvaluationRuleBase {
|
|
|
7362
8988
|
*/
|
|
7363
8989
|
|
|
7364
8990
|
/**
|
|
7365
|
-
* 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.
|
|
7366
8992
|
*
|
|
7367
|
-
* 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.
|
|
7368
8994
|
*/
|
|
7369
8995
|
interface LegacyEvaluationRule extends EvaluationRuleBase {
|
|
8996
|
+
/** Evaluators attached to this rule in deterministic assignment order. */
|
|
8997
|
+
evaluators: LegacyEvaluationRuleEvaluatorAssignment[];
|
|
7370
8998
|
target: LegacyEvaluationRuleTarget;
|
|
7371
8999
|
/** Delay in milliseconds before the legacy evaluation job runs. */
|
|
7372
9000
|
delay: number;
|
|
@@ -7375,7 +9003,7 @@ interface LegacyEvaluationRule extends EvaluationRuleBase {
|
|
|
7375
9003
|
/** Stored filters used by the legacy trace or dataset rule. */
|
|
7376
9004
|
filter: EvaluationRuleFilter[];
|
|
7377
9005
|
/** Stored variable mappings, including the trace, dataset item, or named observation selected for each variable. */
|
|
7378
|
-
mapping:
|
|
9006
|
+
mapping: LegacyPromptVariableMapping[];
|
|
7379
9007
|
}
|
|
7380
9008
|
|
|
7381
9009
|
/**
|
|
@@ -7394,7 +9022,7 @@ type ReadableEvaluationRule = EvaluationRule | LegacyEvaluationRule;
|
|
|
7394
9022
|
/**
|
|
7395
9023
|
* Paginated list of evaluation rules.
|
|
7396
9024
|
*/
|
|
7397
|
-
interface EvaluationRules$
|
|
9025
|
+
interface EvaluationRules$2 {
|
|
7398
9026
|
/** Evaluation rules in the current page. */
|
|
7399
9027
|
data: ReadableEvaluationRule[];
|
|
7400
9028
|
/** Standard pagination metadata. */
|
|
@@ -7409,15 +9037,34 @@ interface EvaluationRules$1 {
|
|
|
7409
9037
|
* Request body for creating an evaluation rule.
|
|
7410
9038
|
*
|
|
7411
9039
|
* Checklist for agents and SDK clients:
|
|
7412
|
-
* - reference an existing evaluator family by `evaluator.name` and `evaluator.
|
|
9040
|
+
* - reference an existing evaluator family by `evaluator.name` and `evaluator.type`
|
|
7413
9041
|
* - choose `target=observation` or `target=experiment`
|
|
7414
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`
|
|
7415
|
-
* - 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
|
|
7416
9044
|
* - for `code`, do not send variables or mappings; Langfuse stores the fixed code runtime mapping automatically
|
|
7417
9045
|
* - optionally narrow execution with `filter`
|
|
7418
9046
|
* - set `enabled=true` only when you want live execution immediately
|
|
7419
9047
|
*/
|
|
7420
|
-
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
|
+
}
|
|
7421
9068
|
|
|
7422
9069
|
/**
|
|
7423
9070
|
* This file was auto-generated by Fern from our API Definition.
|
|
@@ -7429,7 +9076,7 @@ interface CreateLlmAsJudgeEvaluationRuleRequest {
|
|
|
7429
9076
|
/**
|
|
7430
9077
|
* LLM-as-judge evaluator family to use.
|
|
7431
9078
|
*
|
|
7432
|
-
* 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.
|
|
7433
9080
|
* Langfuse resolves that family to its latest version before saving the rule.
|
|
7434
9081
|
*/
|
|
7435
9082
|
evaluator: LlmAsJudgeEvaluationRuleEvaluatorReference;
|
|
@@ -7450,10 +9097,10 @@ interface CreateLlmAsJudgeEvaluationRuleRequest {
|
|
|
7450
9097
|
/**
|
|
7451
9098
|
* LLM-as-judge variable mappings.
|
|
7452
9099
|
*
|
|
7453
|
-
* Every
|
|
7454
|
-
* 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.
|
|
7455
9102
|
*/
|
|
7456
|
-
mapping:
|
|
9103
|
+
mapping: PromptVariableMappingInput[];
|
|
7457
9104
|
}
|
|
7458
9105
|
|
|
7459
9106
|
/**
|
|
@@ -7466,7 +9113,7 @@ interface CreateCodeEvaluationRuleRequest {
|
|
|
7466
9113
|
/**
|
|
7467
9114
|
* Code evaluator family to use.
|
|
7468
9115
|
*
|
|
7469
|
-
* Use `name
|
|
9116
|
+
* Use `name` and `type` from the evaluator endpoints.
|
|
7470
9117
|
* Langfuse resolves that family to its latest version before saving the rule.
|
|
7471
9118
|
*/
|
|
7472
9119
|
evaluator: CodeEvaluationRuleEvaluatorReference;
|
|
@@ -7498,7 +9145,9 @@ interface CreateCodeEvaluationRuleRequest {
|
|
|
7498
9145
|
*
|
|
7499
9146
|
* Practical guidance:
|
|
7500
9147
|
* - If you only want to rename the rule or change sampling, send just those fields.
|
|
7501
|
-
* -
|
|
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.
|
|
7502
9151
|
* - If you change `target` for an LLM-as-judge rule, usually send both `filter` and `mapping` in the same request.
|
|
7503
9152
|
* - For code evaluator rules, omit `mapping`; Langfuse stores the fixed code runtime mapping automatically.
|
|
7504
9153
|
* - If you change an experiment `datasetId` filter, call `GET /api/public/v2/datasets` and use dataset `id` values from that response.
|
|
@@ -7507,10 +9156,17 @@ interface UpdateEvaluationRuleRequest {
|
|
|
7507
9156
|
/** Updated deployment name. */
|
|
7508
9157
|
name?: string;
|
|
7509
9158
|
/**
|
|
7510
|
-
*
|
|
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`.
|
|
7511
9167
|
*
|
|
7512
9168
|
* Langfuse resolves the provided evaluator family to its latest version before saving the rule.
|
|
7513
|
-
* 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.
|
|
7514
9170
|
*/
|
|
7515
9171
|
evaluator?: EvaluationRuleEvaluatorReference;
|
|
7516
9172
|
/** Updated target object type. */
|
|
@@ -7530,7 +9186,7 @@ interface UpdateEvaluationRuleRequest {
|
|
|
7530
9186
|
*
|
|
7531
9187
|
* Do not send this field for code evaluator rules. Langfuse stores the fixed code runtime mapping automatically and returns it in the response.
|
|
7532
9188
|
*/
|
|
7533
|
-
mapping?:
|
|
9189
|
+
mapping?: PromptVariableMappingInput[];
|
|
7534
9190
|
}
|
|
7535
9191
|
|
|
7536
9192
|
/**
|
|
@@ -7547,18 +9203,15 @@ interface DeleteEvaluationRuleResponse {
|
|
|
7547
9203
|
/**
|
|
7548
9204
|
* This file was auto-generated by Fern from our API Definition.
|
|
7549
9205
|
*/
|
|
7550
|
-
|
|
7551
9206
|
/**
|
|
7552
9207
|
* Evaluator family reference used when updating an evaluation rule.
|
|
7553
9208
|
*
|
|
7554
|
-
* `name`
|
|
9209
|
+
* `name` identifies the evaluator family in the authenticated project context.
|
|
7555
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.
|
|
7556
9211
|
*/
|
|
7557
9212
|
interface EvaluationRuleEvaluatorReference {
|
|
7558
9213
|
/** Evaluator family name. */
|
|
7559
9214
|
name: string;
|
|
7560
|
-
/** Whether the evaluator family is project-owned or Langfuse-managed. */
|
|
7561
|
-
scope: EvaluatorScope;
|
|
7562
9215
|
}
|
|
7563
9216
|
|
|
7564
9217
|
/**
|
|
@@ -7571,24 +9224,19 @@ interface EvaluationRuleEvaluatorReference {
|
|
|
7571
9224
|
interface LlmAsJudgeEvaluationRuleEvaluatorReference {
|
|
7572
9225
|
/** Evaluator family name. */
|
|
7573
9226
|
name: string;
|
|
7574
|
-
/**
|
|
7575
|
-
scope: EvaluatorScope;
|
|
7576
|
-
/** Evaluator engine type. Defaults to `llm_as_judge` when omitted. */
|
|
9227
|
+
/** Evaluator type. Defaults to `llm_as_judge` when omitted. */
|
|
7577
9228
|
type?: LlmAsJudgeEvaluatorType;
|
|
7578
9229
|
}
|
|
7579
9230
|
|
|
7580
9231
|
/**
|
|
7581
9232
|
* This file was auto-generated by Fern from our API Definition.
|
|
7582
9233
|
*/
|
|
7583
|
-
|
|
7584
9234
|
/**
|
|
7585
9235
|
* Code evaluator family reference used when creating an evaluation rule.
|
|
7586
9236
|
*/
|
|
7587
9237
|
interface CodeEvaluationRuleEvaluatorReference {
|
|
7588
9238
|
/** Evaluator family name. */
|
|
7589
9239
|
name: string;
|
|
7590
|
-
/** Whether the evaluator family is project-owned or Langfuse-managed. */
|
|
7591
|
-
scope: EvaluatorScope;
|
|
7592
9240
|
/** Must be `code`. */
|
|
7593
9241
|
type: "code";
|
|
7594
9242
|
}
|
|
@@ -7601,6 +9249,47 @@ declare const LlmAsJudgeEvaluatorType: {
|
|
|
7601
9249
|
readonly LlmAsJudge: "llm_as_judge";
|
|
7602
9250
|
};
|
|
7603
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
|
+
|
|
7604
9293
|
/**
|
|
7605
9294
|
* This file was auto-generated by Fern from our API Definition.
|
|
7606
9295
|
*/
|
|
@@ -7613,6 +9302,9 @@ declare const EvaluationRuleTimeScope: {
|
|
|
7613
9302
|
/**
|
|
7614
9303
|
* This file was auto-generated by Fern from our API Definition.
|
|
7615
9304
|
*/
|
|
9305
|
+
/**
|
|
9306
|
+
* **Deprecated:** Legacy trace or dataset evaluation target.
|
|
9307
|
+
*/
|
|
7616
9308
|
type LegacyEvaluationRuleTarget = "trace" | "dataset";
|
|
7617
9309
|
declare const LegacyEvaluationRuleTarget: {
|
|
7618
9310
|
readonly Trace: "trace";
|
|
@@ -7624,24 +9316,23 @@ declare const LegacyEvaluationRuleTarget: {
|
|
|
7624
9316
|
*/
|
|
7625
9317
|
|
|
7626
9318
|
/**
|
|
7627
|
-
*
|
|
9319
|
+
* **Deprecated:** Connects one prompt variable to data from a trace, dataset item, or named observation in a legacy rule.
|
|
7628
9320
|
*/
|
|
7629
|
-
interface
|
|
7630
|
-
/** Evaluator prompt variable populated by this mapping. */
|
|
9321
|
+
interface LegacyPromptVariableMapping {
|
|
7631
9322
|
variable: string;
|
|
7632
|
-
/** Trace, dataset item, or observation type from which the value is read. */
|
|
7633
9323
|
langfuseObject: LegacyEvaluationObject;
|
|
7634
9324
|
/** Observation name to match, or `null` when `langfuseObject` is `trace` or `dataset_item`. */
|
|
7635
9325
|
objectName: string | null;
|
|
7636
|
-
/** Stored field selected from the trace, dataset item, or observation. */
|
|
7637
9326
|
source: string;
|
|
7638
|
-
/** Optional JSONPath selector applied to the selected field. */
|
|
7639
9327
|
jsonPath?: string;
|
|
7640
9328
|
}
|
|
7641
9329
|
|
|
7642
9330
|
/**
|
|
7643
9331
|
* This file was auto-generated by Fern from our API Definition.
|
|
7644
9332
|
*/
|
|
9333
|
+
/**
|
|
9334
|
+
* **Deprecated:** Legacy Langfuse object used by a trace or dataset evaluation rule.
|
|
9335
|
+
*/
|
|
7645
9336
|
type LegacyEvaluationObject = "trace" | "span" | "generation" | "event" | "agent" | "tool" | "chain" | "retriever" | "evaluator" | "embedding" | "guardrail" | "dataset_item";
|
|
7646
9337
|
declare const LegacyEvaluationObject: {
|
|
7647
9338
|
readonly Trace: "trace";
|
|
@@ -7662,21 +9353,20 @@ declare const LegacyEvaluationObject: {
|
|
|
7662
9353
|
* This file was auto-generated by Fern from our API Definition.
|
|
7663
9354
|
*/
|
|
7664
9355
|
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
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
|
+
|
|
9362
|
+
/**
|
|
9363
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
9364
|
+
*/
|
|
9365
|
+
|
|
9366
|
+
interface CreateEvaluationRuleEvaluatorReference {
|
|
7675
9367
|
name: string;
|
|
7676
|
-
/**
|
|
7677
|
-
|
|
7678
|
-
/** Evaluator engine type. */
|
|
7679
|
-
type: EvaluatorType;
|
|
9368
|
+
/** Defaults to `llm_as_judge`. */
|
|
9369
|
+
type?: EvaluatorType;
|
|
7680
9370
|
}
|
|
7681
9371
|
|
|
7682
9372
|
/**
|
|
@@ -7695,25 +9385,30 @@ interface ListEvaluationRulesRequest {
|
|
|
7695
9385
|
|
|
7696
9386
|
type index$5_CodeEvaluationRuleEvaluatorReference = CodeEvaluationRuleEvaluatorReference;
|
|
7697
9387
|
type index$5_CreateCodeEvaluationRuleRequest = CreateCodeEvaluationRuleRequest;
|
|
9388
|
+
type index$5_CreateEvaluationRuleEvaluatorAssignment = CreateEvaluationRuleEvaluatorAssignment;
|
|
9389
|
+
type index$5_CreateEvaluationRuleEvaluatorReference = CreateEvaluationRuleEvaluatorReference;
|
|
7698
9390
|
type index$5_CreateEvaluationRuleRequest = CreateEvaluationRuleRequest;
|
|
9391
|
+
type index$5_CreateEvaluationRuleWithEvaluatorsRequest = CreateEvaluationRuleWithEvaluatorsRequest;
|
|
7699
9392
|
type index$5_CreateLlmAsJudgeEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest;
|
|
7700
9393
|
type index$5_DeleteEvaluationRuleResponse = DeleteEvaluationRuleResponse;
|
|
7701
9394
|
type index$5_EvaluationRule = EvaluationRule;
|
|
7702
9395
|
type index$5_EvaluationRuleBase = EvaluationRuleBase;
|
|
7703
9396
|
type index$5_EvaluationRuleEvaluator = EvaluationRuleEvaluator;
|
|
9397
|
+
type index$5_EvaluationRuleEvaluatorAssignment = EvaluationRuleEvaluatorAssignment;
|
|
7704
9398
|
type index$5_EvaluationRuleEvaluatorReference = EvaluationRuleEvaluatorReference;
|
|
7705
9399
|
declare const index$5_EvaluationRuleTimeScope: typeof EvaluationRuleTimeScope;
|
|
7706
9400
|
declare const index$5_LegacyEvaluationObject: typeof LegacyEvaluationObject;
|
|
7707
9401
|
type index$5_LegacyEvaluationRule = LegacyEvaluationRule;
|
|
7708
|
-
type index$
|
|
9402
|
+
type index$5_LegacyEvaluationRuleEvaluatorAssignment = LegacyEvaluationRuleEvaluatorAssignment;
|
|
7709
9403
|
declare const index$5_LegacyEvaluationRuleTarget: typeof LegacyEvaluationRuleTarget;
|
|
9404
|
+
type index$5_LegacyPromptVariableMapping = LegacyPromptVariableMapping;
|
|
7710
9405
|
type index$5_ListEvaluationRulesRequest = ListEvaluationRulesRequest;
|
|
7711
9406
|
type index$5_LlmAsJudgeEvaluationRuleEvaluatorReference = LlmAsJudgeEvaluationRuleEvaluatorReference;
|
|
7712
9407
|
declare const index$5_LlmAsJudgeEvaluatorType: typeof LlmAsJudgeEvaluatorType;
|
|
7713
9408
|
type index$5_ReadableEvaluationRule = ReadableEvaluationRule;
|
|
7714
9409
|
type index$5_UpdateEvaluationRuleRequest = UpdateEvaluationRuleRequest;
|
|
7715
9410
|
declare namespace index$5 {
|
|
7716
|
-
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 };
|
|
7717
9412
|
}
|
|
7718
9413
|
|
|
7719
9414
|
/**
|
|
@@ -7744,7 +9439,8 @@ interface DeleteEvaluatorResponse {
|
|
|
7744
9439
|
*
|
|
7745
9440
|
* Versioning behavior:
|
|
7746
9441
|
* - `GET /evaluators` returns the latest version of each available evaluator.
|
|
7747
|
-
* - `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.
|
|
7748
9444
|
* - Evaluation rules always run against the latest version for the selected evaluator name within the same source (`project` or `managed`).
|
|
7749
9445
|
*/
|
|
7750
9446
|
type Evaluator = Evaluator.LlmAsJudge | Evaluator.Code;
|
|
@@ -7762,21 +9458,27 @@ declare namespace Evaluator {
|
|
|
7762
9458
|
*/
|
|
7763
9459
|
|
|
7764
9460
|
interface EvaluatorBase {
|
|
7765
|
-
/**
|
|
9461
|
+
/** Stable identifier of this evaluator across all versions. */
|
|
7766
9462
|
id: string;
|
|
7767
9463
|
/** Evaluator name. */
|
|
7768
9464
|
name: string;
|
|
7769
9465
|
/** Version number of this evaluator. */
|
|
7770
9466
|
version: number;
|
|
7771
|
-
/** Where this evaluator comes from: your project or Langfuse-managed defaults. */
|
|
7772
|
-
scope: EvaluatorScope;
|
|
7773
9467
|
/**
|
|
7774
9468
|
* Variables that can be mapped when creating an evaluation rule.
|
|
7775
9469
|
*
|
|
7776
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.
|
|
7777
9471
|
*/
|
|
7778
9472
|
variables: string[];
|
|
7779
|
-
/**
|
|
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. */
|
|
7780
9482
|
evaluationRuleCount: number;
|
|
7781
9483
|
/** Timestamp when this evaluator was created. */
|
|
7782
9484
|
createdAt: string;
|
|
@@ -7817,7 +9519,7 @@ interface CodeEvaluator extends EvaluatorBase {
|
|
|
7817
9519
|
* This file was auto-generated by Fern from our API Definition.
|
|
7818
9520
|
*/
|
|
7819
9521
|
|
|
7820
|
-
interface Evaluators$
|
|
9522
|
+
interface Evaluators$2 {
|
|
7821
9523
|
data: Evaluator[];
|
|
7822
9524
|
meta: MetaResponse;
|
|
7823
9525
|
}
|
|
@@ -7830,7 +9532,7 @@ interface Evaluators$1 {
|
|
|
7830
9532
|
* Request body for creating an evaluator.
|
|
7831
9533
|
*
|
|
7832
9534
|
* If the same `name` already exists in your project, Langfuse creates the next version and returns it.
|
|
7833
|
-
* Existing evaluation rules
|
|
9535
|
+
* Existing evaluation rules automatically use the latest evaluator version.
|
|
7834
9536
|
* If `type` is omitted, Langfuse defaults it to `llm_as_judge` for backwards compatibility.
|
|
7835
9537
|
*/
|
|
7836
9538
|
type CreateEvaluatorRequest = CreateEvaluatorRequest.LlmAsJudge | CreateEvaluatorRequest.Code;
|
|
@@ -7861,6 +9563,8 @@ interface CreateLlmAsJudgeEvaluatorRequest {
|
|
|
7861
9563
|
outputDefinition: EvaluatorOutputDefinition;
|
|
7862
9564
|
/** Optional explicit model configuration. Omit or set to `null` to use the project default evaluation model. */
|
|
7863
9565
|
modelConfig?: EvaluatorModelConfig | null;
|
|
9566
|
+
/** Optional default variable mapping inherited by rule assignments that do not provide an override. */
|
|
9567
|
+
mapping?: PromptVariableMappingInput[];
|
|
7864
9568
|
}
|
|
7865
9569
|
|
|
7866
9570
|
/**
|
|
@@ -7900,7 +9604,7 @@ type index$4_EvaluatorBase = EvaluatorBase;
|
|
|
7900
9604
|
type index$4_ListEvaluatorsRequest = ListEvaluatorsRequest;
|
|
7901
9605
|
type index$4_LlmAsJudgeEvaluator = LlmAsJudgeEvaluator;
|
|
7902
9606
|
declare namespace index$4 {
|
|
7903
|
-
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 };
|
|
7904
9608
|
}
|
|
7905
9609
|
|
|
7906
9610
|
type index$3_AccessDeniedError = AccessDeniedError;
|
|
@@ -7920,7 +9624,10 @@ type index$3_CreateCodeEvaluatorRequest = CreateCodeEvaluatorRequest;
|
|
|
7920
9624
|
declare const index$3_CreateDashboardPlacementRequest: typeof CreateDashboardPlacementRequest;
|
|
7921
9625
|
type index$3_CreateDashboardRequest = CreateDashboardRequest;
|
|
7922
9626
|
type index$3_CreateDashboardWidgetRequest = CreateDashboardWidgetRequest;
|
|
9627
|
+
type index$3_CreateEvaluationRuleEvaluatorAssignment = CreateEvaluationRuleEvaluatorAssignment;
|
|
9628
|
+
type index$3_CreateEvaluationRuleEvaluatorReference = CreateEvaluationRuleEvaluatorReference;
|
|
7923
9629
|
type index$3_CreateEvaluationRuleRequest = CreateEvaluationRuleRequest;
|
|
9630
|
+
type index$3_CreateEvaluationRuleWithEvaluatorsRequest = CreateEvaluationRuleWithEvaluatorsRequest;
|
|
7924
9631
|
declare const index$3_CreateEvaluatorRequest: typeof CreateEvaluatorRequest;
|
|
7925
9632
|
type index$3_CreateLlmAsJudgeEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest;
|
|
7926
9633
|
type index$3_CreateLlmAsJudgeEvaluatorRequest = CreateLlmAsJudgeEvaluatorRequest;
|
|
@@ -7954,10 +9661,9 @@ declare const index$3_EvaluationRuleArrayOptionsFilterOperator: typeof Evaluatio
|
|
|
7954
9661
|
type index$3_EvaluationRuleBase = EvaluationRuleBase;
|
|
7955
9662
|
declare const index$3_EvaluationRuleBooleanFilterOperator: typeof EvaluationRuleBooleanFilterOperator;
|
|
7956
9663
|
type index$3_EvaluationRuleEvaluator = EvaluationRuleEvaluator;
|
|
9664
|
+
type index$3_EvaluationRuleEvaluatorAssignment = EvaluationRuleEvaluatorAssignment;
|
|
7957
9665
|
type index$3_EvaluationRuleEvaluatorReference = EvaluationRuleEvaluatorReference;
|
|
7958
9666
|
declare const index$3_EvaluationRuleFilter: typeof EvaluationRuleFilter;
|
|
7959
|
-
type index$3_EvaluationRuleMapping = EvaluationRuleMapping;
|
|
7960
|
-
declare const index$3_EvaluationRuleMappingSource: typeof EvaluationRuleMappingSource;
|
|
7961
9667
|
declare const index$3_EvaluationRuleNullFilterOperator: typeof EvaluationRuleNullFilterOperator;
|
|
7962
9668
|
declare const index$3_EvaluationRuleNumberFilterOperator: typeof EvaluationRuleNumberFilterOperator;
|
|
7963
9669
|
declare const index$3_EvaluationRuleOptionsFilterOperator: typeof EvaluationRuleOptionsFilterOperator;
|
|
@@ -7971,14 +9677,14 @@ type index$3_EvaluatorModelConfig = EvaluatorModelConfig;
|
|
|
7971
9677
|
declare const index$3_EvaluatorOutputDataType: typeof EvaluatorOutputDataType;
|
|
7972
9678
|
declare const index$3_EvaluatorOutputDefinition: typeof EvaluatorOutputDefinition;
|
|
7973
9679
|
type index$3_EvaluatorOutputFieldDefinition = EvaluatorOutputFieldDefinition;
|
|
7974
|
-
declare const index$3_EvaluatorScope: typeof EvaluatorScope;
|
|
7975
9680
|
declare const index$3_EvaluatorType: typeof EvaluatorType;
|
|
7976
9681
|
type index$3_InternalServerError = InternalServerError;
|
|
7977
9682
|
declare const index$3_InternalServerError: typeof InternalServerError;
|
|
7978
9683
|
declare const index$3_LegacyEvaluationObject: typeof LegacyEvaluationObject;
|
|
7979
9684
|
type index$3_LegacyEvaluationRule = LegacyEvaluationRule;
|
|
7980
|
-
type index$
|
|
9685
|
+
type index$3_LegacyEvaluationRuleEvaluatorAssignment = LegacyEvaluationRuleEvaluatorAssignment;
|
|
7981
9686
|
declare const index$3_LegacyEvaluationRuleTarget: typeof LegacyEvaluationRuleTarget;
|
|
9687
|
+
type index$3_LegacyPromptVariableMapping = LegacyPromptVariableMapping;
|
|
7982
9688
|
type index$3_ListDashboardWidgetsRequest = ListDashboardWidgetsRequest;
|
|
7983
9689
|
type index$3_ListDashboardsRequest = ListDashboardsRequest;
|
|
7984
9690
|
type index$3_ListEvaluationRulesRequest = ListEvaluationRulesRequest;
|
|
@@ -7994,6 +9700,9 @@ type index$3_NullEvaluationRuleFilter = NullEvaluationRuleFilter;
|
|
|
7994
9700
|
type index$3_NumberEvaluationRuleFilter = NumberEvaluationRuleFilter;
|
|
7995
9701
|
type index$3_NumberObjectEvaluationRuleFilter = NumberObjectEvaluationRuleFilter;
|
|
7996
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;
|
|
7997
9706
|
type index$3_PublicApiError = PublicApiError;
|
|
7998
9707
|
declare const index$3_PublicApiErrorCode: typeof PublicApiErrorCode;
|
|
7999
9708
|
type index$3_PublicApiErrorDetails = PublicApiErrorDetails;
|
|
@@ -8003,6 +9712,7 @@ type index$3_PublicCategoricalEvaluatorOutputDefinition = PublicCategoricalEvalu
|
|
|
8003
9712
|
type index$3_PublicCategoricalEvaluatorOutputScoreDefinition = PublicCategoricalEvaluatorOutputScoreDefinition;
|
|
8004
9713
|
declare const index$3_PublicEvaluatorOutputDefinition: typeof PublicEvaluatorOutputDefinition;
|
|
8005
9714
|
type index$3_PublicNumericEvaluatorOutputDefinition = PublicNumericEvaluatorOutputDefinition;
|
|
9715
|
+
type index$3_PublicNumericEvaluatorOutputScoreDefinition = PublicNumericEvaluatorOutputScoreDefinition;
|
|
8006
9716
|
type index$3_ReadableEvaluationRule = ReadableEvaluationRule;
|
|
8007
9717
|
type index$3_StringEvaluationRuleFilter = StringEvaluationRuleFilter;
|
|
8008
9718
|
type index$3_StringObjectEvaluationRuleFilter = StringObjectEvaluationRuleFilter;
|
|
@@ -8019,7 +9729,7 @@ type index$3_UpdateDashboardWidgetRequest = UpdateDashboardWidgetRequest;
|
|
|
8019
9729
|
type index$3_UpdateEvaluationRuleRequest = UpdateEvaluationRuleRequest;
|
|
8020
9730
|
type index$3_WidgetPlacement = WidgetPlacement;
|
|
8021
9731
|
declare namespace index$3 {
|
|
8022
|
-
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 };
|
|
8023
9733
|
}
|
|
8024
9734
|
|
|
8025
9735
|
/**
|
|
@@ -8617,14 +10327,268 @@ declare class DatasetItems {
|
|
|
8617
10327
|
* @example
|
|
8618
10328
|
* await client.datasetItems.get("id")
|
|
8619
10329
|
*/
|
|
8620
|
-
get(id: string, requestOptions?: DatasetItems.RequestOptions): HttpResponsePromise<DatasetItem>;
|
|
8621
|
-
private __get;
|
|
10330
|
+
get(id: string, requestOptions?: DatasetItems.RequestOptions): HttpResponsePromise<DatasetItem>;
|
|
10331
|
+
private __get;
|
|
10332
|
+
/**
|
|
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;
|
|
8622
10584
|
/**
|
|
8623
|
-
*
|
|
8624
|
-
* Note: If version parameter is provided, datasetName must also be provided.
|
|
10585
|
+
* Delete a dataset run and all its run items. This action is irreversible.
|
|
8625
10586
|
*
|
|
8626
|
-
* @
|
|
8627
|
-
*
|
|
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.
|
|
8628
10592
|
*
|
|
8629
10593
|
* @throws {@link LangfuseAPI.Error}
|
|
8630
10594
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
@@ -8633,15 +10597,18 @@ declare class DatasetItems {
|
|
|
8633
10597
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8634
10598
|
*
|
|
8635
10599
|
* @example
|
|
8636
|
-
* await client.
|
|
10600
|
+
* await client.datasets.deleteRun("datasetName", "runName")
|
|
8637
10601
|
*/
|
|
8638
|
-
|
|
8639
|
-
private
|
|
10602
|
+
deleteRun(datasetName: string, runName: string, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DeleteDatasetRunResponse>;
|
|
10603
|
+
private __deleteRun;
|
|
8640
10604
|
/**
|
|
8641
|
-
*
|
|
10605
|
+
* Get dataset runs
|
|
8642
10606
|
*
|
|
8643
|
-
* @
|
|
8644
|
-
*
|
|
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.
|
|
8645
10612
|
*
|
|
8646
10613
|
* @throws {@link LangfuseAPI.Error}
|
|
8647
10614
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
@@ -8650,10 +10617,10 @@ declare class DatasetItems {
|
|
|
8650
10617
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8651
10618
|
*
|
|
8652
10619
|
* @example
|
|
8653
|
-
* await client.
|
|
10620
|
+
* await client.datasets.getRuns("datasetName")
|
|
8654
10621
|
*/
|
|
8655
|
-
|
|
8656
|
-
private
|
|
10622
|
+
getRuns(datasetName: string, request?: GetDatasetRunsRequest, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<PaginatedDatasetRuns>;
|
|
10623
|
+
private __getRuns;
|
|
8657
10624
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
8658
10625
|
}
|
|
8659
10626
|
|
|
@@ -8661,7 +10628,7 @@ declare class DatasetItems {
|
|
|
8661
10628
|
* This file was auto-generated by Fern from our API Definition.
|
|
8662
10629
|
*/
|
|
8663
10630
|
|
|
8664
|
-
declare namespace
|
|
10631
|
+
declare namespace EvaluationRules$1 {
|
|
8665
10632
|
interface Options {
|
|
8666
10633
|
environment: Supplier<string>;
|
|
8667
10634
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -8696,15 +10663,33 @@ declare namespace DatasetRunItems {
|
|
|
8696
10663
|
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
8697
10664
|
}
|
|
8698
10665
|
}
|
|
8699
|
-
declare class
|
|
8700
|
-
protected readonly _options:
|
|
8701
|
-
constructor(_options:
|
|
10666
|
+
declare class EvaluationRules$1 {
|
|
10667
|
+
protected readonly _options: EvaluationRules$1.Options;
|
|
10668
|
+
constructor(_options: EvaluationRules$1.Options);
|
|
8702
10669
|
/**
|
|
8703
|
-
* Create
|
|
10670
|
+
* Create an evaluation rule using stable evaluator identifiers.
|
|
8704
10671
|
*
|
|
8705
|
-
*
|
|
8706
|
-
*
|
|
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
|
|
10681
|
+
*
|
|
10682
|
+
* @param {LangfuseAPI.CreateEvaluationRuleRequest} request
|
|
10683
|
+
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
8707
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}
|
|
8708
10693
|
* @throws {@link LangfuseAPI.Error}
|
|
8709
10694
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8710
10695
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8712,25 +10697,36 @@ declare class DatasetRunItems {
|
|
|
8712
10697
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8713
10698
|
*
|
|
8714
10699
|
* @example
|
|
8715
|
-
* await client.
|
|
8716
|
-
*
|
|
8717
|
-
*
|
|
8718
|
-
*
|
|
8719
|
-
*
|
|
8720
|
-
*
|
|
8721
|
-
*
|
|
8722
|
-
*
|
|
8723
|
-
*
|
|
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
|
+
* }]
|
|
8724
10712
|
* })
|
|
8725
10713
|
*/
|
|
8726
|
-
create(request:
|
|
10714
|
+
create(request: CreateEvaluationRuleRequest$1, requestOptions?: EvaluationRules$1.RequestOptions): HttpResponsePromise<EvaluationRule$1>;
|
|
8727
10715
|
private __create;
|
|
8728
10716
|
/**
|
|
8729
|
-
* List
|
|
10717
|
+
* List evaluation rules in newest-first creation order.
|
|
8730
10718
|
*
|
|
8731
|
-
*
|
|
8732
|
-
*
|
|
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.
|
|
8733
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}
|
|
8734
10730
|
* @throws {@link LangfuseAPI.Error}
|
|
8735
10731
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8736
10732
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8738,13 +10734,96 @@ declare class DatasetRunItems {
|
|
|
8738
10734
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8739
10735
|
*
|
|
8740
10736
|
* @example
|
|
8741
|
-
* await client.
|
|
8742
|
-
* datasetId: "datasetId",
|
|
8743
|
-
* runName: "runName"
|
|
8744
|
-
* })
|
|
10737
|
+
* await client.evaluationRules.list()
|
|
8745
10738
|
*/
|
|
8746
|
-
list(request
|
|
10739
|
+
list(request?: ListEvaluationRulesRequest$1, requestOptions?: EvaluationRules$1.RequestOptions): HttpResponsePromise<EvaluationRulesPage>;
|
|
8747
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;
|
|
8748
10827
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
8749
10828
|
}
|
|
8750
10829
|
|
|
@@ -8752,7 +10831,7 @@ declare class DatasetRunItems {
|
|
|
8752
10831
|
* This file was auto-generated by Fern from our API Definition.
|
|
8753
10832
|
*/
|
|
8754
10833
|
|
|
8755
|
-
declare namespace
|
|
10834
|
+
declare namespace Evaluators$1 {
|
|
8756
10835
|
interface Options {
|
|
8757
10836
|
environment: Supplier<string>;
|
|
8758
10837
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -8787,15 +10866,26 @@ declare namespace Datasets {
|
|
|
8787
10866
|
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
8788
10867
|
}
|
|
8789
10868
|
}
|
|
8790
|
-
declare class
|
|
8791
|
-
protected readonly _options:
|
|
8792
|
-
constructor(_options:
|
|
10869
|
+
declare class Evaluators$1 {
|
|
10870
|
+
protected readonly _options: Evaluators$1.Options;
|
|
10871
|
+
constructor(_options: Evaluators$1.Options);
|
|
8793
10872
|
/**
|
|
8794
|
-
*
|
|
10873
|
+
* Create an evaluator in the authenticated project.
|
|
8795
10874
|
*
|
|
8796
|
-
*
|
|
8797
|
-
*
|
|
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.
|
|
8798
10878
|
*
|
|
10879
|
+
* @param {LangfuseAPI.CreateEvaluatorRequest} request
|
|
10880
|
+
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
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}
|
|
8799
10889
|
* @throws {@link LangfuseAPI.Error}
|
|
8800
10890
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8801
10891
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8803,16 +10893,40 @@ declare class Datasets {
|
|
|
8803
10893
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8804
10894
|
*
|
|
8805
10895
|
* @example
|
|
8806
|
-
* 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
|
+
* })
|
|
8807
10913
|
*/
|
|
8808
|
-
|
|
8809
|
-
private
|
|
10914
|
+
create(request: CreateEvaluatorRequest$1, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<Evaluator$1>;
|
|
10915
|
+
private __create;
|
|
8810
10916
|
/**
|
|
8811
|
-
*
|
|
10917
|
+
* List evaluators in newest-first creation order.
|
|
8812
10918
|
*
|
|
8813
|
-
*
|
|
8814
|
-
*
|
|
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.
|
|
10920
|
+
*
|
|
10921
|
+
* @param {LangfuseAPI.ListEvaluatorsRequest} request
|
|
10922
|
+
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
8815
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}
|
|
8816
10930
|
* @throws {@link LangfuseAPI.Error}
|
|
8817
10931
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8818
10932
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8820,16 +10934,24 @@ declare class Datasets {
|
|
|
8820
10934
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8821
10935
|
*
|
|
8822
10936
|
* @example
|
|
8823
|
-
* await client.
|
|
10937
|
+
* await client.evaluators.list()
|
|
8824
10938
|
*/
|
|
8825
|
-
|
|
8826
|
-
private
|
|
10939
|
+
list(request?: ListEvaluatorsRequest$1, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<EvaluatorsPage>;
|
|
10940
|
+
private __list;
|
|
8827
10941
|
/**
|
|
8828
|
-
*
|
|
10942
|
+
* Get one evaluator by its stable identifier.
|
|
8829
10943
|
*
|
|
8830
|
-
*
|
|
8831
|
-
*
|
|
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.
|
|
8832
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}
|
|
8833
10955
|
* @throws {@link LangfuseAPI.Error}
|
|
8834
10956
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8835
10957
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8837,23 +10959,32 @@ declare class Datasets {
|
|
|
8837
10959
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8838
10960
|
*
|
|
8839
10961
|
* @example
|
|
8840
|
-
* await client.
|
|
8841
|
-
* name: "name",
|
|
8842
|
-
* description: undefined,
|
|
8843
|
-
* metadata: undefined,
|
|
8844
|
-
* inputSchema: undefined,
|
|
8845
|
-
* expectedOutputSchema: undefined
|
|
8846
|
-
* })
|
|
10962
|
+
* await client.evaluators.get("evaluatorId")
|
|
8847
10963
|
*/
|
|
8848
|
-
|
|
8849
|
-
private
|
|
10964
|
+
get(evaluatorId: string, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<Evaluator$1>;
|
|
10965
|
+
private __get;
|
|
8850
10966
|
/**
|
|
8851
|
-
*
|
|
10967
|
+
* Update an evaluator by its stable identifier.
|
|
8852
10968
|
*
|
|
8853
|
-
*
|
|
8854
|
-
*
|
|
8855
|
-
*
|
|
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.
|
|
8856
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.
|
|
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}
|
|
8857
10988
|
* @throws {@link LangfuseAPI.Error}
|
|
8858
10989
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8859
10990
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8861,17 +10992,27 @@ declare class Datasets {
|
|
|
8861
10992
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8862
10993
|
*
|
|
8863
10994
|
* @example
|
|
8864
|
-
* await client.
|
|
10995
|
+
* await client.evaluators.update("evaluatorId", {
|
|
10996
|
+
* name: undefined,
|
|
10997
|
+
* description: undefined
|
|
10998
|
+
* })
|
|
8865
10999
|
*/
|
|
8866
|
-
|
|
8867
|
-
private
|
|
11000
|
+
update(evaluatorId: string, request: UpdateEvaluatorRequest, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<Evaluator$1>;
|
|
11001
|
+
private __update;
|
|
8868
11002
|
/**
|
|
8869
|
-
* Delete
|
|
11003
|
+
* Delete an evaluator and all of its stored versions.
|
|
8870
11004
|
*
|
|
8871
|
-
*
|
|
8872
|
-
*
|
|
8873
|
-
* @param {
|
|
11005
|
+
* Associated evaluation-rule assignments are also removed. Scores already produced by the evaluator are preserved.
|
|
11006
|
+
*
|
|
11007
|
+
* @param {string} evaluatorId - Stable evaluator identifier returned by the evaluator endpoints.
|
|
11008
|
+
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
8874
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}
|
|
8875
11016
|
* @throws {@link LangfuseAPI.Error}
|
|
8876
11017
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8877
11018
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8879,17 +11020,26 @@ declare class Datasets {
|
|
|
8879
11020
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8880
11021
|
*
|
|
8881
11022
|
* @example
|
|
8882
|
-
* await client.
|
|
11023
|
+
* await client.evaluators.delete("evaluatorId")
|
|
8883
11024
|
*/
|
|
8884
|
-
|
|
8885
|
-
private
|
|
11025
|
+
delete(evaluatorId: string, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<DeletedEvaluator>;
|
|
11026
|
+
private __delete;
|
|
8886
11027
|
/**
|
|
8887
|
-
*
|
|
11028
|
+
* List an evaluator's version history in newest-first order.
|
|
8888
11029
|
*
|
|
8889
|
-
*
|
|
8890
|
-
* @param {LangfuseAPI.GetDatasetRunsRequest} request
|
|
8891
|
-
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
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.
|
|
8892
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.
|
|
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}
|
|
8893
11043
|
* @throws {@link LangfuseAPI.Error}
|
|
8894
11044
|
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
8895
11045
|
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
@@ -8897,10 +11047,10 @@ declare class Datasets {
|
|
|
8897
11047
|
* @throws {@link LangfuseAPI.NotFoundError}
|
|
8898
11048
|
*
|
|
8899
11049
|
* @example
|
|
8900
|
-
* await client.
|
|
11050
|
+
* await client.evaluators.listVersions("evaluatorId")
|
|
8901
11051
|
*/
|
|
8902
|
-
|
|
8903
|
-
private
|
|
11052
|
+
listVersions(evaluatorId: string, request?: ListEvaluatorVersionsRequest, requestOptions?: Evaluators$1.RequestOptions): HttpResponsePromise<EvaluatorVersionsPage>;
|
|
11053
|
+
private __listVersions;
|
|
8904
11054
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
8905
11055
|
}
|
|
8906
11056
|
|
|
@@ -9036,6 +11186,8 @@ declare class Feedback {
|
|
|
9036
11186
|
/**
|
|
9037
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.
|
|
9038
11188
|
*
|
|
11189
|
+
* Not available in the HIPAA cloud region.
|
|
11190
|
+
*
|
|
9039
11191
|
* @param {LangfuseAPI.SubmitFeedbackRequest} request
|
|
9040
11192
|
* @param {Feedback.RequestOptions} requestOptions - Request-specific configuration.
|
|
9041
11193
|
*
|
|
@@ -9181,6 +11333,8 @@ declare class Ingestion {
|
|
|
9181
11333
|
* - Batch sizes are limited to 3.5 MB in total. You need to adjust the number of events per batch accordingly.
|
|
9182
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.
|
|
9183
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
|
+
*
|
|
9184
11338
|
* @param {LangfuseAPI.IngestionRequest} request
|
|
9185
11339
|
* @param {Ingestion.RequestOptions} requestOptions - Request-specific configuration.
|
|
9186
11340
|
*
|
|
@@ -9299,6 +11453,8 @@ declare class MetricsV1 {
|
|
|
9299
11453
|
*
|
|
9300
11454
|
* For more details, see the [Metrics API documentation](https://langfuse.com/docs/metrics/features/metrics-api).
|
|
9301
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
|
+
*
|
|
9302
11458
|
* @param {LangfuseAPI.legacy.GetMetricsRequest} request
|
|
9303
11459
|
* @param {MetricsV1.RequestOptions} requestOptions - Request-specific configuration.
|
|
9304
11460
|
*
|
|
@@ -9363,6 +11519,8 @@ declare class ObservationsV1 {
|
|
|
9363
11519
|
/**
|
|
9364
11520
|
* Get a observation
|
|
9365
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
|
+
*
|
|
9366
11524
|
* @param {string} observationId - The unique langfuse identifier of an observation, can be an event, span or generation
|
|
9367
11525
|
* @param {ObservationsV1.RequestOptions} requestOptions - Request-specific configuration.
|
|
9368
11526
|
*
|
|
@@ -9382,6 +11540,8 @@ declare class ObservationsV1 {
|
|
|
9382
11540
|
*
|
|
9383
11541
|
* Consider using the [v2 observations endpoint](/api-reference#tag/observationsv2/GET/api/public/v2/observations) for cursor-based pagination and field selection.
|
|
9384
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
|
+
*
|
|
9385
11545
|
* @param {LangfuseAPI.legacy.GetObservationsRequest} request
|
|
9386
11546
|
* @param {ObservationsV1.RequestOptions} requestOptions - Request-specific configuration.
|
|
9387
11547
|
*
|
|
@@ -9951,7 +12111,7 @@ declare class Models {
|
|
|
9951
12111
|
* modelName: "modelName",
|
|
9952
12112
|
* matchPattern: "matchPattern",
|
|
9953
12113
|
* startDate: undefined,
|
|
9954
|
-
* unit:
|
|
12114
|
+
* unit: "CHARACTERS",
|
|
9955
12115
|
* inputPrice: undefined,
|
|
9956
12116
|
* outputPrice: undefined,
|
|
9957
12117
|
* totalPrice: undefined,
|
|
@@ -9962,6 +12122,35 @@ declare class Models {
|
|
|
9962
12122
|
*/
|
|
9963
12123
|
create(request: CreateModelRequest, requestOptions?: Models.RequestOptions): HttpResponsePromise<Model>;
|
|
9964
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;
|
|
9965
12154
|
/**
|
|
9966
12155
|
* Get all models
|
|
9967
12156
|
*
|
|
@@ -11236,6 +13425,8 @@ declare class Scores {
|
|
|
11236
13425
|
/**
|
|
11237
13426
|
* Get a list of scores (supports both trace and session scores)
|
|
11238
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
|
+
*
|
|
11239
13430
|
* @param {LangfuseAPI.GetScoresRequest} request
|
|
11240
13431
|
* @param {Scores.RequestOptions} requestOptions - Request-specific configuration.
|
|
11241
13432
|
*
|
|
@@ -11253,6 +13444,8 @@ declare class Scores {
|
|
|
11253
13444
|
/**
|
|
11254
13445
|
* Get a score (supports both trace and session scores)
|
|
11255
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
|
+
*
|
|
11256
13449
|
* @param {string} scoreId - The unique langfuse identifier of a score
|
|
11257
13450
|
* @param {Scores.RequestOptions} requestOptions - Request-specific configuration.
|
|
11258
13451
|
*
|
|
@@ -11320,6 +13513,8 @@ declare class Sessions {
|
|
|
11320
13513
|
* `sessionId` instead:
|
|
11321
13514
|
* `GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`.
|
|
11322
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
|
+
*
|
|
11323
13518
|
* @param {LangfuseAPI.GetSessionsRequest} request
|
|
11324
13519
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
11325
13520
|
*
|
|
@@ -11342,6 +13537,8 @@ declare class Sessions {
|
|
|
11342
13537
|
* with a URL-encoded `sessionId` filter and a bounded time range:
|
|
11343
13538
|
* `GET /api/public/v2/observations?filter=<sessionId filter>&fromStartTime=<from>&toStartTime=<to>`.
|
|
11344
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
|
+
*
|
|
11345
13542
|
* @param {string} sessionId - The unique id of a session
|
|
11346
13543
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
11347
13544
|
*
|
|
@@ -11404,6 +13601,8 @@ declare class Trace {
|
|
|
11404
13601
|
/**
|
|
11405
13602
|
* Get a specific trace
|
|
11406
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
|
+
*
|
|
11407
13606
|
* @param {string} traceId - The unique langfuse identifier of a trace
|
|
11408
13607
|
* @param {LangfuseAPI.GetTraceRequest} request
|
|
11409
13608
|
* @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -11439,6 +13638,8 @@ declare class Trace {
|
|
|
11439
13638
|
/**
|
|
11440
13639
|
* Get list of traces
|
|
11441
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
|
+
*
|
|
11442
13643
|
* @param {LangfuseAPI.GetTracesRequest} request
|
|
11443
13644
|
* @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
|
|
11444
13645
|
*
|
|
@@ -12027,19 +14228,21 @@ declare class EvaluationRules {
|
|
|
12027
14228
|
* Key rules:
|
|
12028
14229
|
* - `name` must be unique within the project for public evaluation rules
|
|
12029
14230
|
* - `target` must be `observation` or `experiment`
|
|
12030
|
-
* -
|
|
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
|
|
12031
14233
|
* - Langfuse resolves that family to its latest version before saving the evaluation rule
|
|
12032
14234
|
* - for `target=experiment`, use dataset `id` values from `GET /api/public/v2/datasets` when filtering by `datasetId`
|
|
12033
|
-
* -
|
|
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
|
|
12034
14237
|
* - for `code` evaluators, Langfuse uses the fixed code runtime mapping; omit `mapping` in create and update requests
|
|
12035
14238
|
* - for user-provided `llm_as_judge` mappings, `expected_output` and `experiment_item_metadata` are only valid for `target=experiment`
|
|
12036
14239
|
* - if `enabled=true`, Langfuse validates that the referenced evaluator can currently run
|
|
12037
|
-
* - 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)
|
|
12038
14241
|
*
|
|
12039
14242
|
* If an evaluation rule with the same `name` already exists in the project, the API returns `409`.
|
|
12040
14243
|
* In that case, update the existing resource with `PATCH /api/public/unstable/evaluation-rules/{evaluationRuleId}` instead of creating a second one.
|
|
12041
14244
|
*
|
|
12042
|
-
* If enabling this resource would exceed the
|
|
14245
|
+
* If enabling this resource would exceed the 500-active limit, the API also returns `409`.
|
|
12043
14246
|
* In that case, disable or pause another active evaluation rule before enabling a new one.
|
|
12044
14247
|
*
|
|
12045
14248
|
* Current scope:
|
|
@@ -12055,6 +14258,8 @@ declare class EvaluationRules {
|
|
|
12055
14258
|
* - `400 invalid_json_path`: remove or correct the `jsonPath`
|
|
12056
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.
|
|
12057
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
|
+
*
|
|
12058
14263
|
* @param {LangfuseAPI.unstable.CreateEvaluationRuleRequest} request
|
|
12059
14264
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
12060
14265
|
*
|
|
@@ -12078,7 +14283,6 @@ declare class EvaluationRules {
|
|
|
12078
14283
|
* name: "answer-correctness-live",
|
|
12079
14284
|
* evaluator: {
|
|
12080
14285
|
* name: "answer-correctness",
|
|
12081
|
-
* scope: "project",
|
|
12082
14286
|
* type: "llm_as_judge"
|
|
12083
14287
|
* },
|
|
12084
14288
|
* target: "observation",
|
|
@@ -12104,7 +14308,6 @@ declare class EvaluationRules {
|
|
|
12104
14308
|
* name: "toxicity-code-live",
|
|
12105
14309
|
* evaluator: {
|
|
12106
14310
|
* name: "toxicity-detector",
|
|
12107
|
-
* scope: "project",
|
|
12108
14311
|
* type: "code"
|
|
12109
14312
|
* },
|
|
12110
14313
|
* target: "observation",
|
|
@@ -12123,7 +14326,6 @@ declare class EvaluationRules {
|
|
|
12123
14326
|
* name: "experiment-expected-output-match",
|
|
12124
14327
|
* evaluator: {
|
|
12125
14328
|
* name: "expected-output-match",
|
|
12126
|
-
* scope: "project",
|
|
12127
14329
|
* type: "llm_as_judge"
|
|
12128
14330
|
* },
|
|
12129
14331
|
* target: "experiment",
|
|
@@ -12151,6 +14353,8 @@ declare class EvaluationRules {
|
|
|
12151
14353
|
*
|
|
12152
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.
|
|
12153
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
|
+
*
|
|
12154
14358
|
* @param {LangfuseAPI.unstable.ListEvaluationRulesRequest} request
|
|
12155
14359
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
12156
14360
|
*
|
|
@@ -12169,13 +14373,15 @@ declare class EvaluationRules {
|
|
|
12169
14373
|
* @example
|
|
12170
14374
|
* await client.unstable.evaluationRules.list()
|
|
12171
14375
|
*/
|
|
12172
|
-
list(request?: ListEvaluationRulesRequest, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<EvaluationRules$
|
|
14376
|
+
list(request?: ListEvaluationRulesRequest, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<EvaluationRules$2>;
|
|
12173
14377
|
private __list;
|
|
12174
14378
|
/**
|
|
12175
14379
|
* Get one evaluation rule by its identifier.
|
|
12176
14380
|
*
|
|
12177
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.
|
|
12178
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
|
+
*
|
|
12179
14385
|
* @param {string} evaluationRuleId - Evaluation rule identifier returned by the evaluation rule endpoints.
|
|
12180
14386
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
12181
14387
|
*
|
|
@@ -12214,12 +14420,14 @@ declare class EvaluationRules {
|
|
|
12214
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
|
|
12215
14421
|
* - for `code` evaluator rules, omit `mapping`; Langfuse stores the fixed code runtime mapping automatically
|
|
12216
14422
|
* - if the resulting config is enabled, Langfuse re-validates that the selected evaluator can run
|
|
12217
|
-
* - 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`
|
|
12218
14424
|
*
|
|
12219
14425
|
* Recovery guidance:
|
|
12220
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`
|
|
12221
14427
|
* - if the update fails with `invalid_filter_value` after changing `target`, resend the request with a target-compatible `filter`
|
|
12222
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
|
+
*
|
|
12223
14431
|
* @param {string} evaluationRuleId - Evaluation rule identifier.
|
|
12224
14432
|
* @param {LangfuseAPI.unstable.UpdateEvaluationRuleRequest} request
|
|
12225
14433
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12241,6 +14449,7 @@ declare class EvaluationRules {
|
|
|
12241
14449
|
* @example
|
|
12242
14450
|
* await client.unstable.evaluationRules.update("evaluationRuleId", {
|
|
12243
14451
|
* name: undefined,
|
|
14452
|
+
* evaluators: undefined,
|
|
12244
14453
|
* evaluator: undefined,
|
|
12245
14454
|
* target: undefined,
|
|
12246
14455
|
* enabled: undefined,
|
|
@@ -12256,6 +14465,8 @@ declare class EvaluationRules {
|
|
|
12256
14465
|
*
|
|
12257
14466
|
* This removes the live-ingestion rule only. It does not delete the referenced evaluator.
|
|
12258
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
|
+
*
|
|
12259
14470
|
* @param {string} evaluationRuleId - Evaluation rule identifier.
|
|
12260
14471
|
* @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
12261
14472
|
*
|
|
@@ -12332,13 +14543,14 @@ declare class Evaluators {
|
|
|
12332
14543
|
* Naming behavior:
|
|
12333
14544
|
* - If this is a new evaluator name in your project, Langfuse creates version `1`.
|
|
12334
14545
|
* - If the name already exists in your project, Langfuse creates the next version and returns it.
|
|
12335
|
-
* -
|
|
14546
|
+
* - The evaluator `id` remains stable across versions.
|
|
14547
|
+
* - Existing evaluation rules automatically use the latest evaluator version; no rule update is required.
|
|
12336
14548
|
*
|
|
12337
14549
|
* Recommended workflow:
|
|
12338
14550
|
* 1. Create the evaluator.
|
|
12339
14551
|
* 2. Read the returned `variables` array.
|
|
12340
14552
|
* 3. Read the returned `outputDefinition.dataType` so the client knows whether future scores will be numeric, boolean, or categorical.
|
|
12341
|
-
* 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`.
|
|
12342
14554
|
*
|
|
12343
14555
|
* Code evaluator validation:
|
|
12344
14556
|
* - At creation, Langfuse only validates the request shape
|
|
@@ -12353,6 +14565,8 @@ declare class Evaluators {
|
|
|
12353
14565
|
* Unstable API note:
|
|
12354
14566
|
* - This surface may evolve while the underlying evaluation data model is being redesigned.
|
|
12355
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
|
+
*
|
|
12356
14570
|
* @param {LangfuseAPI.unstable.CreateEvaluatorRequest} request
|
|
12357
14571
|
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
12358
14572
|
*
|
|
@@ -12388,7 +14602,14 @@ declare class Evaluators {
|
|
|
12388
14602
|
* modelConfig: {
|
|
12389
14603
|
* provider: "openai",
|
|
12390
14604
|
* model: "gpt-4.1-mini"
|
|
12391
|
-
* }
|
|
14605
|
+
* },
|
|
14606
|
+
* mapping: [{
|
|
14607
|
+
* variable: "input",
|
|
14608
|
+
* source: "input"
|
|
14609
|
+
* }, {
|
|
14610
|
+
* variable: "output",
|
|
14611
|
+
* source: "output"
|
|
14612
|
+
* }]
|
|
12392
14613
|
* })
|
|
12393
14614
|
*
|
|
12394
14615
|
* @example
|
|
@@ -12414,8 +14635,9 @@ declare class Evaluators {
|
|
|
12414
14635
|
*
|
|
12415
14636
|
* Important behavior:
|
|
12416
14637
|
* - This endpoint returns the latest version of each available evaluator.
|
|
12417
|
-
* -
|
|
12418
|
-
*
|
|
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.
|
|
12419
14641
|
*
|
|
12420
14642
|
* @param {LangfuseAPI.unstable.ListEvaluatorsRequest} request
|
|
12421
14643
|
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12435,12 +14657,14 @@ declare class Evaluators {
|
|
|
12435
14657
|
* @example
|
|
12436
14658
|
* await client.unstable.evaluators.list()
|
|
12437
14659
|
*/
|
|
12438
|
-
list(request?: ListEvaluatorsRequest, requestOptions?: Evaluators.RequestOptions): HttpResponsePromise<Evaluators$
|
|
14660
|
+
list(request?: ListEvaluatorsRequest, requestOptions?: Evaluators.RequestOptions): HttpResponsePromise<Evaluators$2>;
|
|
12439
14661
|
private __list;
|
|
12440
14662
|
/**
|
|
12441
14663
|
* Get one evaluator by `id`.
|
|
12442
14664
|
*
|
|
12443
|
-
* 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.
|
|
12444
14668
|
*
|
|
12445
14669
|
* @param {string} evaluatorId - Evaluator identifier returned by the evaluator endpoints.
|
|
12446
14670
|
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12467,11 +14691,12 @@ declare class Evaluators {
|
|
|
12467
14691
|
* Delete an evaluator.
|
|
12468
14692
|
*
|
|
12469
14693
|
* Important behavior:
|
|
12470
|
-
* - This deletes the evaluator including all of its stored versions
|
|
12471
|
-
* -
|
|
12472
|
-
* - 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.
|
|
12473
14696
|
* - Scores already produced by the evaluator are not deleted.
|
|
12474
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
|
+
*
|
|
12475
14700
|
* @param {string} evaluatorId - Evaluator identifier returned by the evaluator endpoints.
|
|
12476
14701
|
* @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
|
|
12477
14702
|
*
|
|
@@ -12480,7 +14705,6 @@ declare class Evaluators {
|
|
|
12480
14705
|
* @throws {@link LangfuseAPI.unstable.AccessDeniedError}
|
|
12481
14706
|
* @throws {@link LangfuseAPI.unstable.NotFoundError}
|
|
12482
14707
|
* @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
|
|
12483
|
-
* @throws {@link LangfuseAPI.unstable.ConflictError}
|
|
12484
14708
|
* @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
|
|
12485
14709
|
* @throws {@link LangfuseAPI.unstable.InternalServerError}
|
|
12486
14710
|
* @throws {@link LangfuseAPI.Error}
|
|
@@ -12578,6 +14802,8 @@ declare class LangfuseAPIClient {
|
|
|
12578
14802
|
protected _datasetItems: DatasetItems | undefined;
|
|
12579
14803
|
protected _datasetRunItems: DatasetRunItems | undefined;
|
|
12580
14804
|
protected _datasets: Datasets | undefined;
|
|
14805
|
+
protected _evaluationRules: EvaluationRules$1 | undefined;
|
|
14806
|
+
protected _evaluators: Evaluators$1 | undefined;
|
|
12581
14807
|
protected _experiments: Experiments | undefined;
|
|
12582
14808
|
protected _feedback: Feedback | undefined;
|
|
12583
14809
|
protected _health: Health | undefined;
|
|
@@ -12607,6 +14833,8 @@ declare class LangfuseAPIClient {
|
|
|
12607
14833
|
get datasetItems(): DatasetItems;
|
|
12608
14834
|
get datasetRunItems(): DatasetRunItems;
|
|
12609
14835
|
get datasets(): Datasets;
|
|
14836
|
+
get evaluationRules(): EvaluationRules$1;
|
|
14837
|
+
get evaluators(): Evaluators$1;
|
|
12610
14838
|
get experiments(): Experiments;
|
|
12611
14839
|
get feedback(): Feedback;
|
|
12612
14840
|
get health(): Health;
|
|
@@ -13248,4 +15476,4 @@ interface PropagateAttributesParams {
|
|
|
13248
15476
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
13249
15477
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[] | number>;
|
|
13250
15478
|
|
|
13251
|
-
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 };
|