You can have a conversation with a computer on your terminal.
create a secret key on OpenAI API
edit .env
OPENAI_API_KEY=****
or set the environment variables
export OPENAI_API_KEY=****
deno run -A aichat.js
in Deno
import { fetchChat } from "https://code4fukui.github.io/ai_chat/fetchChat.js"
console.log(await fetchChat("How about you?"));
deno run -A https://code4fukui.github.io/ai_chat/ai.js "Who are you?"
you can get the response
Robot: I'm a robot.