Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

langsmith

Package Overview
Dependencies
Maintainers
2
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

langsmith - npm Package Compare versions

Comparing version 0.1.14 to 0.1.18

client.d.cts

15

dist/client.d.ts

@@ -33,2 +33,6 @@ import { AsyncCallerParams } from "./utils/async_caller.js";

/**
* isRoot - Whether to only include root runs.
* */
isRoot?: boolean;
/**
* The execution order to filter by.

@@ -100,2 +104,7 @@ */

treeFilter?: string;
/**
* The values to include in the response.
*
*/
select?: string[];
}

@@ -140,2 +149,3 @@ interface UploadCSVParams {

exampleId?: string;
metadata?: KVMap;
};

@@ -220,3 +230,3 @@ export declare class Queue<T> {

* @param startTime - The start time to filter by.
* @param executionOrder - The execution order to filter by.
* @param isRoot - Indicates whether to only return root runs.
* @param runType - The run type to filter by.

@@ -374,6 +384,7 @@ * @param error - Indicates whether to filter by error runs.

}): Promise<void>;
createExample(inputs: KVMap, outputs: KVMap, { datasetId, datasetName, createdAt, exampleId }: CreateExampleOptions): Promise<Example>;
createExample(inputs: KVMap, outputs: KVMap, { datasetId, datasetName, createdAt, exampleId, metadata, }: CreateExampleOptions): Promise<Example>;
createExamples(props: {
inputs: Array<KVMap>;
outputs?: Array<KVMap>;
metadata?: Array<KVMap>;
sourceRunIds?: Array<string>;

@@ -380,0 +391,0 @@ exampleIds?: Array<string>;

import { Example, Run, ScoreType, ValueType } from "../schemas.js";
/**
* Represents a categorical class.
*/
export type Category = {
/**
* The value of the category.
*/
value?: number;
/**
* The label of the category.
*/
label: string;
};
/**
* Configuration for feedback.
*/
export type FeedbackConfig = {
/**
* The type of feedback.
* - "continuous": Feedback with a continuous numeric.
* - "categorical": Feedback with a categorical value (classes)
* - "freeform": Feedback with a freeform text value (notes).
*/
type: "continuous" | "categorical" | "freeform";
/**
* The minimum value for continuous feedback.
*/
min?: number;
/**
* The maximum value for continuous feedback.
*/
max?: number;
/**
* The categories for categorical feedback.
* Each category can be a string or an object with additional properties.
*/
categories?: (Category | Record<string, unknown>)[];
};
/**
* Represents the result of an evaluation.

@@ -41,2 +79,8 @@ */

targetRunId?: string;
/**
* The feedback config associated with the evaluation result.
* If set, this will be used to define how a feedback key
* should be interpreted.
*/
feedbackConfig?: FeedbackConfig;
};

@@ -43,0 +87,0 @@ export interface RunEvaluator {

2

dist/index.d.ts
export { Client } from "./client.js";
export type { Dataset, Example, TracerSession, Run, Feedback, } from "./schemas.js";
export { RunTree, type RunTreeConfig } from "./run_trees.js";
export declare const __version__ = "0.1.14";
export declare const __version__ = "0.1.18";
export { Client } from "./client.js";
export { RunTree } from "./run_trees.js";
// Update using yarn bump-version
export const __version__ = "0.1.14";
export const __version__ = "0.1.18";

@@ -18,3 +18,3 @@ export interface TracerSession {

feedback_stats?: Record<string, unknown>;
reference_dataset_ids?: string[];
reference_dataset_id?: string;
run_facets?: KVMap[];

@@ -31,2 +31,3 @@ }

outputs?: KVMap;
metadata?: KVMap;
}

@@ -113,2 +114,4 @@ /**

parent_run_ids?: string[];
/** Whether the run is included in a dataset. */
in_dataset?: boolean;
}

@@ -163,2 +166,3 @@ export interface RunCreate extends BaseRun {

outputs?: KVMap;
metadata?: KVMap;
}

@@ -165,0 +169,0 @@ export interface BaseDataset {

@@ -48,3 +48,10 @@ import { RunTree, RunTreeConfig, RunnableConfigLike } from "./run_trees.js";

export declare function traceable<Func extends (...args: any[]) => any>(wrappedFunc: Func, config?: Partial<RunTreeConfig>): TraceableFunction<Func>;
/**
* Return the current run tree from within a traceable-wrapped function.
* Will throw an error if called outside of a traceable function.
*
* @returns The run tree for the given context.
*/
export declare function getCurrentRunTree(): RunTree;
export declare function isTraceableFunction(x: unknown): x is TraceableFunction<any>;
export {};

@@ -116,2 +116,19 @@ import { AsyncLocalStorage } from "async_hooks";

}
/**
* Return the current run tree from within a traceable-wrapped function.
* Will throw an error if called outside of a traceable function.
*
* @returns The run tree for the given context.
*/
export function getCurrentRunTree() {
const runTree = asyncLocalStorage.getStore();
if (runTree === undefined) {
throw new Error([
"Could not get the current run tree.",
"",
"Please make sure you are calling this method within a traceable function.",
].join("\n"));
}
return runTree;
}
export function isTraceableFunction(x

@@ -118,0 +135,0 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

{
"name": "langsmith",
"version": "0.1.14",
"version": "0.1.18",
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",

@@ -11,20 +11,27 @@ "packageManager": "yarn@1.22.19",

"client.d.ts",
"client.d.cts",
"run_trees.cjs",
"run_trees.js",
"run_trees.d.ts",
"run_trees.d.cts",
"traceable.cjs",
"traceable.js",
"traceable.d.ts",
"traceable.d.cts",
"evaluation.cjs",
"evaluation.js",
"evaluation.d.ts",
"evaluation.d.cts",
"schemas.cjs",
"schemas.js",
"schemas.d.ts",
"schemas.d.cts",
"wrappers.cjs",
"wrappers.js",
"wrappers.d.ts",
"wrappers.d.cts",
"index.cjs",
"index.js",
"index.d.ts"
"index.d.ts",
"index.d.cts"
],

@@ -106,3 +113,7 @@ "type": "module",

".": {
"types": "./index.d.ts",
"types": {
"import": "./index.d.ts",
"require": "./index.d.cts",
"default": "./index.d.ts"
},
"import": "./index.js",

@@ -112,3 +123,7 @@ "require": "./index.cjs"

"./client": {
"types": "./client.d.ts",
"types": {
"import": "./client.d.ts",
"require": "./client.d.cts",
"default": "./client.d.ts"
},
"import": "./client.js",

@@ -118,3 +133,7 @@ "require": "./client.cjs"

"./run_trees": {
"types": "./run_trees.d.ts",
"types": {
"import": "./run_trees.d.ts",
"require": "./run_trees.d.cts",
"default": "./run_trees.d.ts"
},
"import": "./run_trees.js",

@@ -124,3 +143,7 @@ "require": "./run_trees.cjs"

"./traceable": {
"types": "./traceable.d.ts",
"types": {
"import": "./traceable.d.ts",
"require": "./traceable.d.cts",
"default": "./traceable.d.ts"
},
"import": "./traceable.js",

@@ -130,3 +153,7 @@ "require": "./traceable.cjs"

"./evaluation": {
"types": "./evaluation.d.ts",
"types": {
"import": "./evaluation.d.ts",
"require": "./evaluation.d.cts",
"default": "./evaluation.d.ts"
},
"import": "./evaluation.js",

@@ -136,3 +163,7 @@ "require": "./evaluation.cjs"

"./schemas": {
"types": "./schemas.d.ts",
"types": {
"import": "./schemas.d.ts",
"require": "./schemas.d.cts",
"default": "./schemas.d.ts"
},
"import": "./schemas.js",

@@ -142,3 +173,7 @@ "require": "./schemas.cjs"

"./wrappers": {
"types": "./wrappers.d.ts",
"types": {
"import": "./wrappers.d.ts",
"require": "./wrappers.d.cts",
"default": "./wrappers.d.ts"
},
"import": "./wrappers.js",

@@ -145,0 +180,0 @@ "require": "./wrappers.cjs"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc