Skip to content

mrafeie/CV_Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CVBot - AI Chat Assistant

A Django-based chat application that uses OpenAI's GPT-3.5-turbo model to provide intelligent responses.

Features

  • Modern, responsive chat interface
  • OpenAI GPT-3.5-turbo integration
  • Real-time message handling
  • Mobile-friendly design
  • Chat history sidebar

Setup Instructions

1. Install Dependencies

pip install -r requirements.txt

2. Configure OpenAI API

  1. Get your OpenAI API key from https://platform.openai.com/api-keys
  2. Create a .env file in the project root with your API key:
OPENAI_API_KEY=your_actual_api_key_here

3. Run Database Migrations

python manage.py migrate

4. Start the Development Server

python manage.py runserver

5. Access the Application

Open your browser and go to http://localhost:8000/chat/

Configuration

The application uses the following OpenAI API settings:

  • Model: gpt-3.5-turbo
  • Max tokens: 150
  • Temperature: 0.7

You can modify these settings in the generate_bot_response function in chat/views.py.

Project Structure

cvbot/
├── chat/                 # Main chat application
│   ├── models.py        # Database models
│   ├── views.py         # View functions including OpenAI integration
│   ├── urls.py          # URL routing
│   └── templates/       # HTML templates
├── cvbot/               # Django project settings
│   ├── settings.py      # Project configuration
│   └── urls.py          # Main URL routing
├── requirements.txt     # Python dependencies
└── manage.py           # Django management script

Troubleshooting

  • "OPENAI_API_KEY not found": Make sure you've created the .env file with your API key
  • Authentication errors: Verify your OpenAI API key is correct and has sufficient credits
  • Rate limit errors: The API has usage limits; wait a moment and try again

Security Notes

  • Never commit your .env file to version control
  • Keep your OpenAI API key secure and don't share it publicly
  • Consider using environment variables in production deployments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors