I set the .env to work only with BingAi but it keeps giving me an openai key failure error.
C:\ecc\bin ai\assistant>node --loader ts-node/esm src/index.ts
(node:12100) ExperimentalWarning: --experimental-loader may be removed in the future; instead use register():
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));'
(Use node --trace-warnings ... to show where the warning was created)
[WARNING]: Importing from "langchain/prompts" is deprecated.
Instead, please import from "@langchain/core/prompts".
This will be mandatory after the next "langchain" minor version bump to 0.2.
[WARNING]: Importing from "langchain/schema" is deprecated.
Instead, please import from the appropriate entrypoint in "@langchain/core" or "langchain".
This will be mandatory after the next "langchain" minor version bump to 0.2.
[WARNING]: Importing from "langchain/schema/runnable" is deprecated.
Instead, please import from "@langchain/core/runnables".
This will be mandatory after the next "langchain" minor version bump to 0.2.
file:///C:ecc/Desktop/bin%20ai/assistant/node_modules/.pnpm/@langchain+openai@0.0.13/node_modules/@langchain/openai/dist/chat_models.js:338
throw new Error("OpenAI or Azure OpenAI API key not found");
^
Error: OpenAI or Azure OpenAI API key not found
at new ChatOpenAI (file:///C:/ecc/Desktop/bin%20ai/assistant/node_modules/.pnpm/@langchain+openai@0.0.13/node_modules/@langchain/openai/dist/chat_models.js:338:19)
at file:///C:/ecc//bin%20ai/assistant/src/clients/tools-openrouter.ts:7:15
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
The issue should be resolved in pull request #283 . Please ensure to update your .env file with the new ENABLE_WEB_BROWSER_TOOL information, as detailed in the .env.example file.
I set the .env to work only with BingAi but it keeps giving me an openai key failure error.
C:\ecc\bin ai\assistant>node --loader ts-node/esm src/index.ts (node:12100) ExperimentalWarning:
--experimental-loader
may be removed in the future; instead useregister()
: --import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));' (Usenode --trace-warnings ...
to show where the warning was created) [WARNING]: Importing from "langchain/prompts" is deprecated.Instead, please import from "@langchain/core/prompts".
This will be mandatory after the next "langchain" minor version bump to 0.2. [WARNING]: Importing from "langchain/schema" is deprecated.
Instead, please import from the appropriate entrypoint in "@langchain/core" or "langchain".
This will be mandatory after the next "langchain" minor version bump to 0.2. [WARNING]: Importing from "langchain/schema/runnable" is deprecated.
Instead, please import from "@langchain/core/runnables".
This will be mandatory after the next "langchain" minor version bump to 0.2. file:///C:ecc/Desktop/bin%20ai/assistant/node_modules/.pnpm/@langchain+openai@0.0.13/node_modules/@langchain/openai/dist/chat_models.js:338 throw new Error("OpenAI or Azure OpenAI API key not found"); ^
Error: OpenAI or Azure OpenAI API key not found at new ChatOpenAI (file:///C:/ecc/Desktop/bin%20ai/assistant/node_modules/.pnpm/@langchain+openai@0.0.13/node_modules/@langchain/openai/dist/chat_models.js:338:19) at file:///C:/ecc//bin%20ai/assistant/src/clients/tools-openrouter.ts:7:15 at ModuleJob.run (node:internal/modules/esm/module_job:218:25) at async ModuleLoader.import (node:internal/modules/esm/loader:329:24) at async loadESM (node:internal/process/esm_loader:28:7) at async handleMainPromise (node:internal/modules/run_main:113:12)
Node.js v20.11.1