Golang Boilerplate for OpenAI + PostgreSQL + go-chi

  • By Sigrid Jin (ง'̀-'́)ง oO
  • Last update: Jul 27, 2023
  • Comments: 0

Golang Boilerplate for OpenAI Service


  • This repository is for the golang-based server boilerplate that wraps OpenAI Service with PostgreSQL and go-chi.
  • The codebase uses the Reverse Engineered ChatGPT API by Antonio Cheong and it is also largely influenced by go-gpt3 from PullRequest Inc.
  • It currently lacks the support for GPT-4 yet whereby please feel free to send the pull request on the repository.

Environment Variables

  • Please make sure that the environment variable has been defined in the ./config.yaml like the following:
Environment: DEV
  API_KEY: "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // if you are going to use the official API
  ACCESS_TOKEN: "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // if you are going to use the reverse-engineered API