Chainlit | Chat With PDF | 🦜️🔗 LangChain

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

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

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

    anybody experiencing error while converting pdf to text in the shown method in the video, can use the following code to resolve:
    from PyPDF2 import PdfReader
    pdf_text = ""
    with open(pdf_file.path, "rb") as file:
    pdf_reader = PdfReader(file)
    for page in pdf_reader.pages:
    pdf_text += page.extract_text()

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

      Thanks for your input, appreciated 🙏🏼

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

      @@datasciencebasics please pin it. It will help people stuck to find solution quickly

  • @Moitruongthekyxanh
    @Moitruongthekyxanh ปีที่แล้ว

    🎯 Key Takeaways for quick navigation:
    00:00 📽️ Trong video này, tác giả giới thiệu về loạt video về Chainlit và kế hoạch cho nội dung các video trong loạt này.
    01:08 🤖 Video sẽ sử dụng mô hình của OpenAI cho embeddings và mô hình ngôn ngữ lớn, cùng với Lang Chain, Chainlit, CromDB và Docker cho việc tạo ứng dụng và triển khai trên Google Cloud.
    03:38 📚 Tác giả đã tạo sẵn các video giải thích chi tiết về cách tạo custom chatbot cho tài liệu và văn bản, cùng với các hướng dẫn về Chainlit và Lang Chain trong các video trước đó.
    Made with HARPA AI

  • @rajrajabhathor2996
    @rajrajabhathor2996 7 หลายเดือนก่อน +6

    getting this error - Traceback (most recent call last):
    File "D:\langchain-openai-chainlit-main\venv\lib\site-packages\chainlit\utils.py", line 39, in wrapper
    return await user_function(**params_values)
    File "D:\langchain-openai-chainlit-main\pdf_qa.py", line 82, in on_chat_start
    pdf_stream = BytesIO(file.content)
    AttributeError: 'AskFileResponse' object has no attribute 'content'

  • @dsf111
    @dsf111 ปีที่แล้ว +1

    Thanks for your explaination

  • @tonyblack2141
    @tonyblack2141 ปีที่แล้ว +1

    Thank you for this. Much appreciated.

  • @alislounge
    @alislounge ปีที่แล้ว +5

    @datasciencebasics I am getting the error "TypeError: expected string or buffer". Kindly let me know how to resolve it

    • @gauravchaurasia6080
      @gauravchaurasia6080 ปีที่แล้ว +1

      HAVE YOU GOT SOLUTION FOR THIS ERROR? I am getting same error @alislounge @datasciencebasics

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

      @@gauravchaurasia6080
      When I edit the code like this, it works.
      `res = await chain.acall(message.content, callbacks=[cb])`

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

      Same error...@@gauravchaurasia6080

  • @Alkotas25
    @Alkotas25 9 หลายเดือนก่อน +3

    Hi, I went through, use codespace, the Chainlit starts fine, but when upload pdf always the following error: 'AskFileResponse' object has no attribute 'content'. Any tip, why is it? thx!

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

      Check the latest code here, Chat With Documents Using ChainLit, LangChain, Ollama & Mistral 🧠
      th-cam.com/video/2IL0Sd3neWc/w-d-xo.html

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

      @@datasciencebasics thx, but with Ollama can I use OpenAI LLL as well? or just opensource ones that I can download?

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

      Ollama is for open source models

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

      @@datasciencebasics thx, now I would like to see a working easy beginner friendly RAG app with gpt llm. can you suggest working script, tutorial, I guess tutorials from 6-8 month ago still not working now, the scripts are out of date now...

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

      I get the same error !

  • @destinyedet2920
    @destinyedet2920 ปีที่แล้ว +1

    Thank you Great content

  • @AjayM-h1w
    @AjayM-h1w 6 หลายเดือนก่อน

    Can you make a video of performing authentication using chainlit

  • @韩丁-x6l
    @韩丁-x6l ปีที่แล้ว +1

    Hi, when I run your code on Codespace, the following error popped up: Document prompt requires documents to have metadata variables: ['source']. Received document with missing metadata: ['source']. Please help. By the way, thank you for this, very clear introduction.

    • @datasciencebasics
      @datasciencebasics  ปีที่แล้ว

      Can you remove the codespace and run it again. I am not facing taht issue.

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

    Hello, I liked your content.. but it no longer works in 2024 because all libraries are outdated now, can you update to make it current. Just wanted to give you that feedback. Thanks

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

      Thanks for the suggestion. Will try my best to update as much as I can 🙏🏼

  • @im_shubham27
    @im_shubham27 ปีที่แล้ว

    Hi , It is not working on follow up questions. Can you make video on same where we can ask follow question basis chat history using memory from langchain.TIA

    • @datasciencebasics
      @datasciencebasics  ปีที่แล้ว

      Hello I have created other videos where I have explained how to add chat history. Please refer to that and plug it in Chainlit.

    • @im_shubham27
      @im_shubham27 ปีที่แล้ว +1

      @datasciencebasics I have tried to add different langchain.memory into RetrievalQAWithSourcesChain but it is failing to remember. Your help will be appreciated.

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

    I am getting the error "TypeError: expected string or buffer".

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

      Hello, did u try the answer provided by another user in another comment.

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

      You can resolve the error by replacing the contents of requirement.txt as below
      langchain == 0.0.246
      openai == 0.27.8
      chainlit == 0.6.1
      chromadb == 0.4.3
      tiktoken == 0.4.0
      PyPDF2 == 3.0.1
      pypdf == 3.13.0
      pandas == 2.0.3
      tabulate == 0.9.0

  • @empsn203
    @empsn203 ปีที่แล้ว

    no windows support hã?

    • @datasciencebasics
      @datasciencebasics  ปีที่แล้ว

      It should work normally in Windows too. But, for easiness, You can use github codespace once I make the repo public.