Simple OpenAI completion app to generate a coffee bean recipe.
Send a prompt using a form submit and stream the response with SSE.
The prompt generates a simple recipe approximating grind amount and yield.
You must setup an .env
file first.
To get a key, go here: openai.com/blog/openai-api
PORT=8080 OPENAI_API_KEY=your_openai_key
Download modules and run
go mod tidy go run main.go
github.com/sashabaranov/go-openai