Skip to content
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

How to read JSON file on llamaindex ts. #1095

Open
ozgur142 opened this issue Jul 31, 2024 · 4 comments
Open

How to read JSON file on llamaindex ts. #1095

ozgur142 opened this issue Jul 31, 2024 · 4 comments
Labels
good first issue Good for newcomers

Comments

@ozgur142
Copy link

Hello,

i am working with json files and i would like to embedded them to speak with json files but as i see, json files are not supported on llamaindes TS, is there any way to use json files as input?

Thank you for your answers

@KindOfAScam
Copy link
Contributor

@ozgur142 I've been working with a lot of JSON recently as well, so I added a JSONReader a couple of days ago.
Give it a shot and lmk if something is not working as expected!

@himself65 himself65 added the good first issue Good for newcomers label Aug 1, 2024
@ozgur142
Copy link
Author

ozgur142 commented Aug 6, 2024

@KindOfAScam KindOfAScam, thank you for your answer, it is working good for small data but i have some json files with 200k to 2M lines and it is taking too much time (i never waited till the end) soi was wondering if there is a faster way.

I am using nomic-embed-text model from ollama with 768 embedding dim

@KindOfAScam
Copy link
Contributor

@ozgur142 It's a general issue with JSON.parse and large files. The solution would be to integrate some form of JSON streaming (e.g. https://github.com/uhop/stream-json). I have it as a TO-DO but not sure when I get around it, so feel free to take a look at it yourself.

@KindOfAScam
Copy link
Contributor

#1119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants