langchain 0.1.12 → 0.1.13

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.
@@ -1,94 +1,23 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SyntheticEmbeddings = exports.FakeEmbeddings = void 0;
4
- const embeddings_1 = require("@langchain/core/embeddings");
5
- /**
6
- * A class that provides fake embeddings by overriding the embedDocuments
7
- * and embedQuery methods to return fixed values.
8
- */
9
- class FakeEmbeddings extends embeddings_1.Embeddings {
10
- constructor(params) {
11
- super(params ?? {});
12
- }
13
- /**
14
- * Generates fixed embeddings for a list of documents.
15
- * @param documents List of documents to generate embeddings for.
16
- * @returns A promise that resolves with a list of fixed embeddings for each document.
17
- */
18
- embedDocuments(documents) {
19
- return Promise.resolve(documents.map(() => [0.1, 0.2, 0.3, 0.4]));
20
- }
21
- /**
22
- * Generates a fixed embedding for a query.
23
- * @param _ The query to generate an embedding for.
24
- * @returns A promise that resolves with a fixed embedding for the query.
25
- */
26
- embedQuery(_) {
27
- return Promise.resolve([0.1, 0.2, 0.3, 0.4]);
28
- }
29
- }
30
- exports.FakeEmbeddings = FakeEmbeddings;
31
- /**
32
- * A class that provides synthetic embeddings by overriding the
33
- * embedDocuments and embedQuery methods to generate embeddings based on
34
- * the input documents. The embeddings are generated by converting each
35
- * document into chunks, calculating a numerical value for each chunk, and
36
- * returning an array of these values as the embedding.
37
- */
38
- class SyntheticEmbeddings extends embeddings_1.Embeddings {
39
- constructor(params) {
40
- super(params ?? {});
41
- Object.defineProperty(this, "vectorSize", {
42
- enumerable: true,
43
- configurable: true,
44
- writable: true,
45
- value: void 0
46
- });
47
- this.vectorSize = params?.vectorSize ?? 4;
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
48
7
  }
49
- /**
50
- * Generates synthetic embeddings for a list of documents.
51
- * @param documents List of documents to generate embeddings for.
52
- * @returns A promise that resolves with a list of synthetic embeddings for each document.
53
- */
54
- async embedDocuments(documents) {
55
- return Promise.all(documents.map((doc) => this.embedQuery(doc)));
56
- }
57
- /**
58
- * Generates a synthetic embedding for a document. The document is
59
- * converted into chunks, a numerical value is calculated for each chunk,
60
- * and an array of these values is returned as the embedding.
61
- * @param document The document to generate an embedding for.
62
- * @returns A promise that resolves with a synthetic embedding for the document.
63
- */
64
- async embedQuery(document) {
65
- let doc = document;
66
- // Only use the letters (and space) from the document, and make them lower case
67
- doc = doc.toLowerCase().replaceAll(/[^a-z ]/g, "");
68
- // Pad the document to make sure it has a divisible number of chunks
69
- const padMod = doc.length % this.vectorSize;
70
- const padGapSize = padMod === 0 ? 0 : this.vectorSize - padMod;
71
- const padSize = doc.length + padGapSize;
72
- doc = doc.padEnd(padSize, " ");
73
- // Break it into chunks
74
- const chunkSize = doc.length / this.vectorSize;
75
- const docChunk = [];
76
- for (let co = 0; co < doc.length; co += chunkSize) {
77
- docChunk.push(doc.slice(co, co + chunkSize));
78
- }
79
- // Turn each chunk into a number
80
- const ret = docChunk.map((s) => {
81
- let sum = 0;
82
- // Get a total value by adding the value of each character in the string
83
- for (let co = 0; co < s.length; co += 1) {
84
- sum += s === " " ? 0 : s.charCodeAt(co);
85
- }
86
- // Reduce this to a number between 0 and 25 inclusive
87
- // Then get the fractional number by dividing it by 26
88
- const ret = (sum % 26) / 26;
89
- return ret;
90
- });
91
- return ret;
92
- }
93
- }
94
- exports.SyntheticEmbeddings = SyntheticEmbeddings;
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ const entrypoint_deprecation_js_1 = require("../util/entrypoint_deprecation.cjs");
18
+ __exportStar(require("@langchain/core/utils/testing"), exports);
19
+ /* #__PURE__ */ (0, entrypoint_deprecation_js_1.logVersion010MigrationWarning)({
20
+ oldEntrypointName: "embeddings/fake",
21
+ newEntrypointName: "utils/testing",
22
+ newPackageName: "@langchain/core",
23
+ });
@@ -1,53 +1 @@
1
- import { Embeddings, EmbeddingsParams } from "@langchain/core/embeddings";
2
- /**
3
- * A class that provides fake embeddings by overriding the embedDocuments
4
- * and embedQuery methods to return fixed values.
5
- */
6
- export declare class FakeEmbeddings extends Embeddings {
7
- constructor(params?: EmbeddingsParams);
8
- /**
9
- * Generates fixed embeddings for a list of documents.
10
- * @param documents List of documents to generate embeddings for.
11
- * @returns A promise that resolves with a list of fixed embeddings for each document.
12
- */
13
- embedDocuments(documents: string[]): Promise<number[][]>;
14
- /**
15
- * Generates a fixed embedding for a query.
16
- * @param _ The query to generate an embedding for.
17
- * @returns A promise that resolves with a fixed embedding for the query.
18
- */
19
- embedQuery(_: string): Promise<number[]>;
20
- }
21
- /**
22
- * An interface that defines additional parameters specific to the
23
- * SyntheticEmbeddings class.
24
- */
25
- interface SyntheticEmbeddingsParams extends EmbeddingsParams {
26
- vectorSize: number;
27
- }
28
- /**
29
- * A class that provides synthetic embeddings by overriding the
30
- * embedDocuments and embedQuery methods to generate embeddings based on
31
- * the input documents. The embeddings are generated by converting each
32
- * document into chunks, calculating a numerical value for each chunk, and
33
- * returning an array of these values as the embedding.
34
- */
35
- export declare class SyntheticEmbeddings extends Embeddings implements SyntheticEmbeddingsParams {
36
- vectorSize: number;
37
- constructor(params?: SyntheticEmbeddingsParams);
38
- /**
39
- * Generates synthetic embeddings for a list of documents.
40
- * @param documents List of documents to generate embeddings for.
41
- * @returns A promise that resolves with a list of synthetic embeddings for each document.
42
- */
43
- embedDocuments(documents: string[]): Promise<number[][]>;
44
- /**
45
- * Generates a synthetic embedding for a document. The document is
46
- * converted into chunks, a numerical value is calculated for each chunk,
47
- * and an array of these values is returned as the embedding.
48
- * @param document The document to generate an embedding for.
49
- * @returns A promise that resolves with a synthetic embedding for the document.
50
- */
51
- embedQuery(document: string): Promise<number[]>;
52
- }
53
- export {};
1
+ export * from "@langchain/core/utils/testing";
@@ -1,89 +1,7 @@
1
- import { Embeddings } from "@langchain/core/embeddings";
2
- /**
3
- * A class that provides fake embeddings by overriding the embedDocuments
4
- * and embedQuery methods to return fixed values.
5
- */
6
- export class FakeEmbeddings extends Embeddings {
7
- constructor(params) {
8
- super(params ?? {});
9
- }
10
- /**
11
- * Generates fixed embeddings for a list of documents.
12
- * @param documents List of documents to generate embeddings for.
13
- * @returns A promise that resolves with a list of fixed embeddings for each document.
14
- */
15
- embedDocuments(documents) {
16
- return Promise.resolve(documents.map(() => [0.1, 0.2, 0.3, 0.4]));
17
- }
18
- /**
19
- * Generates a fixed embedding for a query.
20
- * @param _ The query to generate an embedding for.
21
- * @returns A promise that resolves with a fixed embedding for the query.
22
- */
23
- embedQuery(_) {
24
- return Promise.resolve([0.1, 0.2, 0.3, 0.4]);
25
- }
26
- }
27
- /**
28
- * A class that provides synthetic embeddings by overriding the
29
- * embedDocuments and embedQuery methods to generate embeddings based on
30
- * the input documents. The embeddings are generated by converting each
31
- * document into chunks, calculating a numerical value for each chunk, and
32
- * returning an array of these values as the embedding.
33
- */
34
- export class SyntheticEmbeddings extends Embeddings {
35
- constructor(params) {
36
- super(params ?? {});
37
- Object.defineProperty(this, "vectorSize", {
38
- enumerable: true,
39
- configurable: true,
40
- writable: true,
41
- value: void 0
42
- });
43
- this.vectorSize = params?.vectorSize ?? 4;
44
- }
45
- /**
46
- * Generates synthetic embeddings for a list of documents.
47
- * @param documents List of documents to generate embeddings for.
48
- * @returns A promise that resolves with a list of synthetic embeddings for each document.
49
- */
50
- async embedDocuments(documents) {
51
- return Promise.all(documents.map((doc) => this.embedQuery(doc)));
52
- }
53
- /**
54
- * Generates a synthetic embedding for a document. The document is
55
- * converted into chunks, a numerical value is calculated for each chunk,
56
- * and an array of these values is returned as the embedding.
57
- * @param document The document to generate an embedding for.
58
- * @returns A promise that resolves with a synthetic embedding for the document.
59
- */
60
- async embedQuery(document) {
61
- let doc = document;
62
- // Only use the letters (and space) from the document, and make them lower case
63
- doc = doc.toLowerCase().replaceAll(/[^a-z ]/g, "");
64
- // Pad the document to make sure it has a divisible number of chunks
65
- const padMod = doc.length % this.vectorSize;
66
- const padGapSize = padMod === 0 ? 0 : this.vectorSize - padMod;
67
- const padSize = doc.length + padGapSize;
68
- doc = doc.padEnd(padSize, " ");
69
- // Break it into chunks
70
- const chunkSize = doc.length / this.vectorSize;
71
- const docChunk = [];
72
- for (let co = 0; co < doc.length; co += chunkSize) {
73
- docChunk.push(doc.slice(co, co + chunkSize));
74
- }
75
- // Turn each chunk into a number
76
- const ret = docChunk.map((s) => {
77
- let sum = 0;
78
- // Get a total value by adding the value of each character in the string
79
- for (let co = 0; co < s.length; co += 1) {
80
- sum += s === " " ? 0 : s.charCodeAt(co);
81
- }
82
- // Reduce this to a number between 0 and 25 inclusive
83
- // Then get the fractional number by dividing it by 26
84
- const ret = (sum % 26) / 26;
85
- return ret;
86
- });
87
- return ret;
88
- }
89
- }
1
+ import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
2
+ export * from "@langchain/core/utils/testing";
3
+ /* #__PURE__ */ logVersion010MigrationWarning({
4
+ oldEntrypointName: "embeddings/fake",
5
+ newEntrypointName: "utils/testing",
6
+ newPackageName: "@langchain/core",
7
+ });
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  };
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
27
  exports.storage__in_memory = exports.storage__encoder_backed = exports.stores__message__in_memory = exports.stores__file__in_memory = exports.stores__doc__in_memory = exports.retrievers__vespa = exports.retrievers__score_threshold = exports.retrievers__hyde = exports.retrievers__document_compressors__embeddings_filter = exports.retrievers__document_compressors__chain_extract = exports.retrievers__time_weighted = exports.retrievers__parent_document = exports.retrievers__multi_vector = exports.retrievers__multi_query = exports.retrievers__document_compressors = exports.retrievers__contextual_compression = exports.retrievers__remote = exports.output_parsers = exports.schema__query_constructor = exports.schema__prompt_template = exports.chat_models__anthropic = exports.document_transformers__openai_functions = exports.document_loaders__web__sort_xyz_blockchain = exports.document_loaders__web__serpapi = exports.document_loaders__web__searchapi = exports.document_loaders__base = exports.text_splitter = exports.vectorstores__memory = exports.llms__fake = exports.embeddings__fake = exports.embeddings__cache_backed = exports.chains__retrieval = exports.chains__openai_functions = exports.chains__history_aware_retriever = exports.chains__combine_documents__reduce = exports.chains__combine_documents = exports.chains = exports.tools__retriever = exports.tools__render = exports.tools__chain = exports.agents__openai__output_parser = exports.agents__xml__output_parser = exports.agents__react__output_parser = exports.agents__format_scratchpad__log_to_message = exports.agents__format_scratchpad__xml = exports.agents__format_scratchpad__log = exports.agents__format_scratchpad__openai_tools = exports.agents__format_scratchpad = exports.agents__toolkits = exports.agents = void 0;
28
- exports.llms__fireworks = exports.chat_models__fireworks = exports.schema__output = exports.schema__output_parser = exports.schema__runnable = exports.prompts__base = exports.prompts__pipeline = exports.prompts__chat = exports.schema__messages = exports.prompts__prompt = exports.embeddings__openai = exports.llms__openai = exports.chat_models__openai = exports.indexes = exports.runnables__remote = exports.smith = exports.evaluation = exports.experimental__prompts__custom_format = exports.experimental__masking = exports.experimental__chains__violation_of_expectations = exports.experimental__chat_models__bittensor = exports.experimental__plan_and_execute = exports.experimental__generative_agents = exports.experimental__babyagi = exports.experimental__openai_files = exports.experimental__openai_assistant = exports.experimental__autogpt = exports.util__time = exports.util__math = exports.util__document = void 0;
28
+ exports.llms__fireworks = exports.chat_models__fireworks = exports.schema__output = exports.schema__output_parser = exports.schema__runnable = exports.prompts__base = exports.prompts__pipeline = exports.prompts__chat = exports.schema = exports.schema__messages = exports.prompts__prompt = exports.embeddings__openai = exports.llms__openai = exports.chat_models__openai = exports.indexes = exports.runnables__remote = exports.smith = exports.evaluation = exports.experimental__prompts__custom_format = exports.experimental__masking = exports.experimental__chains__violation_of_expectations = exports.experimental__chat_models__bittensor = exports.experimental__plan_and_execute = exports.experimental__generative_agents = exports.experimental__babyagi = exports.experimental__openai_files = exports.experimental__openai_assistant = exports.experimental__autogpt = exports.util__time = exports.util__math = exports.util__document = void 0;
29
29
  exports.agents = __importStar(require("../agents/index.cjs"));
30
30
  exports.agents__toolkits = __importStar(require("../agents/toolkits/index.cjs"));
31
31
  exports.agents__format_scratchpad = __importStar(require("../agents/format_scratchpad/openai_functions.cjs"));
@@ -103,19 +103,19 @@ const outputs_1 = require("@langchain/core/outputs");
103
103
  const fireworks_1 = require("@langchain/community/chat_models/fireworks");
104
104
  const fireworks_2 = require("@langchain/community/llms/fireworks");
105
105
  const chat_models__openai = {
106
- ChatOpenAI: openai_1.ChatOpenAI,
106
+ ChatOpenAI: openai_1.ChatOpenAI
107
107
  };
108
108
  exports.chat_models__openai = chat_models__openai;
109
109
  const llms__openai = {
110
- OpenAI: openai_1.OpenAI,
110
+ OpenAI: openai_1.OpenAI
111
111
  };
112
112
  exports.llms__openai = llms__openai;
113
113
  const embeddings__openai = {
114
- OpenAIEmbeddings: openai_1.OpenAIEmbeddings,
114
+ OpenAIEmbeddings: openai_1.OpenAIEmbeddings
115
115
  };
116
116
  exports.embeddings__openai = embeddings__openai;
117
117
  const prompts__prompt = {
118
- PromptTemplate: prompts_1.PromptTemplate,
118
+ PromptTemplate: prompts_1.PromptTemplate
119
119
  };
120
120
  exports.prompts__prompt = prompts__prompt;
121
121
  const schema__messages = {
@@ -132,24 +132,41 @@ const schema__messages = {
132
132
  SystemMessage: messages_1.SystemMessage,
133
133
  SystemMessageChunk: messages_1.SystemMessageChunk,
134
134
  ToolMessage: messages_1.ToolMessage,
135
- ToolMessageChunk: messages_1.ToolMessageChunk,
135
+ ToolMessageChunk: messages_1.ToolMessageChunk
136
136
  };
137
137
  exports.schema__messages = schema__messages;
138
+ const schema = {
139
+ AIMessage: messages_1.AIMessage,
140
+ AIMessageChunk: messages_1.AIMessageChunk,
141
+ BaseMessage: messages_1.BaseMessage,
142
+ BaseMessageChunk: messages_1.BaseMessageChunk,
143
+ ChatMessage: messages_1.ChatMessage,
144
+ ChatMessageChunk: messages_1.ChatMessageChunk,
145
+ FunctionMessage: messages_1.FunctionMessage,
146
+ FunctionMessageChunk: messages_1.FunctionMessageChunk,
147
+ HumanMessage: messages_1.HumanMessage,
148
+ HumanMessageChunk: messages_1.HumanMessageChunk,
149
+ SystemMessage: messages_1.SystemMessage,
150
+ SystemMessageChunk: messages_1.SystemMessageChunk,
151
+ ToolMessage: messages_1.ToolMessage,
152
+ ToolMessageChunk: messages_1.ToolMessageChunk
153
+ };
154
+ exports.schema = schema;
138
155
  const prompts__chat = {
139
156
  AIMessagePromptTemplate: prompts_1.AIMessagePromptTemplate,
140
157
  ChatMessagePromptTemplate: prompts_1.ChatMessagePromptTemplate,
141
158
  ChatPromptTemplate: prompts_1.ChatPromptTemplate,
142
159
  HumanMessagePromptTemplate: prompts_1.HumanMessagePromptTemplate,
143
160
  MessagesPlaceholder: prompts_1.MessagesPlaceholder,
144
- SystemMessagePromptTemplate: prompts_1.SystemMessagePromptTemplate,
161
+ SystemMessagePromptTemplate: prompts_1.SystemMessagePromptTemplate
145
162
  };
146
163
  exports.prompts__chat = prompts__chat;
147
164
  const prompts__pipeline = {
148
- PipelinePromptTemplate: prompts_1.PipelinePromptTemplate,
165
+ PipelinePromptTemplate: prompts_1.PipelinePromptTemplate
149
166
  };
150
167
  exports.prompts__pipeline = prompts__pipeline;
151
168
  const prompts__base = {
152
- StringPromptValue: prompt_values_1.StringPromptValue,
169
+ StringPromptValue: prompt_values_1.StringPromptValue
153
170
  };
154
171
  exports.prompts__base = prompts__base;
155
172
  const schema__runnable = {
@@ -165,23 +182,23 @@ const schema__runnable = {
165
182
  RunnableRetry: runnables_1.RunnableRetry,
166
183
  RunnableSequence: runnables_1.RunnableSequence,
167
184
  RunnableWithFallbacks: runnables_1.RunnableWithFallbacks,
168
- RunnableWithMessageHistory: runnables_1.RunnableWithMessageHistory,
185
+ RunnableWithMessageHistory: runnables_1.RunnableWithMessageHistory
169
186
  };
170
187
  exports.schema__runnable = schema__runnable;
171
188
  const schema__output_parser = {
172
- StringOutputParser: output_parsers_1.StringOutputParser,
189
+ StringOutputParser: output_parsers_1.StringOutputParser
173
190
  };
174
191
  exports.schema__output_parser = schema__output_parser;
175
192
  const schema__output = {
176
193
  ChatGenerationChunk: outputs_1.ChatGenerationChunk,
177
- GenerationChunk: outputs_1.GenerationChunk,
194
+ GenerationChunk: outputs_1.GenerationChunk
178
195
  };
179
196
  exports.schema__output = schema__output;
180
197
  const chat_models__fireworks = {
181
- ChatFireworks: fireworks_1.ChatFireworks,
198
+ ChatFireworks: fireworks_1.ChatFireworks
182
199
  };
183
200
  exports.chat_models__fireworks = chat_models__fireworks;
184
201
  const llms__fireworks = {
185
- Fireworks: fireworks_2.Fireworks,
202
+ Fireworks: fireworks_2.Fireworks
186
203
  };
187
204
  exports.llms__fireworks = llms__fireworks;
@@ -107,6 +107,23 @@ declare const schema__messages: {
107
107
  ToolMessageChunk: typeof ToolMessageChunk;
108
108
  };
109
109
  export { schema__messages };
110
+ declare const schema: {
111
+ AIMessage: typeof AIMessage;
112
+ AIMessageChunk: typeof AIMessageChunk;
113
+ BaseMessage: typeof BaseMessage;
114
+ BaseMessageChunk: typeof BaseMessageChunk;
115
+ ChatMessage: typeof ChatMessage;
116
+ ChatMessageChunk: typeof ChatMessageChunk;
117
+ FunctionMessage: typeof FunctionMessage;
118
+ FunctionMessageChunk: typeof FunctionMessageChunk;
119
+ HumanMessage: typeof HumanMessage;
120
+ HumanMessageChunk: typeof HumanMessageChunk;
121
+ SystemMessage: typeof SystemMessage;
122
+ SystemMessageChunk: typeof SystemMessageChunk;
123
+ ToolMessage: typeof ToolMessage;
124
+ ToolMessageChunk: typeof ToolMessageChunk;
125
+ };
126
+ export { schema };
110
127
  declare const prompts__chat: {
111
128
  AIMessagePromptTemplate: typeof AIMessagePromptTemplate;
112
129
  ChatMessagePromptTemplate: typeof ChatMessagePromptTemplate;
@@ -67,28 +67,28 @@ export * as smith from "../smith/index.js";
67
67
  export * as runnables__remote from "../runnables/remote.js";
68
68
  export * as indexes from "../indexes/index.js";
69
69
  import { ChatOpenAI, OpenAI, OpenAIEmbeddings } from "@langchain/openai";
70
- import { PromptTemplate, AIMessagePromptTemplate, ChatMessagePromptTemplate, ChatPromptTemplate, HumanMessagePromptTemplate, MessagesPlaceholder, SystemMessagePromptTemplate, PipelinePromptTemplate, } from "@langchain/core/prompts";
71
- import { AIMessage, AIMessageChunk, BaseMessage, BaseMessageChunk, ChatMessage, ChatMessageChunk, FunctionMessage, FunctionMessageChunk, HumanMessage, HumanMessageChunk, SystemMessage, SystemMessageChunk, ToolMessage, ToolMessageChunk, } from "@langchain/core/messages";
70
+ import { PromptTemplate, AIMessagePromptTemplate, ChatMessagePromptTemplate, ChatPromptTemplate, HumanMessagePromptTemplate, MessagesPlaceholder, SystemMessagePromptTemplate, PipelinePromptTemplate } from "@langchain/core/prompts";
71
+ import { AIMessage, AIMessageChunk, BaseMessage, BaseMessageChunk, ChatMessage, ChatMessageChunk, FunctionMessage, FunctionMessageChunk, HumanMessage, HumanMessageChunk, SystemMessage, SystemMessageChunk, ToolMessage, ToolMessageChunk } from "@langchain/core/messages";
72
72
  import { StringPromptValue } from "@langchain/core/prompt_values";
73
- import { RouterRunnable, RunnableAssign, RunnableBinding, RunnableBranch, RunnableEach, RunnableMap, RunnableParallel, RunnablePassthrough, RunnablePick, RunnableRetry, RunnableSequence, RunnableWithFallbacks, RunnableWithMessageHistory, } from "@langchain/core/runnables";
73
+ import { RouterRunnable, RunnableAssign, RunnableBinding, RunnableBranch, RunnableEach, RunnableMap, RunnableParallel, RunnablePassthrough, RunnablePick, RunnableRetry, RunnableSequence, RunnableWithFallbacks, RunnableWithMessageHistory } from "@langchain/core/runnables";
74
74
  import { StringOutputParser } from "@langchain/core/output_parsers";
75
75
  import { ChatGenerationChunk, GenerationChunk } from "@langchain/core/outputs";
76
76
  import { ChatFireworks } from "@langchain/community/chat_models/fireworks";
77
77
  import { Fireworks } from "@langchain/community/llms/fireworks";
78
78
  const chat_models__openai = {
79
- ChatOpenAI,
79
+ ChatOpenAI
80
80
  };
81
81
  export { chat_models__openai };
82
82
  const llms__openai = {
83
- OpenAI,
83
+ OpenAI
84
84
  };
85
85
  export { llms__openai };
86
86
  const embeddings__openai = {
87
- OpenAIEmbeddings,
87
+ OpenAIEmbeddings
88
88
  };
89
89
  export { embeddings__openai };
90
90
  const prompts__prompt = {
91
- PromptTemplate,
91
+ PromptTemplate
92
92
  };
93
93
  export { prompts__prompt };
94
94
  const schema__messages = {
@@ -105,24 +105,41 @@ const schema__messages = {
105
105
  SystemMessage,
106
106
  SystemMessageChunk,
107
107
  ToolMessage,
108
- ToolMessageChunk,
108
+ ToolMessageChunk
109
109
  };
110
110
  export { schema__messages };
111
+ const schema = {
112
+ AIMessage,
113
+ AIMessageChunk,
114
+ BaseMessage,
115
+ BaseMessageChunk,
116
+ ChatMessage,
117
+ ChatMessageChunk,
118
+ FunctionMessage,
119
+ FunctionMessageChunk,
120
+ HumanMessage,
121
+ HumanMessageChunk,
122
+ SystemMessage,
123
+ SystemMessageChunk,
124
+ ToolMessage,
125
+ ToolMessageChunk
126
+ };
127
+ export { schema };
111
128
  const prompts__chat = {
112
129
  AIMessagePromptTemplate,
113
130
  ChatMessagePromptTemplate,
114
131
  ChatPromptTemplate,
115
132
  HumanMessagePromptTemplate,
116
133
  MessagesPlaceholder,
117
- SystemMessagePromptTemplate,
134
+ SystemMessagePromptTemplate
118
135
  };
119
136
  export { prompts__chat };
120
137
  const prompts__pipeline = {
121
- PipelinePromptTemplate,
138
+ PipelinePromptTemplate
122
139
  };
123
140
  export { prompts__pipeline };
124
141
  const prompts__base = {
125
- StringPromptValue,
142
+ StringPromptValue
126
143
  };
127
144
  export { prompts__base };
128
145
  const schema__runnable = {
@@ -138,23 +155,23 @@ const schema__runnable = {
138
155
  RunnableRetry,
139
156
  RunnableSequence,
140
157
  RunnableWithFallbacks,
141
- RunnableWithMessageHistory,
158
+ RunnableWithMessageHistory
142
159
  };
143
160
  export { schema__runnable };
144
161
  const schema__output_parser = {
145
- StringOutputParser,
162
+ StringOutputParser
146
163
  };
147
164
  export { schema__output_parser };
148
165
  const schema__output = {
149
166
  ChatGenerationChunk,
150
- GenerationChunk,
167
+ GenerationChunk
151
168
  };
152
169
  export { schema__output };
153
170
  const chat_models__fireworks = {
154
- ChatFireworks,
171
+ ChatFireworks
155
172
  };
156
173
  export { chat_models__fireworks };
157
174
  const llms__fireworks = {
158
- Fireworks,
175
+ Fireworks
159
176
  };
160
177
  export { llms__fireworks };
@@ -17,5 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  const entrypoint_deprecation_js_1 = require("../util/entrypoint_deprecation.cjs");
18
18
  /* #__PURE__ */ (0, entrypoint_deprecation_js_1.logVersion010MigrationWarning)({
19
19
  oldEntrypointName: "vectorstores/weaviate",
20
+ newEntrypointName: "",
21
+ newPackageName: "@langchain/weaviate",
20
22
  });
21
23
  __exportStar(require("@langchain/community/vectorstores/weaviate"), exports);
@@ -1,5 +1,7 @@
1
1
  import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
2
2
  /* #__PURE__ */ logVersion010MigrationWarning({
3
3
  oldEntrypointName: "vectorstores/weaviate",
4
+ newEntrypointName: "",
5
+ newPackageName: "@langchain/weaviate",
4
6
  });
5
7
  export * from "@langchain/community/vectorstores/weaviate";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langchain",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Typescript bindings for langchain",
5
5
  "type": "module",
6
6
  "engines": {
@@ -1175,6 +1175,7 @@
1175
1175
  "type": "git",
1176
1176
  "url": "git@github.com:langchain-ai/langchainjs.git"
1177
1177
  },
1178
+ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/langchain/",
1178
1179
  "scripts": {
1179
1180
  "build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
1180
1181
  "build:deps": "yarn run turbo:command build --filter=@langchain/core --filter=@langchain/anthropic --filter=@langchain/openai --filter=@langchain/community --concurrency=1",
@@ -1187,7 +1188,7 @@
1187
1188
  "lint": "yarn lint:eslint && yarn lint:dpdm",
1188
1189
  "lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
1189
1190
  "precommit": "lint-staged",
1190
- "clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn create-entrypoints -- --pre --gen-maps",
1191
+ "clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre --gen-maps",
1191
1192
  "prepack": "yarn build",
1192
1193
  "release": "release-it --only-version --config .release-it.json",
1193
1194
  "test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
@@ -1255,7 +1256,6 @@
1255
1256
  "eslint-plugin-prettier": "^4.2.1",
1256
1257
  "fast-xml-parser": "^4.2.7",
1257
1258
  "google-auth-library": "^8.9.0",
1258
- "googleapis": "^126.0.1",
1259
1259
  "handlebars": "^4.7.8",
1260
1260
  "html-to-text": "^9.0.5",
1261
1261
  "ignore": "^5.2.0",
@@ -1315,7 +1315,6 @@
1315
1315
  "epub2": "^3.0.1",
1316
1316
  "fast-xml-parser": "^4.2.7",
1317
1317
  "google-auth-library": "^8.9.0",
1318
- "googleapis": "^126.0.1",
1319
1318
  "handlebars": "^4.7.8",
1320
1319
  "html-to-text": "^9.0.5",
1321
1320
  "ignore": "^5.2.0",
@@ -1421,9 +1420,6 @@
1421
1420
  "google-auth-library": {
1422
1421
  "optional": true
1423
1422
  },
1424
- "googleapis": {
1425
- "optional": true
1426
- },
1427
1423
  "handlebars": {
1428
1424
  "optional": true
1429
1425
  },