Giter Club home page Giter Club logo

anychat's Introduction

AnyChat: Chat with Your Documents

AnyChat is a powerful chatbot that allows you to interact with your documents (PDF, TXT, DOCX, ODT, PPTX, CSV, etc.) in a natural and conversational way. It leverages the capabilities of LangChain, Ollama, Groq, Gemini, and Streamlit to provide an intuitive and informative experience.

Chatbot-20_04_24.mp4

Features

  • Conversational Interaction: Ask questions about your documents and receive human-like responses from the chatbot.
  • Multi-Document Support: Upload and process various document formats, including PDFs, text files, Word documents, spreadsheets, and presentations.
  • Website-Chat Support: Chat with any valid website.
  • Advanced Language Models: Choose from different language models (LLMs) like Ollama, Groq, and Gemini to power the chatbot's responses.
  • Embedding Models: Select from Ollama Embeddings or GooglePalm Embeddings to enhance the chatbot's understanding of your documents.
  • User-Friendly Interface: Streamlit provides a clean and intuitive interface for interacting with the chatbot.

Installation

Prerequisites

  • Python 3.10 or higher
  • A virtual environment (recommended)

Clone the Repository

Clone the AnyChat repository from GitHub:

git clone https://github.com/shitan198u/AnyChat.git

Navigate to the working directory

cd Anychat

Using Rye (Recommended)

  1. Install the Rye package manager: Installation Guide

  2. Sync the project:

rye sync

Using venv

  1. Create a virtual environment:
python -m venv anychat-env
  1. Activate the virtual environment:
source anychat-env/bin/activate
  1. Install the required dependencies:
pip install -r requirements.txt

Using conda

  1. Create a conda environment:
conda create -n anychat-env python=3.12
  1. Activate the conda environment:
conda activate anychat-env
  1. Install the required dependencies:
conda install --file requirements.txt

Configuration

  • Rename the secrets_example.toml file to secrets.toml in the src/anychat/.streamlit/ directory.

Ollama Installation

To use Ollama for AnyChat, you need to install Ollama and download the necessary models. Follow the instructions below:

  1. Install Ollama:

Visit the official Ollama website for installation instructions: Ollama Download

  1. Download Ollama Models:

Open your terminal and run the following commands to download the required models:

ollama pull nomic-embed-text

This command downloads the nomic-embed-text model, which is necessary for running Ollama embeddings.

ollama pull openchat

This command downloads the openchat model, which you can use as a language model in AnyChat.

Usage

  1. Set API Keys:
  • If you're using Google Gemini or Groq, obtain the necessary API keys and store them securely in the src/anychat/.streamlit/secrets.toml file or Upload them in the chatbot interface.
  1. Run the Application:
cd src/anychat
streamlit run chatbot.py
  1. Using Rye
cd src/anychat
rye run streamlit run chatbot.py
  1. Upload Documents:
  • In the Streamlit interface, upload the documents you want to chat with.
  • Click the "Process" button to process the documents.
  1. Start Chatting:
  • Once the documents are processed, you can start asking questions in the chat input field.
  • The chatbot will analyze your documents and provide relevant answers based on their content.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Additional Notes

  • For optimal performance, ensure you have the necessary resources (CPU, RAM) to handle the document processing and LLM computations.
  • The chatbot's accuracy and responsiveness may vary depending on the complexity of your documents and the chosen LLM.
  • Consider using a GPU-enabled environment if you have access to one, as it can significantly speed up the processing.

anychat's People

Contributors

shitan198u avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

anychat's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.