OpenAI RAG Chatbot | Chat with PDF locally

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024
  • 🌐 Ready to elevate your chatbot game? Join us on a coding adventure as we show you how to build a Responsive and Adaptive Chatbot using the power of Python, Streamlit, Langchain, an open-source vector store database, and the incredible OpenAI API!
    🚀 In this hands-on tutorial, we'll guide you through the process of creating a chatbot that not only understands natural language but adapts its responses based on the context of the conversation. Python will be our language of choice, while Streamlit will provide a sleek and interactive web interface for our chatbot.
    🔍 Discover the capabilities of Langchain, a dynamic natural language processing library designed to make your chatbot smarter and more context-aware. Learn how to implement an open-source vector store database, ensuring efficient storage and retrieval of conversation data for seamless interactions.
    🌈 What sets this chatbot apart is its adaptability, thanks to OpenAI. We'll integrate OpenAI's state-of-the-art models to enable the chatbot to understand and respond to user queries with a level of nuance and intelligence that will leave users impressed.
    Code from the video is available in the below github link :
    github.com/JYT...

ความคิดเห็น • 35

  • @ITVISHNURAMMK
    @ITVISHNURAMMK 28 วันที่ผ่านมา +1

    Super Great Explanation,
    and easy to Understandable
    Thank you lot !

  • @VP_SOTWMC
    @VP_SOTWMC 6 หลายเดือนก่อน +1

    I have two queries. It would be helpful if you can assist in that.
    1. Template which you are using for prompt , in the first line you have provided f string. But however in the next lines you are not giving where you have {context}, {question}. So wouldn't that make it a string rather taking context and questions as variable? Or the model will understand that?
    2. My second question is that I have tested the code. It is working for most part except Chat history. Even in the same session, it is not able to remember the previous questions. It is getting updated in the chat history though. But when u explicitly ask what is my previous question or ask like explain more on previous question, it is not taking the chat history rather giving halucinated questions or says it doesnt know previous question.
    Kindly clarify on the above two questions

    • @joymaitra5414
      @joymaitra5414  6 หลายเดือนก่อน

      Hi, Thanks for sharing the queries, for the 1st query, you are right, need to fix that. But for the 2nd question, this demo I have shown only the chatbot, while in the other view I have demonstrated how to utilize the memory in llm. Let me know, if you have further queries.
      th-cam.com/video/-TtE7otMHCc/w-d-xo.html

  • @sabareeswaranbagavathi1230
    @sabareeswaranbagavathi1230 หลายเดือนก่อน +1

    Please provide pre-requisite installation otherwise as a beginner no one can recreate.

    • @joymaitra5414
      @joymaitra5414  หลายเดือนก่อน

      Thanks for commenting, as for pre requisite, to have python is required and VS code or Jupyter notebook is required for coding.

  • @NehaKothari-iz3hy
    @NehaKothari-iz3hy 4 หลายเดือนก่อน +1

    Hey Joy, Can you plz help how can we use input as book cover image and find similar book search with the same code , also provide the code for the same , dataset??

    • @joymaitra5414
      @joymaitra5414  4 หลายเดือนก่อน

      Hi Neha, thanks for commenting, but this approach will definitely not work for your requirement, this implementation is for textual inputs, you would need a multi modal LLM to interpret the image input. I will try to cover that in one of my future videos.

  • @yashakirad2996
    @yashakirad2996 3 หลายเดือนก่อน +1

    Hi, I am getting error ModuleNotFoundError: No module named 'langchain.chat_models' please help

    • @joymaitra5414
      @joymaitra5414  3 หลายเดือนก่อน

      Try uploading langchain by pip install --upgrade langchain

  • @user-fj4ic9sq8e
    @user-fj4ic9sq8e 5 หลายเดือนก่อน +1

    Hello,
    thank you so much for this video.
    i have a question related of summarize questions in LLM documents.
    For example in vector database with thousands documents with date property, and i want ask the model how much document i received in the last week?

    • @joymaitra5414
      @joymaitra5414  5 หลายเดือนก่อน

      I guess we don't need LLM for such a query, we can query the vector DB, and for how to do that ? You can watch my video on Vector DB.

    • @user-fj4ic9sq8e
      @user-fj4ic9sq8e 5 หลายเดือนก่อน +1

      @@joymaitra5414 , thank you for the beedback, but the questions are illimited, the user can ask direct questions like "what is the latest document i have?" or he can ask "how many documents i didn't read ?", i don't know how can convert this question to vectorDB query.

    • @joymaitra5414
      @joymaitra5414  5 หลายเดือนก่อน

      may be you can add the file properties as metadata attributes in the vectorDB and then make use of that information to answer the query.

  • @C__MehrabEvan
    @C__MehrabEvan 3 หลายเดือนก่อน +1

    does it work with image based pdf? and if doesn't how can i make one? please suggest

    • @joymaitra5414
      @joymaitra5414  3 หลายเดือนก่อน

      Thanks for reaching out!! It does not work for image based pdf, for that chatGPT vision is required. And have to pass the pages of the pdf as image in the prompt. I am making a video on that will share soon. Request you to stay connected!!

  • @minimal2224
    @minimal2224 7 หลายเดือนก่อน +1

    Sir, what type of computer do you recommend for running local GPT’s? I have PrivateGPT, but it’s painfully slow on replies.

    • @joymaitra5414
      @joymaitra5414  7 หลายเดือนก่อน

      On local system with 16GB RAM and i5 processor I find the response slow bt ok, anything less than that, I hear you, it's pathetic !

  • @allantauro3606
    @allantauro3606 6 หลายเดือนก่อน +1

    Hey good video. I am trying to recreate this, created the .env all of that is situated, however when I run ui.py using streamlit, getting error AttributeError: module 'openai' has no attribute 'error'. Can you help??

    • @joymaitra5414
      @joymaitra5414  6 หลายเดือนก่อน

      Thanks for reaching out. If you are not using azure OpenAI, there can be some errors due to libraries.

    • @azmathahmed268
      @azmathahmed268 5 หลายเดือนก่อน

      @allantauro3606 hey bro have you recreated it?

    • @wah866sky7
      @wah866sky7 3 หลายเดือนก่อน

      @@joymaitra5414 Thanks, Joy. But if I just have API key from normal OpenAI, how can I adjust the program to fix the module problem?

  • @Alkotas25
    @Alkotas25 6 หลายเดือนก่อน +1

    thx the video! sorry my question but im a beginner in this code. What files I see github I tried to run on Codespace with no success. Is there any other file, enviroment info I should have to try and run your RAG app? Could you pls help me regarding this as a beginner?

    • @joymaitra5414
      @joymaitra5414  6 หลายเดือนก่อน

      You need to add the openAI api key as environment variable.

  • @ganesh_kumar
    @ganesh_kumar 5 หลายเดือนก่อน +1

    Thanks for the video, does this work for multiple documents as well with good accuracy?

    • @joymaitra5414
      @joymaitra5414  5 หลายเดือนก่อน

      Yes it works with multiple documents, accuracy is quite good

  • @deepak_kori
    @deepak_kori 5 หลายเดือนก่อน +1

    THIS IS amazing...

  • @azmathahmed268
    @azmathahmed268 5 หลายเดือนก่อน +1

    Hello I am having few queries how can I reach you out please help me

    • @joymaitra5414
      @joymaitra5414  5 หลายเดือนก่อน

      You can email me

  • @NehaKothari-iz3hy
    @NehaKothari-iz3hy 4 หลายเดือนก่อน +1

    Can you plz provide the pdf of document that you used

    • @NehaKothari-iz3hy
      @NehaKothari-iz3hy 4 หลายเดือนก่อน +1

      Not able to get that point, from where i can get the pdf for book recommendation chat bot

    • @joymaitra5414
      @joymaitra5414  4 หลายเดือนก่อน

      You can use any pdf document, with text in it, I have used a blog post, saved as pdf.

  • @somnath2775
    @somnath2775 7 หลายเดือนก่อน

    Guru Bhalo Likhechish, I hope you know who I am. Don't disclose 😜. Ami Finally toke subscribe korlam. Keep going.