- Respond to conversation in a very friendly manner and might offer some advice and comfort
- 100% FREE - No API costs using Hugging Face Router API
- Serverless - No backend server needed, runs entirely in the browser
- Deployable to Vercel, Netlify, or any static hosting platform
- Uses powerful Qwen AI model for intelligent responses
- Clone the repository:
git clone https://github.com/johnmichealacera/chatgpt-sample.git - Navigate to the project directory:
cd chatgpt-sample - Install dependencies:
npm install
- Go to Hugging Face Settings
- Create a new token (it's free!)
- Update the token in
src/App.vueon line 27:const HF_API_TOKEN = 'your_token_here';
npm run serveNavigate to http://localhost:8080/ in your browser
- Update your token in
src/App.vue - Deploy to Vercel/Netlify:
- Push to GitHub
- Connect your repository to Vercel/Netlify
- Deploy! (No additional configuration needed)
- Go to Hugging Face Models
- Filter by "Text Generation" or "Conversational"
- Look for models with the "Inference Providers" section
- On the model page, scroll down to find "Inference Providers"
- If you see providers like "nscale", "serverless", etc., the model is available
- Copy the model name (e.g.,
Qwen/Qwen2.5-72B-Instruct)
- Replace the model name in
src/App.vueline 42:model: "YOUR_MODEL_NAME_HERE",
Qwen/Qwen2.5-72B-Instruct- Very capable, good for conversationsmicrosoft/DialoGPT-medium- Designed for dialoguemeta-llama/Llama-3.2-11B-Vision-Instruct- Supports visionmistralai/Mistral-7B-Instruct-v0.3- Fast and efficient
curl -X POST "https://router.huggingface.co/v1/chat/completions" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen2.5-72B-Instruct",
"messages": [{"role": "user", "content": "Hello!"}],
"max_tokens": 100
}'- Vue.js - The web framework used
- Hugging Face Router API - FREE AI API
- Qwen AI Model - Powerful language model
- Vercel - Deployment platform
- Fork the repository
- Create a new branch:
git checkout -b feature-name - Make changes and commit:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE.md file for details.