Socket
Socket
Sign inDemoInstall

langsmith

Package Overview
Dependencies
Maintainers
1
Versions
151
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.0.20 to 0.0.23

13

dist/client.d.ts

@@ -108,5 +108,8 @@ import { AsyncCallerParams } from "./utils/async_caller.js";

}): Promise<Dataset>;
listDatasets({ limit, offset, }?: {
listDatasets({ limit, offset, datasetIds, datasetName, datasetNameContains, }?: {
limit?: number;
offset?: number;
datasetIds?: string[];
datasetName?: string;
datasetNameContains?: string;
}): AsyncIterable<Dataset>;

@@ -136,3 +139,3 @@ deleteDataset({ datasetId, datasetName, }: {

value?: ValueType;
correction?: string | object;
correction?: object;
comment?: string;

@@ -142,2 +145,8 @@ sourceInfo?: object;

}): Promise<Feedback>;
updateFeedback(feedbackId: string, { score, value, correction, comment, }: {
score?: number | boolean | null;
value?: number | boolean | string | object | null;
correction?: object | null;
comment?: string | null;
}): Promise<Feedback>;
readFeedback(feedbackId: string): Promise<Feedback>;

@@ -144,0 +153,0 @@ deleteFeedback(feedbackId: string): Promise<void>;

@@ -483,3 +483,3 @@ import * as uuid from "uuid";

}
async *listDatasets({ limit = 100, offset = 0, } = {}) {
async *listDatasets({ limit = 100, offset = 0, datasetIds, datasetName, datasetNameContains, } = {}) {
const path = "/datasets";

@@ -490,2 +490,13 @@ const params = new URLSearchParams({

});
if (datasetIds !== undefined) {
for (const id_ of datasetIds) {
params.append("id", id_);
}
}
if (datasetName !== undefined) {
params.append("name", datasetName);
}
if (datasetNameContains !== undefined) {
params.append("name_contains", datasetNameContains);
}
for await (const datasets of this._getPaginated(path, params)) {

@@ -664,2 +675,24 @@ yield* datasets;

}
async updateFeedback(feedbackId, { score, value, correction, comment, }) {
const feedbackUpdate = {};
if (score !== undefined && score !== null) {
feedbackUpdate["score"] = score;
}
if (value !== undefined && value !== null) {
feedbackUpdate["value"] = value;
}
if (correction !== undefined && correction !== null) {
feedbackUpdate["correction"] = correction;
}
if (comment !== undefined && comment !== null) {
feedbackUpdate["comment"] = comment;
}
const response = await this.caller.call(fetch, `${this.apiUrl}/feedback/${feedbackId}`, {
method: "PATCH",
headers: { ...this.headers, "Content-Type": "application/json" },
body: JSON.stringify(feedbackUpdate),
signal: AbortSignal.timeout(this.timeout_ms),
});
return response.json();
}
async readFeedback(feedbackId) {

@@ -666,0 +699,0 @@ const path = `/feedback/${feedbackId}`;

2

dist/evaluation/evaluator.d.ts

@@ -7,3 +7,3 @@ import { Example, KVMap, Run, ScoreType, ValueType } from "../schemas.js";

comment?: string;
correction?: string | object;
correction?: object;
evaluatorInfo?: KVMap;

@@ -10,0 +10,0 @@ }

@@ -8,3 +8,3 @@ import { Example, Run, ScoreType, ValueType } from "../schemas.js";

comment?: string;
correction?: string | object;
correction?: object;
}

@@ -11,0 +11,0 @@ export interface GradingFunctionParams {

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

@@ -5,0 +5,0 @@ "files": [

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