mayooear / gpt4-pdf-chatbot-langchain

GPT4 & LangChain Chatbot for large PDF docs
https://www.youtube.com/watch?v=ih9PBGVVOO4
14.95k stars 3.02k forks source link

Conversion of code into Python #439

Closed MuhammadIshaq-AI closed 9 months ago

MuhammadIshaq-AI commented 1 year ago

Hi sir, I have been using your code for many months, some issue I face is that i don't understand some modules and typescripts for the node.js, level of understanding for nodejs for me has become quite difficult, is there a way to convert the current repo into python?

dosubot[bot] commented 1 year ago

🤖

Hello @MuhammadIshaq-AI! I'm here to assist you with your issues and questions related to the gpt4-pdf-chatbot-langchain repository. Just to clarify, I am a bot created to aid you while we wait for a human maintainer. I'm here to make your experience smoother and help you become an effective contributor. Let's get started!

Yes, it is possible to convert the current gpt4-pdf-chatbot-langchain repository from Node.js to Python, but it would require a significant amount of work. You would need to rewrite the entire codebase in Python, find equivalent Python libraries, or write your own implementations for the Node.js specific packages used in the repository.

For instance, you might use Flask or Django to replace Next.js, and PyPDF2 or PDFMiner to replace pdf-parse. However, the "langchain" library seems to be specific to this project and might not have a direct Python equivalent. You would need to understand what this library does and then implement that functionality in Python.

The "langchain" library in the current Node.js implementation provides several functionalities such as Chat Models, Prompts, Runnable Sequences, Document Retrieval, Output Parsing, and Document Combination. You can find more details about these functionalities in the utils/makechain.ts file.

Please note that Python and Node.js have different strengths and weaknesses, and the performance and behavior of your application may change after the conversion. This is a high-level overview and the actual process may involve more steps and complexities.

Sources

VigneshDevelops commented 6 months ago

Please check this out for Python
https://github.com/VigneshDevelops/chat-with-docs