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
170
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.7 to 0.1.8

dist/tracers/tracer_langchain_v1.cjs

9

dist/language_models/base.d.ts

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

}
/**
* Shared interface for token usage
* return type from LLM calls.
*/
export interface TokenUsage {
completionTokens?: number;
promptTokens?: number;
totalTokens?: number;
}
export {};

1

dist/load/import_map.d.ts

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

export * as tracers__tracer_langchain from "../tracers/tracer_langchain.js";
export * as tracers__tracer_langchain_v1 from "../tracers/tracer_langchain_v1.js";
export * as utils__async_caller from "../utils/async_caller.js";

@@ -32,0 +33,0 @@ export * as utils__chunk_array from "../utils/chunk_array.js";

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

export * as tracers__tracer_langchain from "../tracers/tracer_langchain.js";
export * as tracers__tracer_langchain_v1 from "../tracers/tracer_langchain_v1.js";
export * as utils__async_caller from "../utils/async_caller.js";

@@ -33,0 +34,0 @@ export * as utils__chunk_array from "../utils/chunk_array.js";

2

dist/runnables/branch.d.ts

@@ -76,3 +76,3 @@ import { Runnable, RunnableLike } from "./base.js";

* ```ts
* import { RunnableBranch } from "langchain/schema/runnable";
* import { RunnableBranch } from "@langchain/core/runnables";
*

@@ -79,0 +79,0 @@ * const branch = RunnableBranch.from([

@@ -84,3 +84,3 @@ import { Runnable, _coerceToRunnable } from "./base.js";

* ```ts
* import { RunnableBranch } from "langchain/schema/runnable";
* import { RunnableBranch } from "@langchain/core/runnables";
*

@@ -87,0 +87,0 @@ * const branch = RunnableBranch.from([

@@ -63,3 +63,3 @@ import { Runnable, RunnableAssign, RunnableMapLike } from "./base.js";

*/
static assign(mapping: RunnableMapLike<Record<string, unknown>, Record<string, unknown>>): RunnableAssign<Record<string, unknown>, Record<string, unknown>>;
static assign<RunInput extends Record<string, unknown>, RunOutput extends Record<string, unknown>>(mapping: RunnableMapLike<RunInput, RunOutput>): RunnableAssign<RunInput, RunInput & RunOutput>;
}

@@ -81,7 +81,5 @@ import { Runnable, RunnableAssign, RunnableMap, } from "./base.js";

*/
static assign(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
mapping) {
static assign(mapping) {
return new RunnableAssign(new RunnableMap({ steps: mapping }));
}
}
import { LangChainTracer } from "./tracer_langchain.js";
import { LangChainTracerV1 } from "./tracer_langchain_v1.js";
/**
* @deprecated Use the V2 handler instead.
*
* Function that returns an instance of `LangChainTracerV1`. If a session
* is provided, it loads that session into the tracer; otherwise, it loads
* a default session.
* @param session Optional session to load into the tracer.
* @returns An instance of `LangChainTracerV1`.
*/
export declare function getTracingCallbackHandler(session?: string): Promise<LangChainTracerV1>;
/**
* Function that returns an instance of `LangChainTracer`. It does not

@@ -4,0 +15,0 @@ * load any session data.

import { LangChainTracer } from "./tracer_langchain.js";
import { LangChainTracerV1 } from "./tracer_langchain_v1.js";
/**
* @deprecated Use the V2 handler instead.
*
* Function that returns an instance of `LangChainTracerV1`. If a session
* is provided, it loads that session into the tracer; otherwise, it loads
* a default session.
* @param session Optional session to load into the tracer.
* @returns An instance of `LangChainTracerV1`.
*/
export async function getTracingCallbackHandler(session) {
const tracer = new LangChainTracerV1();
if (session) {
await tracer.loadSession(session);
}
else {
await tracer.loadDefaultSession();
}
return tracer;
}
/**
* Function that returns an instance of `LangChainTracer`. It does not

@@ -4,0 +24,0 @@ * load any session data.

{
"name": "@langchain/core",
"version": "0.1.7",
"version": "0.1.8",
"description": "Core LangChain.js abstractions and schemas",

@@ -237,2 +237,7 @@ "type": "module",

},
"./tracers/tracer_langchain_v1": {
"types": "./tracers/tracer_langchain_v1.d.ts",
"import": "./tracers/tracer_langchain_v1.js",
"require": "./tracers/tracer_langchain_v1.cjs"
},
"./utils/async_caller": {

@@ -392,2 +397,5 @@ "types": "./utils/async_caller.d.ts",

"tracers/tracer_langchain.d.ts",
"tracers/tracer_langchain_v1.cjs",
"tracers/tracer_langchain_v1.js",
"tracers/tracer_langchain_v1.d.ts",
"utils/async_caller.cjs",

@@ -394,0 +402,0 @@ "utils/async_caller.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

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