Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help #350

Open
Vanagandrffws opened this issue Nov 26, 2024 · 4 comments
Open

help #350

Vanagandrffws opened this issue Nov 26, 2024 · 4 comments

Comments

@Vanagandrffws
Copy link

PS C:\Users\Matt\OneDrive\Desktop\mindcraft-main\mindcraft-main> node main.js
[ './andy.json' ]
MindServer running on port 8080
Starting agent with profile: ./andy.json
Starting agent initialization with profile: ./andy.json
Initializing action manager...
Initializing prompter...
Using chat settings: { model: 'gpt-4o-mini', api: 'openai' }
Agent start failed with error: {
message: 'API key "OPENAI_API_KEY" not found in keys.json or environment variables!',
stack: 'Error: API key "OPENAI_API_KEY" not found in keys.json or environment variables!\n' +
' at getKey (file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/utils/keys.js:17:15)\n' +
' at new GPT (file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/models/gpt.js:16:25)\n' +
' at new Prompter (file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/agent/prompter.js:71:31)\n' +
' at Agent.start (file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/agent/agent.js:34:29)\n' +
' at file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/process/init-agent.js:48:21\n' +
' at file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/process/init-agent.js:57:3\n' +
' at ModuleJob.run (node:internal/modules/esm/module_job:268:25)\n' +
' at async onImport.tracePromise.proto (node:internal/modules/esm/loader:543:26)\n' +
' at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)',
error: {}
}
Failed to start agent process: {
message: 'API key "OPENAI_API_KEY" not found in keys.json or environment variables!',
stack: 'Error: API key "OPENAI_API_KEY" not found in keys.json or environment variables!\n' +
' at getKey (file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/utils/keys.js:17:15)\n' +
' at new GPT (file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/models/gpt.js:16:25)\n' +
' at new Prompter (file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/agent/prompter.js:71:31)\n' +
' at Agent.start (file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/agent/agent.js:34:29)\n' +
' at file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/process/init-agent.js:48:21\n' +
' at file:///C:/Users/Matt/OneDrive/Desktop/mindcraft-main/mindcraft-main/src/process/init-agent.js:57:3\n' +
' at ModuleJob.run (node:internal/modules/esm/module_job:268:25)\n' +
' at async onImport.tracePromise.proto (node:internal/modules/esm/loader:543:26)\n' +
' at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)',
error: {}
}
Agent process exited with code 1 and signal null
Agent process ./andy.json exited too quickly and will not be restarted.
All agent processes have ended. Exiting.
PS C:\Users\Matt\OneDrive\Desktop\mindcraft-main\mindcraft-main>

@quuuut
Copy link

quuuut commented Nov 27, 2024

check: is your openai api key in keys.json?

@Vanagandrffws
Copy link
Author

yes it is i dont know what else to do

@varungarg6756
Copy link

what type of api key did u enter in keys.json? make sure your andy.json has the same model same as the key u entered

@BF5258
Copy link

BF5258 commented Jan 20, 2025

Also, make sure the file is called "keys.json" not "keys.example.json". If not, rename it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants