@stackfactor/agent-utils 1.0.18 → 1.0.19
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/cjs/langChain.js +2 -2
- package/dist/esm/langChain.js +2 -2
- package/package.json +1 -1
package/dist/cjs/langChain.js
CHANGED
|
@@ -9,7 +9,7 @@ const google_genai_1 = require("@langchain/google-genai");
|
|
|
9
9
|
const openai_2 = require("openai");
|
|
10
10
|
const genai_1 = require("@google/genai");
|
|
11
11
|
const const_js_1 = __importDefault(require("./const.js"));
|
|
12
|
-
const langchain_1 =
|
|
12
|
+
const langchain_1 = require("langchain");
|
|
13
13
|
const errorHandling_js_1 = __importDefault(require("./errorHandling.js"));
|
|
14
14
|
const logger_js_1 = __importDefault(require("./logger.js"));
|
|
15
15
|
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
@@ -325,7 +325,7 @@ const getLLMModel = (modelName, config, schema = null) => {
|
|
|
325
325
|
* @returns A configured LangChain agent instance ready to be run with `runAgent`
|
|
326
326
|
*/
|
|
327
327
|
const createAgent = (name, modelName, systemPrompt, tools = [], responseFormat, config) => {
|
|
328
|
-
const agent = langchain_1.
|
|
328
|
+
const agent = (0, langchain_1.createAgent)({
|
|
329
329
|
name: name,
|
|
330
330
|
model: getLLMModel(modelName, config),
|
|
331
331
|
systemPrompt: systemPrompt.trim(),
|
package/dist/esm/langChain.js
CHANGED
|
@@ -4,7 +4,7 @@ import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
|
|
|
4
4
|
import { OpenAI } from "openai";
|
|
5
5
|
import { GoogleGenAI } from "@google/genai";
|
|
6
6
|
import constants from "./const.js";
|
|
7
|
-
import
|
|
7
|
+
import { createAgent as createLangChainAgent } from "langchain";
|
|
8
8
|
import errorHandlingHelper from "./errorHandling.js";
|
|
9
9
|
import logger from "./logger.js";
|
|
10
10
|
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
@@ -320,7 +320,7 @@ const getLLMModel = (modelName, config, schema = null) => {
|
|
|
320
320
|
* @returns A configured LangChain agent instance ready to be run with `runAgent`
|
|
321
321
|
*/
|
|
322
322
|
const createAgent = (name, modelName, systemPrompt, tools = [], responseFormat, config) => {
|
|
323
|
-
const agent =
|
|
323
|
+
const agent = createLangChainAgent({
|
|
324
324
|
name: name,
|
|
325
325
|
model: getLLMModel(modelName, config),
|
|
326
326
|
systemPrompt: systemPrompt.trim(),
|