GithubHelp home page GithubHelp logo

sr-sujon / llamachirp Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 104 KB

Engage in dynamic conversations with PDFs to extract and comprehend information using locally hosted LLM variants of Ollama by integrating RAG.

Python 100.00%
chatbot llm ollama open-source pdf-extractor rag

llamachirp's Introduction

LlamaChirp: Chat with PDF using Local LLMs with RAG

This repository contains a Python project that leverages RAG (Retrieval-Augmented Generation) implementation along with Ollama models for reading PDF documents and enabling conversational interactions. The system is designed to analyze, correlate, and extract relevant information from the provided PDF context while facilitating user inquiries through conversational interfaces.

Features

  • PDF Processing: The system ingests PDF documents uploaded by the user and extracts text content for further analysis.
  • Chunking: Utilizes a Recursive Character Text Splitter to segment the PDF text into manageable chunks.
  • Vectorization: Implements OllamaEmbeddings for embedding text chunks into vector representations using the Chroma vector store.
  • Conversational Interaction: Engages users in conversations facilitated by ConversationalRetrievalChain, employing Ollama models for generating responses.
  • Model Selection: Users can select from various Ollama models to customize the conversational experience.
  • Source Tracking: Maintains metadata about the source documents to provide context and source references for generated responses.

Installation

  • To install the necessary dependencies, run from terminal:
    • pip install -r requirements.txt`
  • To install ollama models, run:
    • ollama pull llama3
    • ollama pull llama2
    • ollama pull [other model names]

Deploy

Run this script in the terminal: chainlit run app.py

Usage

  • Run the Python scripts after installing the dependencies.
  • Upload a PDF file when prompted to initiate the conversation and wait for the system to get ready. [Time depends on the PC configuration]
  • Select an Ollama model from the provided options.
  • Engage in conversation by asking questions or providing prompts.
  • Receive precise and accurate responses generated by the system.

Requirements

  • Python 3.6+
  • PyPDF2
  • langchain_community
  • chainlit
  • wandb (optional, for tracing)

Contributing

Contributions are welcome! Please feel free to submit pull requests or raise issues for any improvements or suggestions.

License

This project is licensed under the MIT License.

llamachirp's People

Contributors

sr-sujon avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.