langchain 0.3.10 → 0.3.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/hub.cjs
CHANGED
|
@@ -32,9 +32,21 @@ exports.push = push;
|
|
|
32
32
|
*/
|
|
33
33
|
async function pull(ownerRepoCommit, options) {
|
|
34
34
|
const client = new langsmith_1.Client(options);
|
|
35
|
-
const
|
|
35
|
+
const promptObject = await client.pullPromptCommit(ownerRepoCommit, {
|
|
36
36
|
includeModel: options?.includeModel,
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
if (promptObject.manifest.kwargs?.metadata === undefined) {
|
|
39
|
+
promptObject.manifest.kwargs = {
|
|
40
|
+
...promptObject.manifest.kwargs,
|
|
41
|
+
metadata: {},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
promptObject.manifest.kwargs.metadata = {
|
|
45
|
+
...promptObject.manifest.kwargs.metadata,
|
|
46
|
+
lc_hub_owner: promptObject.owner,
|
|
47
|
+
lc_hub_repo: promptObject.repo,
|
|
48
|
+
lc_hub_commit_hash: promptObject.commit_hash,
|
|
49
|
+
};
|
|
50
|
+
return (0, index_js_1.load)(JSON.stringify(promptObject.manifest));
|
|
39
51
|
}
|
|
40
52
|
exports.pull = pull;
|
package/dist/hub.js
CHANGED
|
@@ -28,8 +28,20 @@ export async function push(repoFullName, runnable, options) {
|
|
|
28
28
|
*/
|
|
29
29
|
export async function pull(ownerRepoCommit, options) {
|
|
30
30
|
const client = new Client(options);
|
|
31
|
-
const
|
|
31
|
+
const promptObject = await client.pullPromptCommit(ownerRepoCommit, {
|
|
32
32
|
includeModel: options?.includeModel,
|
|
33
33
|
});
|
|
34
|
-
|
|
34
|
+
if (promptObject.manifest.kwargs?.metadata === undefined) {
|
|
35
|
+
promptObject.manifest.kwargs = {
|
|
36
|
+
...promptObject.manifest.kwargs,
|
|
37
|
+
metadata: {},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
promptObject.manifest.kwargs.metadata = {
|
|
41
|
+
...promptObject.manifest.kwargs.metadata,
|
|
42
|
+
lc_hub_owner: promptObject.owner,
|
|
43
|
+
lc_hub_repo: promptObject.repo,
|
|
44
|
+
lc_hub_commit_hash: promptObject.commit_hash,
|
|
45
|
+
};
|
|
46
|
+
return load(JSON.stringify(promptObject.manifest));
|
|
35
47
|
}
|