8000 GitHub - Phani-LP/Converse-AI: Developed an AI-powered chatbot platform using Django for the backend, integrating Google Gemini-Flash 1.5 for multimodal capabilities..
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Developed an AI-powered chatbot platform using Django for the backend, integrating Google Gemini-Flash 1.5 for multimodal capabilities..

Notifications You must be signed in to change notification settings

Phani-LP/Converse-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ConverseAI

Sample Image ConverseAI is an advanced AI-powered chatbot platform built using Django. It is designed to provide seamless and interactive communication experiences by leveraging the latest advancements in AI technology. Recently, the project has been upgraded to use **Google Gemini-Flash 1.5**, replacing CohereAI, to deliver enhanced multimodal capabilities, improved performance, and greater efficiency.

🌟 Key Features of Gemini-Flash 1.5

Multimodal Capabilities

  • Processes and generates various forms of data, including text, images, video, and audio.
  • Enables tasks like image and video captioning, question answering from videos, and more.

Speed and Efficiency

  • Designed for high-volume, high-frequency tasks.
  • Optimized for speed and cost-effectiveness, making it ideal for real-world applications.

Long Context Window

  • Capable of processing and understanding significantly longer pieces of text compared to previous models.

Improved Performance

  • Excels in tasks such as:
    • Summarization
    • Chat applications
    • Data extraction
  • Delivers accurate and context-aware responses.

Versatility

  • Suitable for a wide range of applications across different domains, including education, healthcare, customer support, and more.

1.5 Flash

  • The latest addition to the Gemini model family.
  • Highly optimized for speed and efficiency.
  • Demonstrates superior multimodal reasoning capabilities.

πŸ”‘ Key Functionalities (Coding Perspective)

Here are the key functionalities implemented in the ConverseAI project based on its code structure:

1. Chatbot Interaction

  • Functionality: Handles user interactions with the AI-powered chatbot.
  • Key Functions:
    • process_user_input(request): Processes user input and sends it to the Google Gemini API for generating responses.
    • generate_response(data): Handles API calls to Google Gemini and returns AI-generated responses.
  • Purpose: Enables seamless communication between users and the AI chatbot.

2. Multimodal Data Processing

  • Functionality: Supports processing of text, images, videos, and audio.
  • Key Functions:
    • process_image(file): Extracts information or captions from uploaded images.
    • process_video(file): Analyzes video content for tasks like captioning or answering questions.
    • process_audio(file): Converts audio to text and processes it for AI responses.
  • Purpose: Provides advanced multimodal capabilities for real-world applications.

3. User Authentication and Profile Management

  • Functionality: Manages user accounts and profiles.
  • Key Functions:
    • register_user(form_data): Handles user registration.
    • login_user(credentials): Authenticates users and starts a session.
    • update_profile(user, data): Updates user profile information.
  • Purpose: Ensures secure user authentication and profile management.

4. Contact Form Submission

  • Functionality: Allows users to send messages or inquiries to the admin.
  • Key Functions:
    • submit_contact_form(form_data): Validates and saves contact form submissions.
    • notify_admin(message): Sends notifications to the admin about new inquiries.
  • Purpose: Facilitates communication between users and the admin.

5. Static and Media File Handling

  • Functionality: Manages static assets (CSS, JS) and user-uploaded media files.
  • Key Functions:
    • serve_static_files(request): Serves static files like CSS and JavaScript.
    • handle_media_upload(file): Saves and processes uploaded media files.
  • Purpose: Ensures proper handling of static and media files for the application.

6. API Integration

  • Functionality: Integrates with the Google Gemini API for AI functionalities.
  • Key Functions:
    • get_gemini_response(input_data): Sends requests to the API and retrieves responses.
    • handle_api_errors(response): Handles errors or exceptions from the API.
  • Purpose: Provides a seamless connection to the AI backend.

7. Error Handling and Logging

  • Functionality: Manages errors and logs important events.
  • Key Functions:
    • log_error(error): Logs errors for debugging and monitoring.
    • handle_404(request): Custom handler for 404 errors.
  • Purpose: Ensures a smooth user experience and aids in debugging.

8. Database Operations

  • Functionality: Handles database interactions for storing and retrieving data.
  • Key Functions:
    • save_chat_history(user, message, response): Saves user-chatbot interactions.
    • get_user_data(user_id): Retrieves user-specific data from the database.
  • Purpose: Maintains a persistent record of user interactions and data.

These functions collectively power the ConverseAI platform, enabling it to deliver a robust and feature-rich AI chatbot experience.

πŸš€ Real-World Applications

ConverseAI is not just a theoretical project; it has been designed with real-world use cases in mind. Here are some examples of how it can be applied:

  1. Customer Support:

    • Automate responses to customer queries with accurate and context-aware answers.
    • Handle multimedia inputs like images or videos for better support.
  2. Education:

    • Provide students with AI-assisted learning tools for answering questions, summarizing content, and more.
    • Enable interactive learning experiences with multimodal capabilities.
  3. Healthcare:

    • Assist in patient support by answering health-related queries.
    • Process and analyze medical images or reports for better insights.
  4. Content Creation:

    • Generate high-quality summaries, captions, and descriptions for text, images, and videos.
    • Assist in creative writing and brainstorming.
  5. Data Analysis:

    • Extract valuable insights from large datasets.
    • Summarize lengthy reports or documents for quick understanding.

πŸ› οΈ Installation and Setup

Follow these steps to set up the project on your local machine:

  1. Clone the Repository:

    git clone <repository-url>
    cd ConverseAI
  2. Create a Virtual Environment:

    python -m venv venv
    source venv/bin/activate 
    # On Windows: env\Scripts\activate
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Set Up Environment Variables:

    • Instead of hardcoding sensitive information like the Google Gemini API Key, use environment variables for better security.

    • Create a .env file in the root directory of your project and add the API key:

      # .env
      GOOGLE_GEMINI_API_KEY=your-google-gemini-api-key
      
    • Install the python-decouple package to manage environment variables:

      pip install python-decouple
    • Update your settings.py or a dedicated configuration file to load the API key securely:

      # filepath: [settings.py](http://_vscodecontentref_/0)
       decfromouple import config
      
      API_KEY = config('GOOGLE_GEMINI_API_KEY')

    This approach ensures that sensitive information is not exposed in the source code and can be managed securely across different environments.

  5. Apply Migrations:

    python manage.py migrate
  6. Run the Development Server:

    python manage.py runserver
  7. Access the Application:
    Open your browser and navigate to http://127.0.0.1:8000.

🧩Project Structure:

ConverseAI/
β”œβ”€β”€ AiAssistant/
β”‚   β”œβ”€β”€ migrations/
β”‚   β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ views.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ forms.py
β”‚   └── urls.py
β”œβ”€β”€ ConverseAI/
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ urls.py
β”‚   β”œβ”€β”€ asgi.py
β”‚   └── wsgi.py
β”œβ”€β”€ assets/
β”œβ”€β”€ media/
β”œβ”€β”€ static/
β”œβ”€β”€ templates/
β”œβ”€β”€ [manage.py](http://_vscodecontentref_/1)
β”œβ”€β”€ variables.py
└── [README.md](http://_vscodecontentref_/2)

πŸ“ˆ Future Enhancements

Voice Interaction: Add support for voice-based conversations. Real-Time Analytics: Provide insights into user interactions and chatbot performance. Customizable AI Models: Allow users to fine-tune the AI for specific use cases. Mobile App Integration: Extend the platform to mobile devices for better accessibility.

🀝 Contributing

We welcome contributions to improve ConverseAI! To contribute:

  • Fork the repository.
  • Create a new branch for your feature or bug fix.
  • Submit a pull request with a detailed description of your changes.

πŸ“§Contact

For any questions or feedback, feel free to reach out:

Email: dnagaphanindrait@example.com
GitHub: https://github.com/Phani-LP


Thank you for using ConverseAI! I hope it helps you unlock the full potential of AI in your projects.🌎

About

Developed an AI-powered chatbot platform using Django for the backend, integrating Google Gemini-Flash 1.5 for multimodal capabilities..

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0