This repository was archived by the owner on Jan 5, 2025. It is now read-only.
Add support for importing JSON files#110
Open
zebfross wants to merge 2 commits intoopencx-labs:mainfrom
Open
Conversation
This change adds support for importing JSON files using Langchain's JSONLoader. Here are the major changes: - Created new routes and types in the backend-server - Added appropriate frontend views - Added HandleJsonDataSource.php that handles the uploaded files. Along with json files, I also allow zip files to be uploaded. Zip support required adding the "zip" php extension to the docker file. - Added jsonHandler.ts to the llm-server that imports the json files. It uses Langchain's JSONLoader to import the files as documents.
Member
|
Wow! Thanks for the amazing contribution! Will take a look at it tonight. |
gharbat
suggested changes
Jul 5, 2023
| const directoryLoader = new DirectoryLoader( | ||
| '/app/shared_data/' + shared_folder, | ||
| { | ||
| '.json': (path: string | Blob) => new JSONLoader(path), |
Member
There was a problem hiding this comment.
Since we are compressing the files into single .zip folder, I think we should either extract here or not compress in https://github.com/openchatai/OpenChat/pull/110/files#diff-42c70911d6785561115aeb3cbeb958a0427e6cd6fc6a84ce1ceb85ec6dbcd853R42
|
How is this coming? |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This change adds support for importing JSON files using Langchain's JSONLoader. Here are the major changes: