langsmith 0.2.10 → 0.2.11
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/client.cjs +1 -13
- package/dist/client.js +2 -14
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -2716,19 +2716,7 @@ class Client {
|
|
|
2716
2716
|
}
|
|
2717
2717
|
async pullPromptCommit(promptIdentifier, options) {
|
|
2718
2718
|
const [owner, promptName, commitHash] = (0, prompts_js_1.parsePromptIdentifier)(promptIdentifier);
|
|
2719
|
-
const
|
|
2720
|
-
const useOptimization = (0, prompts_js_1.isVersionGreaterOrEqual)(serverInfo.version, "0.5.23");
|
|
2721
|
-
let passedCommitHash = commitHash;
|
|
2722
|
-
if (!useOptimization && commitHash === "latest") {
|
|
2723
|
-
const latestCommitHash = await this._getLatestCommitHash(`${owner}/${promptName}`);
|
|
2724
|
-
if (!latestCommitHash) {
|
|
2725
|
-
throw new Error("No commits found");
|
|
2726
|
-
}
|
|
2727
|
-
else {
|
|
2728
|
-
passedCommitHash = latestCommitHash;
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
const response = await this.caller.call((0, fetch_js_1._getFetchImplementation)(), `${this.apiUrl}/commits/${owner}/${promptName}/${passedCommitHash}${options?.includeModel ? "?include_model=true" : ""}`, {
|
|
2719
|
+
const response = await this.caller.call((0, fetch_js_1._getFetchImplementation)(), `${this.apiUrl}/commits/${owner}/${promptName}/${commitHash}${options?.includeModel ? "?include_model=true" : ""}`, {
|
|
2732
2720
|
method: "GET",
|
|
2733
2721
|
headers: this.headers,
|
|
2734
2722
|
signal: AbortSignal.timeout(this.timeout_ms),
|
package/dist/client.js
CHANGED
|
@@ -5,7 +5,7 @@ import { getEnvironmentVariable, getLangChainEnvVarsMetadata, getLangSmithEnviro
|
|
|
5
5
|
import { __version__ } from "./index.js";
|
|
6
6
|
import { assertUuid } from "./utils/_uuid.js";
|
|
7
7
|
import { warnOnce } from "./utils/warn.js";
|
|
8
|
-
import {
|
|
8
|
+
import { parsePromptIdentifier } from "./utils/prompts.js";
|
|
9
9
|
import { raiseForStatus } from "./utils/error.js";
|
|
10
10
|
import { _getFetchImplementation } from "./singletons/fetch.js";
|
|
11
11
|
import { stringify as stringifyForTracing } from "./utils/fast-safe-stringify/index.js";
|
|
@@ -2688,19 +2688,7 @@ export class Client {
|
|
|
2688
2688
|
}
|
|
2689
2689
|
async pullPromptCommit(promptIdentifier, options) {
|
|
2690
2690
|
const [owner, promptName, commitHash] = parsePromptIdentifier(promptIdentifier);
|
|
2691
|
-
const
|
|
2692
|
-
const useOptimization = isVersionGreaterOrEqual(serverInfo.version, "0.5.23");
|
|
2693
|
-
let passedCommitHash = commitHash;
|
|
2694
|
-
if (!useOptimization && commitHash === "latest") {
|
|
2695
|
-
const latestCommitHash = await this._getLatestCommitHash(`${owner}/${promptName}`);
|
|
2696
|
-
if (!latestCommitHash) {
|
|
2697
|
-
throw new Error("No commits found");
|
|
2698
|
-
}
|
|
2699
|
-
else {
|
|
2700
|
-
passedCommitHash = latestCommitHash;
|
|
2701
|
-
}
|
|
2702
|
-
}
|
|
2703
|
-
const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/commits/${owner}/${promptName}/${passedCommitHash}${options?.includeModel ? "?include_model=true" : ""}`, {
|
|
2691
|
+
const response = await this.caller.call(_getFetchImplementation(), `${this.apiUrl}/commits/${owner}/${promptName}/${commitHash}${options?.includeModel ? "?include_model=true" : ""}`, {
|
|
2704
2692
|
method: "GET",
|
|
2705
2693
|
headers: this.headers,
|
|
2706
2694
|
signal: AbortSignal.timeout(this.timeout_ms),
|
package/dist/index.cjs
CHANGED
|
@@ -8,4 +8,4 @@ Object.defineProperty(exports, "RunTree", { enumerable: true, get: function () {
|
|
|
8
8
|
var fetch_js_1 = require("./singletons/fetch.cjs");
|
|
9
9
|
Object.defineProperty(exports, "overrideFetchImplementation", { enumerable: true, get: function () { return fetch_js_1.overrideFetchImplementation; } });
|
|
10
10
|
// Update using yarn bump-version
|
|
11
|
-
exports.__version__ = "0.2.
|
|
11
|
+
exports.__version__ = "0.2.11";
|
package/dist/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { Client, type ClientConfig, type LangSmithTracingClientInterface, } from
|
|
|
2
2
|
export type { Dataset, Example, TracerSession, Run, Feedback, RetrieverOutput, } from "./schemas.js";
|
|
3
3
|
export { RunTree, type RunTreeConfig } from "./run_trees.js";
|
|
4
4
|
export { overrideFetchImplementation } from "./singletons/fetch.js";
|
|
5
|
-
export declare const __version__ = "0.2.
|
|
5
|
+
export declare const __version__ = "0.2.11";
|
package/dist/index.js
CHANGED