March 20, 2023, 6:54 p.m. | Eric Hartford

Playing with AI erichartford.com

I thought I would try out ChatGPT's new API, so I decided to write a command line interface. My code is located here:


I wanted it to be conversational, so it will remember your conversation history as you type.


Similar to chatgpt-wrapper. https://github.com/mmabrouk/chatgpt-wrapper but in Node.


I wanted it to use TypeScript, and I wanted it to use Node's new native fetch api (which was officially promoted from "experimental" as of 18.13.0)


Example output:



I found that it's …

api chatgpt code command command line conversation conversational fetch history line node playing thought type typescript

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne