Build a shareable, secure LLM chatbot that demonstrates real-world skills—prompt design, OpenAI SDK v1 integration, stateful chat UX, and modern deployment—while protecting API keys and controlling costs.
Focus: accessibility + safety—one-click web demo, guarded by usage caps and secrets management; clear code structure that’s easy to extend.
I implemented a web chatbot using Gradio with the OpenAI Python SDK v1 (OpenAI()
client). The app supports topic context and conversation history, so follow-up questions feel natural. I designed the system prompt for clarity and short, example-driven explanations, and added sensible defaults (temperature, token caps) for predictable behavior.
The UI uses gr.ChatInterface
for a polished chat experience (retry/undo/new-chat). Environment secrets are handled securely in Hugging Face Spaces, keeping the API key out of the client and repository. The repository includes an ATS-friendly README with run-locally instructions and a link to the live demo.
To make the demo safe to share publicly, I configured hard usage limits on the OpenAI account and added guardrails (token/turn caps). The design supports an optional BYOK (Bring Your Own Key) textbox so advanced users can test without hitting the shared demo limit. The result is a fast, reliable showcase that recruiters can try in seconds while keeping costs and keys protected.