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.36 to 0.0.37

6

dist/client.d.ts

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

createdAt?: Date;
exampleId?: string;
};

@@ -129,3 +130,3 @@ export declare class Client {

}): Promise<void>;
createExample(inputs: KVMap, outputs: KVMap, { datasetId, datasetName, createdAt }: CreateExampleOptions): Promise<Example>;
createExample(inputs: KVMap, outputs: KVMap, { datasetId, datasetName, createdAt, exampleId }: CreateExampleOptions): Promise<Example>;
createLLMExample(input: string, generation: string | undefined, options: CreateExampleOptions): Promise<Example>;

@@ -145,3 +146,3 @@ createChatExample(input: KVMap[] | LangChainBaseMessage[], generations: KVMap | LangChainBaseMessage | undefined, options: CreateExampleOptions): Promise<Example>;

}): Promise<Feedback>;
createFeedback(runId: string, key: string, { score, value, correction, comment, sourceInfo, feedbackSourceType, sourceRunId, }: {
createFeedback(runId: string, key: string, { score, value, correction, comment, sourceInfo, feedbackSourceType, sourceRunId, feedbackId, }: {
score?: ScoreType;

@@ -154,2 +155,3 @@ value?: ValueType;

sourceRunId?: string;
feedbackId?: string;
}): Promise<Feedback>;

@@ -156,0 +158,0 @@ updateFeedback(feedbackId: string, { score, value, correction, comment, }: {

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

}
async createExample(inputs, outputs, { datasetId, datasetName, createdAt }) {
async createExample(inputs, outputs, { datasetId, datasetName, createdAt, exampleId }) {
let datasetId_ = datasetId;

@@ -577,2 +577,3 @@ if (datasetId_ === undefined && datasetName === undefined) {

created_at: createdAt_.toISOString(),
id: exampleId,
};

@@ -690,3 +691,3 @@ const response = await this.caller.call(fetch, `${this.apiUrl}/examples`, {

}
async createFeedback(runId, key, { score, value, correction, comment, sourceInfo, feedbackSourceType = "api", sourceRunId, }) {
async createFeedback(runId, key, { score, value, correction, comment, sourceInfo, feedbackSourceType = "api", sourceRunId, feedbackId, }) {
const feedback_source = {

@@ -702,3 +703,3 @@ type: feedbackSourceType ?? "api",

const feedback = {
id: uuid.v4(),
id: feedbackId ?? uuid.v4(),
run_id: runId,

@@ -718,7 +719,4 @@ key,

});
if (!response.ok) {
throw new Error(`Failed to create feedback for run ${runId}: ${response.status} ${response.statusText}`);
}
const result = await response.json();
return result;
await raiseForStatus(response, "create feedback");
return feedback;
}

@@ -725,0 +723,0 @@ async updateFeedback(feedbackId, { score, value, correction, comment, }) {

{
"name": "langsmith",
"version": "0.0.36",
"version": "0.0.37",
"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

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