Git Product home page Git Product logo

langchain_pdfchat_oobabooga's Introduction

LangChain_PDFChat_Oobabooga

PDF CHAT BOT with a local llm

this it just a test using wafflecomposite/langchain-ask-pdf-local but with oobabooga/text-generation-webui api, all run locally

after some testing

manage to get better result using a smaller text chunk (main.py line 47)

# Split the text into chunks
        text_splitter = CharacterTextSplitter(
            separator="\n", chunk_size=500, chunk_overlap=250, length_function=len
        )

if answer are incomplete then edit max new token to a bigger value (class.py line 17) and ask again

'max_new_tokens': 500,

to install

uses miniconda env installer from oobabooga, no need to install conda

  1. clone repository ( dont use path with space ; ie: "C:\Users\Admin\IA Apps" instead use something like "C:\Users\Admin\IA_Apps" )
  2. open start_windows.bat
  3. open install_requirements.bat

to run

  1. start your oobabooga-api

you can use cmd_windowds.bat located in oobabooga folder (only --api matters, edit class.py if using not default port for api)

cd text-generation-webui
python server.py --auto-devices --model-menu --api
  1. open start_windows.bat

embeddings

using flax-sentence-embeddings/all_datasets_v4_MiniLM-L6, will download on first run (only one that worked, idk much about it)

Credits

100% not my code, i just copy - paste

main code by wafflecomposite/langchain-ask-pdf-local

webui class by ChobPT/oobaboogas-webui-langchain_agent

conda env files by oobabooga/text-generation-webui (i just like using them)

langchain_pdfchat_oobabooga's People

Contributors

sebaxzero 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.