langsmith
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -25,2 +25,11 @@ import * as uuid from "uuid"; | ||
} | ||
function trimQuotes(str) { | ||
if (str === undefined) { | ||
return undefined; | ||
} | ||
return str | ||
.trim() | ||
.replace(/^"(.*)"$/, "$1") | ||
.replace(/^'(.*)'$/, "$1"); | ||
} | ||
export class Client { | ||
@@ -53,4 +62,4 @@ constructor(config = {}) { | ||
const defaultConfig = Client.getDefaultClientConfig(); | ||
this.apiUrl = config.apiUrl ?? defaultConfig.apiUrl; | ||
this.apiKey = config.apiKey ?? defaultConfig.apiKey; | ||
this.apiUrl = trimQuotes(config.apiUrl ?? defaultConfig.apiUrl) ?? ""; | ||
this.apiKey = trimQuotes(config.apiKey ?? defaultConfig.apiKey); | ||
this.validateApiKeyIfHosted(); | ||
@@ -57,0 +66,0 @@ this.timeout_ms = config.timeout_ms ?? 4000; |
{ | ||
"name": "langsmith", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -49,3 +49,3 @@ # LangSmith Client SDK | ||
process.env["LANGCHAIN_TRACING_V2"] = "true"; | ||
process.env["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"; // or your own server | ||
process.env["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"; | ||
process.env["LANGCHAIN_API_KEY"] = "<YOUR-LANGSMITH-API-KEY>"; | ||
@@ -52,0 +52,0 @@ // process.env["LANGCHAIN_PROJECT"] = "My Project Name"; // Optional: "default" is used if not set |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143170
3546