@langfuse/client 4.1.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 +7 -11
- 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 +7 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -232,7 +232,7 @@ var ExperimentManager = class {
|
|
|
232
232
|
* @param config.task - Function that processes each data item and returns output
|
|
233
233
|
* @param config.evaluators - Optional array of functions to evaluate each item's output
|
|
234
234
|
* @param config.runEvaluators - Optional array of functions to evaluate the entire run
|
|
235
|
-
* @param config.maxConcurrency - Maximum number of concurrent task executions (default:
|
|
235
|
+
* @param config.maxConcurrency - Maximum number of concurrent task executions (default: 50)
|
|
236
236
|
*
|
|
237
237
|
* @returns Promise that resolves to experiment results including:
|
|
238
238
|
* - runName: The experiment run name (either provided or generated)
|
|
@@ -295,7 +295,7 @@ var ExperimentManager = class {
|
|
|
295
295
|
runName: providedRunName,
|
|
296
296
|
description,
|
|
297
297
|
metadata,
|
|
298
|
-
maxConcurrency: batchSize =
|
|
298
|
+
maxConcurrency: batchSize = 50,
|
|
299
299
|
runEvaluators
|
|
300
300
|
} = config;
|
|
301
301
|
const runName = this.createExperimentRunName({
|
|
@@ -491,11 +491,7 @@ ${JSON.stringify(params2)}
|
|
|
491
491
|
for (const ev of evals) {
|
|
492
492
|
this.langfuseClient.score.create({
|
|
493
493
|
traceId,
|
|
494
|
-
|
|
495
|
-
comment: ev.comment,
|
|
496
|
-
value: ev.value,
|
|
497
|
-
metadata: ev.metadata,
|
|
498
|
-
dataType: ev.dataType
|
|
494
|
+
...ev
|
|
499
495
|
});
|
|
500
496
|
}
|
|
501
497
|
return {
|
|
@@ -1252,10 +1248,10 @@ var ChatPromptClient = class _ChatPromptClient extends BasePromptClient {
|
|
|
1252
1248
|
JSON.stringify(placeholderValue)
|
|
1253
1249
|
);
|
|
1254
1250
|
} else {
|
|
1255
|
-
messagesWithPlaceholdersReplaced.push(
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1251
|
+
messagesWithPlaceholdersReplaced.push([
|
|
1252
|
+
"placeholder",
|
|
1253
|
+
`{${item.name}}`
|
|
1254
|
+
]);
|
|
1259
1255
|
}
|
|
1260
1256
|
} else if ("role" in item && "content" in item && item.type === "chatmessage" /* ChatMessage */) {
|
|
1261
1257
|
messagesWithPlaceholdersReplaced.push({
|