-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working #32
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Generated by GitHub Copilot I made several changes to the code. First, I added a PDFProcessor class to handle PDF document processing, similarity search, and question answering. The class has several methods to perform these tasks, including load_pdfs_from_directory, perform_similarity_search, and answer_question. I also added a get_user_query method to get user input for a query or question. In the load_pdfs_from_directory method, I modified the code to use the DirectoryLoader class from langchain.document_loaders to load all PDF files from a given directory. I then split the loaded documents into chunks, stored them in a vectorstore, and initialized the RAG model for question answering. In the perform_similarity_search method, I modified the code to take a list of documents and a query as input, and return a list of dictionaries containing the similarity score, document or chunk, and any other relevant metadata. In the answer_question method, I modified the code to use the RAG model to answer the input question. Finally, in the __main__ block, I created an instance of the PDFProcessor class, loaded PDFs from a directory, performed similarity search based on a query, and answered a question using the RAG model. modified: LangChain/Retrieval-Agents/qa_local_docs.py
- Added updates to TODO for qa_local_docs.py
modified: todo.md
renamed: LangChain/Retrieval-Agents/stateful_chatbot.py -> LangChain/Chatbots/stateful_chatbot.py renamed: LangChain/Retrieval-Agents/__init__.py -> LangChain/Retrieval-Augmented-Generation/__init__.py new file: LangChain/Retrieval-Augmented-Generation/main.py renamed: LangChain/Retrieval-Agents/qa_local_docs.py -> LangChain/Retrieval-Augmented-Generation/qa_local_docs.py modified: todo.md
modified: LangChain/Retrieval-Augmented-Generation/qa_local_docs.py
new file: LangChain/Retrieval-Augmented-Generation/test.py
new file: LangChain/Retrieval-Augmented-Generation/.env.template modified: LangChain/Retrieval-Augmented-Generation/qa_local_docs.py modified: LangChain/Retrieval-Augmented-Generation/test.py
renamed: OpenAI/GPT-Prompt-Examples/MS-6_Daethyra_Custom-Instruction_GPT4.md -> OpenAI/Prompts/MS-6_Daethyra_Custom-Instruction_GPT4.md renamed: OpenAI/GPT-Prompt-Examples/multi-shot/MS-1.MD -> OpenAI/Prompts/multi-shot/MS-1.MD renamed: OpenAI/GPT-Prompt-Examples/multi-shot/MS-2_Large-Template.txt -> OpenAI/Prompts/multi-shot/MS-2_Large-Template.txt renamed: OpenAI/GPT-Prompt-Examples/multi-shot/MS-5_No-Prose_Doc-Reader.txt -> OpenAI/Prompts/multi-shot/MS-5_No-Prose_Doc-Reader.txt renamed: OpenAI/GPT-Prompt-Examples/OUT-prompt-cheatsheet.md -> OpenAI/Prompts/prompt-cheatsheet.md renamed: OpenAI/GPT-Prompt-Examples/system-role/SR-1_List-o-Prompts.md -> OpenAI/Prompts/system-role/SR-1_List-o-Prompts.md renamed: OpenAI/GPT-Prompt-Examples/system-role/SR-2_package-migration.md -> OpenAI/Prompts/system-role/SR-2_package-migration.md renamed: OpenAI/GPT-Prompt-Examples/system-role/SR-3_thorough-programmer.md -> OpenAI/Prompts/system-role/SR-3_thorough-programmer.md renamed: OpenAI/GPT-Prompt-Examples/system-role/SR-4_online-searches.md -> OpenAI/Prompts/system-role/SR-4_online-searches.md renamed: OpenAI/GPT-Prompt-Examples/user-role/UR-1.MD -> OpenAI/Prompts/user-role/UR-1.MD renamed: OpenAI/GPT-Prompt-Examples/user-role/UR-2.md -> OpenAI/Prompts/user-role/UR-2.md modified: README.md
…gFace's Accelerate library. new file: HuggingFace/Accelerate/.env.template new file: HuggingFace/Accelerate/README.md new file: HuggingFace/Accelerate/fine_tune_sequence_classification_model.py
A bunch of updates still required for conference with the repo's directory structure
new file: LangChain/Chatbots/chroma_memory.py new file: LangChain/Chatbots/how-to_chroma-memory.md deleted: LangChain/Chatbots/stateful_chatbot.py modified: README.md
also modified todo
modified: README.md
This was
linked to
issues
Oct 19, 2023
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.