langsmith 0.3.78 → 0.3.79
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/experimental/vercel/index.cjs +23 -0
- package/dist/experimental/vercel/index.js +23 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -209,6 +209,19 @@ const wrapAISDK = ({ wrapLanguageModel, generateText, streamText, streamObject,
|
|
|
209
209
|
if (outputs.outputs == null || typeof outputs.outputs !== "object") {
|
|
210
210
|
return outputs;
|
|
211
211
|
}
|
|
212
|
+
// If experimental_output is present, return it directly at top level (like generateObject)
|
|
213
|
+
// Note: accessing experimental_output throws if not specified, so wrap in try-catch
|
|
214
|
+
try {
|
|
215
|
+
if ("experimental_output" in outputs.outputs) {
|
|
216
|
+
const experimentalOutput = outputs.outputs.experimental_output;
|
|
217
|
+
if (experimentalOutput != null) {
|
|
218
|
+
return experimentalOutput;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
catch (e) {
|
|
223
|
+
// experimental_output not specified, continue with normal processing
|
|
224
|
+
}
|
|
212
225
|
const { steps } = outputs.outputs;
|
|
213
226
|
if (Array.isArray(steps)) {
|
|
214
227
|
const lastStep = steps.at(-1);
|
|
@@ -368,6 +381,16 @@ const wrapAISDK = ({ wrapLanguageModel, generateText, streamText, streamObject,
|
|
|
368
381
|
!["object", "string"].includes(typeof content)) {
|
|
369
382
|
return outputs;
|
|
370
383
|
}
|
|
384
|
+
try {
|
|
385
|
+
if ("experimental_partialOutputStream" in outputs.outputs &&
|
|
386
|
+
outputs.outputs.experimental_partialOutputStream != null) {
|
|
387
|
+
const textContent = await outputs.outputs.text;
|
|
388
|
+
return JSON.parse(textContent);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
catch (e) {
|
|
392
|
+
// experimental_partialOutputStream not specified, continue with normal processing
|
|
393
|
+
}
|
|
371
394
|
let responseMetadata = undefined;
|
|
372
395
|
if (resolvedLsConfig?.traceResponseMetadata) {
|
|
373
396
|
try {
|
|
@@ -204,6 +204,19 @@ const wrapAISDK = ({ wrapLanguageModel, generateText, streamText, streamObject,
|
|
|
204
204
|
if (outputs.outputs == null || typeof outputs.outputs !== "object") {
|
|
205
205
|
return outputs;
|
|
206
206
|
}
|
|
207
|
+
// If experimental_output is present, return it directly at top level (like generateObject)
|
|
208
|
+
// Note: accessing experimental_output throws if not specified, so wrap in try-catch
|
|
209
|
+
try {
|
|
210
|
+
if ("experimental_output" in outputs.outputs) {
|
|
211
|
+
const experimentalOutput = outputs.outputs.experimental_output;
|
|
212
|
+
if (experimentalOutput != null) {
|
|
213
|
+
return experimentalOutput;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
catch (e) {
|
|
218
|
+
// experimental_output not specified, continue with normal processing
|
|
219
|
+
}
|
|
207
220
|
const { steps } = outputs.outputs;
|
|
208
221
|
if (Array.isArray(steps)) {
|
|
209
222
|
const lastStep = steps.at(-1);
|
|
@@ -363,6 +376,16 @@ const wrapAISDK = ({ wrapLanguageModel, generateText, streamText, streamObject,
|
|
|
363
376
|
!["object", "string"].includes(typeof content)) {
|
|
364
377
|
return outputs;
|
|
365
378
|
}
|
|
379
|
+
try {
|
|
380
|
+
if ("experimental_partialOutputStream" in outputs.outputs &&
|
|
381
|
+
outputs.outputs.experimental_partialOutputStream != null) {
|
|
382
|
+
const textContent = await outputs.outputs.text;
|
|
383
|
+
return JSON.parse(textContent);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
catch (e) {
|
|
387
|
+
// experimental_partialOutputStream not specified, continue with normal processing
|
|
388
|
+
}
|
|
366
389
|
let responseMetadata = undefined;
|
|
367
390
|
if (resolvedLsConfig?.traceResponseMetadata) {
|
|
368
391
|
try {
|
package/dist/index.cjs
CHANGED
|
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "overrideFetchImplementation", { enumerable: true
|
|
|
10
10
|
var project_js_1 = require("./utils/project.cjs");
|
|
11
11
|
Object.defineProperty(exports, "getDefaultProjectName", { enumerable: true, get: function () { return project_js_1.getDefaultProjectName; } });
|
|
12
12
|
// Update using yarn bump-version
|
|
13
|
-
exports.__version__ = "0.3.
|
|
13
|
+
exports.__version__ = "0.3.79";
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export type { Dataset, Example, TracerSession, Run, Feedback, RetrieverOutput, }
|
|
|
3
3
|
export { RunTree, type RunTreeConfig } from "./run_trees.js";
|
|
4
4
|
export { overrideFetchImplementation } from "./singletons/fetch.js";
|
|
5
5
|
export { getDefaultProjectName } from "./utils/project.js";
|
|
6
|
-
export declare const __version__ = "0.3.
|
|
6
|
+
export declare const __version__ = "0.3.79";
|
package/dist/index.js
CHANGED
|
@@ -3,4 +3,4 @@ export { RunTree } from "./run_trees.js";
|
|
|
3
3
|
export { overrideFetchImplementation } from "./singletons/fetch.js";
|
|
4
4
|
export { getDefaultProjectName } from "./utils/project.js";
|
|
5
5
|
// Update using yarn bump-version
|
|
6
|
-
export const __version__ = "0.3.
|
|
6
|
+
export const __version__ = "0.3.79";
|