This is a web server for multiple demos from OpenAI's Developer quickstart examples.
It was built with Node.js and uses the Express, body-parser, openAI APIs for node.
This is a good place to start with building simple generative AI applications. Python is peferred, but node will do in a pinch. Even if you don't plan to code, understanding how generative AI works is helpful in knowing how it works and what is possible.
We are headed toward programming in human language. This is a step in that direction. Not English, but simplier than other frameworks.
https://github.com/lesliepound/openai-api-examples-node
Node,Express,OpenAI
-
Download and install Node.
-
Make a copy of this repository. This will be your <local_repo>. New to github? Use Download Zip option.
-
Install Express
npm install express
(installs node and npm) -
Form Help
npm install body-parser
-
Install Openai
npm install openai
-
Setup openAI key in evironment variables.
This repository contains demos from the OpenAI Developer quickstart for the APIs in
Name | Modules | endpoint |
---|---|---|
http://localhost:3000 | ||
src/modules/... | public/... | |
text generation (chat) | chat.js | /chat.html |
adjust creatvivity | chat.js | /temperature.html |
prompt training | chat.js | /fewshot.html |
functions | functions.js | /funcrions.html |
vision | visual.js | /visual.html |
speak | stt.js | /stt.html |
listen | tts.js | /tts.html |
moderation | moderation.js | /moderation.html |
cd <local_repo>
node app.js