Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@langchain/core

Package Overview
Dependencies
Maintainers
4
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@langchain/core - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

dist/utils/function_calling.cjs

4

dist/language_models/base.d.ts

@@ -96,2 +96,6 @@ import type { TiktokenModel } from "js-tiktoken/lite";

}
export interface ToolDefinition {
type: "function";
function: FunctionDefinition;
}
export type FunctionCallOption = {

@@ -98,0 +102,0 @@ name: string;

@@ -34,2 +34,3 @@ export * as agents from "../agents.js";

export * as utils__env from "../utils/env.js";
export * as utils__function_calling from "../utils/function_calling.js";
export * as utils__hash from "../utils/hash.js";

@@ -36,0 +37,0 @@ export * as utils__json_patch from "../utils/json_patch.js";

@@ -35,2 +35,3 @@ // Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.

export * as utils__env from "../utils/env.js";
export * as utils__function_calling from "../utils/function_calling.js";
export * as utils__hash from "../utils/hash.js";

@@ -37,0 +38,0 @@ export * as utils__json_patch from "../utils/json_patch.js";

2

dist/tracers/base.js

@@ -218,3 +218,3 @@ import { BaseCallbackHandler, } from "../callbacks/base.js";

run.end_time = Date.now();
run.error = error.message;
run.error = error.message + (error.stack ? `\n\n${error.stack}` : "");
run.events.push({

@@ -221,0 +221,0 @@ name: "error",

@@ -1,2 +0,2 @@

export interface IterableReadableStreamInterface<T> extends ReadableStream<T>, AsyncGenerator<T> {
export interface IterableReadableStreamInterface<T> extends ReadableStream<T>, AsyncIterable<T> {
}

@@ -3,0 +3,0 @@ export declare class IterableReadableStream<T> extends ReadableStream<T> implements IterableReadableStreamInterface<T> {

@@ -1,2 +0,3 @@

import { BaseCallbackConfig, CallbackManagerForLLMRun } from "../../callbacks/manager.js";
import { z } from "zod";
import { BaseCallbackConfig, CallbackManagerForLLMRun, CallbackManagerForToolRun } from "../../callbacks/manager.js";
import { BaseChatMessageHistory, BaseListChatMessageHistory } from "../../chat_history.js";

@@ -11,2 +12,3 @@ import { Document } from "../../documents/document.js";

import { Runnable } from "../../runnables/base.js";
import { StructuredTool, ToolParams } from "../../tools.js";
import { BaseTracer, Run } from "../../tracers/base.js";

@@ -134,1 +136,13 @@ /**

}
export interface FakeToolParams<T extends z.ZodObject<any, any, any, any> = z.ZodObject<any, any, any, any>> extends ToolParams {
name: string;
description: string;
schema: T;
}
export declare class FakeTool<T extends z.ZodObject<any, any, any, any> = z.ZodObject<any, any, any, any>> extends StructuredTool<T> {
name: string;
description: string;
schema: T;
constructor(fields: FakeToolParams<T>);
protected _call(arg: z.output<T>, _runManager?: CallbackManagerForToolRun): Promise<string>;
}

@@ -1,3 +0,1 @@

/* eslint-disable no-promise-executor-return */
/* eslint-disable @typescript-eslint/no-explicit-any */
import { BaseChatMessageHistory, BaseListChatMessageHistory, } from "../../chat_history.js";

@@ -12,2 +10,3 @@ import { Document } from "../../documents/document.js";

import { Runnable } from "../../runnables/base.js";
import { StructuredTool } from "../../tools.js";
import { BaseTracer } from "../../tracers/base.js";

@@ -357,1 +356,30 @@ /**

}
export class FakeTool extends StructuredTool {
constructor(fields) {
super(fields);
Object.defineProperty(this, "name", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, "description", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, "schema", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.name = fields.name;
this.description = fields.description;
this.schema = fields.schema;
}
async _call(arg, _runManager) {
return JSON.stringify(arg);
}
}
{
"name": "@langchain/core",
"version": "0.1.12",
"version": "0.1.13",
"description": "Core LangChain.js abstractions and schemas",

@@ -46,3 +46,4 @@ "type": "module",

"uuid": "^9.0.0",
"zod": "^3.22.3"
"zod": "^3.22.3",
"zod-to-json-schema": "3.20.3"
},

@@ -258,2 +259,7 @@ "devDependencies": {

},
"./utils/function_calling": {
"types": "./utils/function_calling.d.ts",
"import": "./utils/function_calling.js",
"require": "./utils/function_calling.cjs"
},
"./utils/hash": {

@@ -410,2 +416,5 @@ "types": "./utils/hash.d.ts",

"utils/env.d.ts",
"utils/function_calling.cjs",
"utils/function_calling.js",
"utils/function_calling.d.ts",
"utils/hash.cjs",

@@ -412,0 +421,0 @@ "utils/hash.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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