langsmith 0.5.0-rc.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -17,4 +17,4 @@ Object.defineProperty(exports, "PromptCache", { enumerable: true, get: function
|
|
|
17
17
|
Object.defineProperty(exports, "configureGlobalPromptCache", { enumerable: true, get: function () { return index_js_1.configureGlobalPromptCache; } });
|
|
18
18
|
Object.defineProperty(exports, "promptCacheSingleton", { enumerable: true, get: function () { return index_js_1.promptCacheSingleton; } });
|
|
19
19
|
// Update using yarn bump-version
|
|
20
|
-
exports.__version__ = "0.5.0
|
|
20
|
+
exports.__version__ = "0.5.0";
|
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export { overrideFetchImplementation } from "./singletons/fetch.js";
|
|
|
5
5
|
export { getDefaultProjectName } from "./utils/project.js";
|
|
6
6
|
export { uuid7, uuid7FromTime } from "./uuid.js";
|
|
7
7
|
export { PromptCache, type CacheConfig, type CacheMetrics, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
|
|
8
|
-
export declare const __version__ = "0.5.0
|
|
8
|
+
export declare const __version__ = "0.5.0";
|
package/dist/index.js
CHANGED
|
@@ -5,4 +5,4 @@ export { getDefaultProjectName } from "./utils/project.js";
|
|
|
5
5
|
export { uuid7, uuid7FromTime } from "./uuid.js";
|
|
6
6
|
export { PromptCache, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
|
|
7
7
|
// Update using yarn bump-version
|
|
8
|
-
export const __version__ = "0.5.0
|
|
8
|
+
export const __version__ = "0.5.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function serialize(obj: any, errorContext?: any, replacer?: any, spacer?: any, options?: any): Uint8Array<
|
|
1
|
+
export declare function serialize(obj: any, errorContext?: any, replacer?: any, spacer?: any, options?: any): Uint8Array<ArrayBuffer>;
|
|
@@ -129,6 +129,10 @@ class PromptCache {
|
|
|
129
129
|
* Stale entries are still returned (background refresh handles updates).
|
|
130
130
|
*/
|
|
131
131
|
get(key, refreshFunc) {
|
|
132
|
+
// If max_size is 0, cache is disabled
|
|
133
|
+
if (this.maxSize === 0) {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
132
136
|
const entry = this.cache.get(key);
|
|
133
137
|
if (!entry) {
|
|
134
138
|
this._metrics.misses += 1;
|
|
@@ -144,6 +148,10 @@ class PromptCache {
|
|
|
144
148
|
* Set a value in the cache.
|
|
145
149
|
*/
|
|
146
150
|
set(key, value, refreshFunc) {
|
|
151
|
+
// If max_size is 0, cache is disabled - do nothing
|
|
152
|
+
if (this.maxSize === 0) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
147
155
|
if (this.refreshTimer === undefined) {
|
|
148
156
|
this.startRefreshLoop();
|
|
149
157
|
}
|
|
@@ -264,7 +272,6 @@ class PromptCache {
|
|
|
264
272
|
*/
|
|
265
273
|
async refreshStaleEntries() {
|
|
266
274
|
const staleEntries = this.getStaleEntries();
|
|
267
|
-
console.log("Refreshing stale entries", staleEntries);
|
|
268
275
|
if (staleEntries.length === 0) {
|
|
269
276
|
return;
|
|
270
277
|
}
|
|
@@ -125,6 +125,10 @@ export class PromptCache {
|
|
|
125
125
|
* Stale entries are still returned (background refresh handles updates).
|
|
126
126
|
*/
|
|
127
127
|
get(key, refreshFunc) {
|
|
128
|
+
// If max_size is 0, cache is disabled
|
|
129
|
+
if (this.maxSize === 0) {
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
128
132
|
const entry = this.cache.get(key);
|
|
129
133
|
if (!entry) {
|
|
130
134
|
this._metrics.misses += 1;
|
|
@@ -140,6 +144,10 @@ export class PromptCache {
|
|
|
140
144
|
* Set a value in the cache.
|
|
141
145
|
*/
|
|
142
146
|
set(key, value, refreshFunc) {
|
|
147
|
+
// If max_size is 0, cache is disabled - do nothing
|
|
148
|
+
if (this.maxSize === 0) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
143
151
|
if (this.refreshTimer === undefined) {
|
|
144
152
|
this.startRefreshLoop();
|
|
145
153
|
}
|
|
@@ -260,7 +268,6 @@ export class PromptCache {
|
|
|
260
268
|
*/
|
|
261
269
|
async refreshStaleEntries() {
|
|
262
270
|
const staleEntries = this.getStaleEntries();
|
|
263
|
-
console.log("Refreshing stale entries", staleEntries);
|
|
264
271
|
if (staleEntries.length === 0) {
|
|
265
272
|
return;
|
|
266
273
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langsmith",
|
|
3
|
-
"version": "0.5.0
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
|
|
5
5
|
"packageManager": "yarn@1.22.19",
|
|
6
6
|
"files": [
|
|
@@ -156,9 +156,9 @@
|
|
|
156
156
|
"@ai-sdk/anthropic": "^3.0.0",
|
|
157
157
|
"@ai-sdk/openai": "^3.0.0",
|
|
158
158
|
"@ai-sdk/provider": "^3.0.0",
|
|
159
|
-
"@anthropic-ai/claude-agent-sdk": "^0.
|
|
159
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.34",
|
|
160
160
|
"@google/genai": "^1.29.0",
|
|
161
|
-
"@anthropic-ai/sdk": "^0.
|
|
161
|
+
"@anthropic-ai/sdk": "^0.73.0",
|
|
162
162
|
"@babel/preset-env": "^7.22.4",
|
|
163
163
|
"@faker-js/faker": "^8.4.1",
|
|
164
164
|
"@jest/globals": "^29.5.0",
|
|
@@ -167,8 +167,8 @@
|
|
|
167
167
|
"@langchain/langgraph": "^0.3.6",
|
|
168
168
|
"@langchain/openai": "^0.5.16",
|
|
169
169
|
"@opentelemetry/api": "^1.9.0",
|
|
170
|
-
"@opentelemetry/auto-instrumentations-node": "^0.
|
|
171
|
-
"@opentelemetry/sdk-node": "^0.
|
|
170
|
+
"@opentelemetry/auto-instrumentations-node": "^0.69.0",
|
|
171
|
+
"@opentelemetry/sdk-node": "^0.211.0",
|
|
172
172
|
"@opentelemetry/sdk-trace-base": "^2.0.0",
|
|
173
173
|
"@opentelemetry/sdk-trace-node": "^2.0.0",
|
|
174
174
|
"@tsconfig/recommended": "^1.0.2",
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"prettier": "^2.8.8",
|
|
194
194
|
"ts-jest": "^29.1.0",
|
|
195
195
|
"ts-node": "^10.9.1",
|
|
196
|
-
"typedoc": "^0.
|
|
196
|
+
"typedoc": "^0.28.16",
|
|
197
197
|
"typedoc-plugin-expand-object-like-types": "^0.1.2",
|
|
198
198
|
"typescript": "^5.4.5",
|
|
199
199
|
"vitest": "^3.1.3",
|
|
@@ -444,6 +444,10 @@
|
|
|
444
444
|
},
|
|
445
445
|
"./package.json": "./package.json"
|
|
446
446
|
},
|
|
447
|
+
"resolutions": {
|
|
448
|
+
"js-yaml": "^4.1.1",
|
|
449
|
+
"rimraf/**/glob": "10.5.0"
|
|
450
|
+
},
|
|
447
451
|
"browser": {
|
|
448
452
|
"./dist/utils/prompt_cache/fs.js": "./dist/utils/prompt_cache/fs.browser.js"
|
|
449
453
|
}
|