@langfuse/client 4.2.0 → 4.2.1
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 +3 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +3 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -68,7 +68,7 @@ type ExperimentTaskParams<Input = any, ExpectedOutput = any, Metadata extends Re
|
|
|
68
68
|
* @since 4.1.0
|
|
69
69
|
*/
|
|
70
70
|
type ExperimentTask<Input = any, ExpectedOutput = any, Metadata extends Record<string, any> = Record<string, any>> = (params: ExperimentTaskParams<Input, ExpectedOutput, Metadata>) => Promise<any>;
|
|
71
|
-
type Evaluation = Pick<ScoreBody, "name" | "value" | "comment" | "metadata" | "dataType">;
|
|
71
|
+
type Evaluation = Pick<ScoreBody, "name" | "value" | "comment" | "metadata" | "dataType" | "configId">;
|
|
72
72
|
type EvaluatorParams<Input = any, ExpectedOutput = any, Metadata extends Record<string, any> = Record<string, any>> = {
|
|
73
73
|
/**
|
|
74
74
|
* The original input data passed to the task.
|
|
@@ -621,7 +621,7 @@ declare class ExperimentManager {
|
|
|
621
621
|
* @param config.task - Function that processes each data item and returns output
|
|
622
622
|
* @param config.evaluators - Optional array of functions to evaluate each item's output
|
|
623
623
|
* @param config.runEvaluators - Optional array of functions to evaluate the entire run
|
|
624
|
-
* @param config.maxConcurrency - Maximum number of concurrent task executions (default:
|
|
624
|
+
* @param config.maxConcurrency - Maximum number of concurrent task executions (default: 50)
|
|
625
625
|
*
|
|
626
626
|
* @returns Promise that resolves to experiment results including:
|
|
627
627
|
* - runName: The experiment run name (either provided or generated)
|
package/dist/index.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ type ExperimentTaskParams<Input = any, ExpectedOutput = any, Metadata extends Re
|
|
|
68
68
|
* @since 4.1.0
|
|
69
69
|
*/
|
|
70
70
|
type ExperimentTask<Input = any, ExpectedOutput = any, Metadata extends Record<string, any> = Record<string, any>> = (params: ExperimentTaskParams<Input, ExpectedOutput, Metadata>) => Promise<any>;
|
|
71
|
-
type Evaluation = Pick<ScoreBody, "name" | "value" | "comment" | "metadata" | "dataType">;
|
|
71
|
+
type Evaluation = Pick<ScoreBody, "name" | "value" | "comment" | "metadata" | "dataType" | "configId">;
|
|
72
72
|
type EvaluatorParams<Input = any, ExpectedOutput = any, Metadata extends Record<string, any> = Record<string, any>> = {
|
|
73
73
|
/**
|
|
74
74
|
* The original input data passed to the task.
|
|
@@ -621,7 +621,7 @@ declare class ExperimentManager {
|
|
|
621
621
|
* @param config.task - Function that processes each data item and returns output
|
|
622
622
|
* @param config.evaluators - Optional array of functions to evaluate each item's output
|
|
623
623
|
* @param config.runEvaluators - Optional array of functions to evaluate the entire run
|
|
624
|
-
* @param config.maxConcurrency - Maximum number of concurrent task executions (default:
|
|
624
|
+
* @param config.maxConcurrency - Maximum number of concurrent task executions (default: 50)
|
|
625
625
|
*
|
|
626
626
|
* @returns Promise that resolves to experiment results including:
|
|
627
627
|
* - runName: The experiment run name (either provided or generated)
|
package/dist/index.mjs
CHANGED
|
@@ -192,7 +192,7 @@ var ExperimentManager = class {
|
|
|
192
192
|
* @param config.task - Function that processes each data item and returns output
|
|
193
193
|
* @param config.evaluators - Optional array of functions to evaluate each item's output
|
|
194
194
|
* @param config.runEvaluators - Optional array of functions to evaluate the entire run
|
|
195
|
-
* @param config.maxConcurrency - Maximum number of concurrent task executions (default:
|
|
195
|
+
* @param config.maxConcurrency - Maximum number of concurrent task executions (default: 50)
|
|
196
196
|
*
|
|
197
197
|
* @returns Promise that resolves to experiment results including:
|
|
198
198
|
* - runName: The experiment run name (either provided or generated)
|
|
@@ -255,7 +255,7 @@ var ExperimentManager = class {
|
|
|
255
255
|
runName: providedRunName,
|
|
256
256
|
description,
|
|
257
257
|
metadata,
|
|
258
|
-
maxConcurrency: batchSize =
|
|
258
|
+
maxConcurrency: batchSize = 50,
|
|
259
259
|
runEvaluators
|
|
260
260
|
} = config;
|
|
261
261
|
const runName = this.createExperimentRunName({
|
|
@@ -451,11 +451,7 @@ ${JSON.stringify(params2)}
|
|
|
451
451
|
for (const ev of evals) {
|
|
452
452
|
this.langfuseClient.score.create({
|
|
453
453
|
traceId,
|
|
454
|
-
|
|
455
|
-
comment: ev.comment,
|
|
456
|
-
value: ev.value,
|
|
457
|
-
metadata: ev.metadata,
|
|
458
|
-
dataType: ev.dataType
|
|
454
|
+
...ev
|
|
459
455
|
});
|
|
460
456
|
}
|
|
461
457
|
return {
|