A lightweight Go backend that answers questions about my skills, experience, and hobbies using the OpenAI API. You can integrate this API with any frontend (React, etc.) to provide a conversational Q&A bot about a resume.
- Simple REST API for Q&A about a resume
- Powered by OpenAI’s GPT-3.5 Turbo for accurate, concise answers
- Reads the resume from a local file (not tracked in git for privacy)
- Easy to deploy, cross-platform, and Docker-friendly
- Go 1.20 or later (get it from https://go.dev/dl/)
- An OpenAI API key (get one here)
- Your
resume.txtin the root of the project (plain text or markdown)
OPENAI_API_KEY– Your OpenAI API key (required)
-
Clone the repository:
git clone https://github.com/yourusername/resume-chatbot-go.git cd resume-chatbot-go -
Add your resume:
- Copy your resume as
resume.txtin the project root. - DO NOT COMMIT your real resume!
resume.txtis in.gitignoreby default.
- Copy your resume as
-
Set your OpenAI API key:
export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -
Build and run:
go build -o your-bot ./your-bot
Or, just:
go run main.go
-
API Endpoint:
-
The API will be available at:
http://localhost:8080/chat -
Example request:
curl -X POST http://localhost:8080/chat \ -H "Content-Type: application/json" \ -d '{"message": "What is your’s experience with Go?"}'
-
You can build and run with Docker (if you prefer):
docker build -t your-bot .
docker run -e OPENAI_API_KEY=sk-xxxxxx -v $(pwd)/resume.txt:/app/resume.txt -p 8080:8080 your-bot...
Questions or Issues?
Open an issue or reach out to Me!
Cheers! 🎉