Skip to content

A conversational chatbot built using Streamlit and Ollama, designed to interact with users, process queries, and generate responses using AI models. It also includes the functionality to save chat conversations as PDF files.

Notifications You must be signed in to change notification settings

nishchal-kansara/ollama-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ollama Chatbot

A conversational chatbot built using Streamlit and Ollama, designed to interact with users, process queries, and generate responses using AI models. It also includes the functionality to save chat conversations as PDF files.

🚀 Features

  • Interactive Chat Interface: Communicate seamlessly with the chatbot.
  • Model Selection: Choose from available AI models provided by Ollama.
  • PDF Export: Save chat conversations as downloadable PDF files.
  • User-Friendly UI: Responsive and clean design using Streamlit.

🛠️ Tech Stack

  • Python: Core programming language.
  • Streamlit: Frontend for chatbot UI.
  • Ollama: Backend AI model provider.
  • FPDF: PDF generation library.

📦 Installation

  1. Clone the Repository:

    git clone https://github.com/your-username/ollama-chatbot.git
    cd ollama-chatbot
  2. Ollama Setup:

  3. Install Dependencies:

    • Streamlit: Installation Guide
      pip install streamlit
    • Ollama:
      pip install ollama
    • Pull and Verify Model:
      ollama pull {model: model_library}
      ollama list
      ollama run {pulled_model}
    • FPDF:
      pip install fpdf
  4. Run the Application:

    streamlit run chatBot.py

📑 How to Use

  1. Select an AI Model:

    • Use the dropdown to pick an available Ollama model.
  2. Start Chatting:

    • Type your message in the chat input field and interact with the AI.
  3. Save Chat as PDF:

    • Click on "Save as PDF" to download the chat conversation.

📝 Folder Structure

ollama-chatbot/
├── chatBot.py        # Main application file
├── fonts/            # Folder for font files
├── response-pdf/     # Folder for saving generated PDFs
├── README.md

⚠️ Error Handling

  • If no model is selected, an error message will prompt the user.
  • Any unexpected errors will be displayed in the Streamlit interface.

🌐 Resources

🎬 Video Tutorial

Check Out Video Tutorial Here: Click Here to Watch Video Tutorial

Enjoy building with Ollama Chatbot! 🤖✨

👤 Author

Developed by Nishchal Kansara using Ollama

Check out My Projects & Resume

  1. Personal Website: https://nishchal-kansara.web.app/
  2. Resume: https://nishchal-kansara.web.app/resume.html

Connect with me on LinkedIn: Nishchal Kansara

About

A conversational chatbot built using Streamlit and Ollama, designed to interact with users, process queries, and generate responses using AI models. It also includes the functionality to save chat conversations as PDF files.

Topics

Resources

Stars

Watchers

Forks

Languages