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.
Background
I hope llama index-TS could be used in a web app (to load your frontend data in the editor and get value from it), serve as a serverless middleware function for processing documents, or an electron app to load/process documents from a local directory.
Propose
Bring the actual
@llamaindex/core
package, which only includes necessary and non-third-party related parts of modules like:Targeting for all js environments support:
In the future, packages/llamaindex code should only include some environment-related code and libraries like MongoDBVectorStore (only for nodejs)...
llamaindex -> llamaindex/core
-> llamaindex/env
Also, llamaindex should also consider bundlers like vite, webpack... or some framework that uses them (like next.js, waku.gg) to make the best compatibility
At some point, I will bring the bundler back once we isolate the modules correctly so the bundler will give the right output for different js environments.
Current step
Node.ts
to llamaindex/core, which follows https://docs.llamaindex.ai/en/stable/api_reference/schema/some misc:
I removed JSR.json in this PR since I don't think JSR is a good package manager, at least at this point.
Nit: waku bundling for the CJS module is still crashing, maybe related to dai-shi/waku#709