merlin-node icon indicating copy to clipboard operation
merlin-node copied to clipboard

give merlin config apiKey and still got a init error about open_ai_key env not provider.

Open chenyuncai opened this issue 2 years ago • 3 comments

Current Behavior

just the eample code with pnpm and typescript.

Expected Behavior

import { Merlin } from 'merlin-node' const merlin = new Merlin({ merlinConfig: { apiKey: 'some key *****************************' } })

  • Version: 0.0.6-development
  • Platform:
  • Node.js Version: 20.8.0

chenyuncai avatar Dec 18 '23 03:12 chenyuncai

What is your platform?

puneet1337 avatar Dec 18 '23 10:12 puneet1337

windows 11.

chenyuncai avatar Dec 27 '23 03:12 chenyuncai

Solution

Before executing the program, set the environment variable in the terminal:

$env:OPENAI_API_KEY = '<API_KEY>'

Then, run your program.

adarshkr357 avatar Jul 22 '24 14:07 adarshkr357