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.17 to 0.0.19

5

dist/client.d.ts

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

deleteRun(runId: string): Promise<void>;
shareRun(runId: string, { shareId }?: {
shareId?: string;
}): Promise<string>;
unshareRun(runId: string): Promise<void>;
readRunSharedLink(runId: string): Promise<string | undefined>;
createProject({ projectName, projectExtra, upsert, }: {

@@ -82,0 +87,0 @@ projectName: string;

@@ -281,2 +281,41 @@ import * as uuid from "uuid";

}
async shareRun(runId, { shareId } = {}) {
const data = {
run_id: runId,
share_token: shareId || uuid.v4(),
};
const response = await this.caller.call(fetch, `${this.apiUrl}/runs/${runId}/share`, {
method: "PUT",
headers: this.headers,
body: JSON.stringify(data),
signal: AbortSignal.timeout(this.timeout_ms),
});
// await raiseForStatus(response, "share run");
const result = await response.json();
if (result === null || !("share_token" in result)) {
throw new Error("Invalid response from server");
}
return `${this.getHostUrl()}/public/${result["share_token"]}/r`;
}
async unshareRun(runId) {
const response = await this.caller.call(fetch, `${this.apiUrl}/runs/${runId}/share`, {
method: "DELETE",
headers: this.headers,
signal: AbortSignal.timeout(this.timeout_ms),
});
await raiseForStatus(response, "unshare run");
}
async readRunSharedLink(runId) {
const response = await this.caller.call(fetch, `${this.apiUrl}/runs/${runId}/share`, {
method: "GET",
headers: this.headers,
signal: AbortSignal.timeout(this.timeout_ms),
});
// await raiseForStatus(response, "read run shared link");
const result = await response.json();
if (result === null || !("share_token" in result)) {
return undefined;
}
return `${this.getHostUrl()}/public/${result["share_token"]}/r`;
}
async createProject({ projectName, projectExtra, upsert, }) {

@@ -283,0 +322,0 @@ const upsert_ = upsert ? `?upsert=true` : "";

8

package.json
{
"name": "langsmith",
"version": "0.0.17",
"version": "0.0.19",
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",

@@ -45,3 +45,3 @@ "files": [

"type": "git",
"url": "git+https://github.com/langchain-ai/langchainplus-sdk.git"
"url": "git+https://github.com/langchain-ai/langsmith-sdk.git"
},

@@ -57,5 +57,5 @@ "keywords": [

"bugs": {
"url": "https://github.com/langchain-ai/langchainplus-sdk/issues"
"url": "https://github.com/langchain-ai/langsmith-sdk/issues"
},
"homepage": "https://github.com/langchain-ai/langchainplus-sdk#readme",
"homepage": "https://github.com/langchain-ai/langsmith-sdk#readme",
"devDependencies": {

@@ -62,0 +62,0 @@ "@babel/preset-env": "^7.22.4",

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