You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not a good design; it's just a literary copy-pasted version of llama index Python code. llama index is a widely validated and used package, but some architectures are unsuitable for JS/TS. I listed here:
async/sync: there's no sync call on the JS side, so every function call relies on LLM (uses network request) and is async-forced.
iterator: JS has built-in async/streaming support, so there's no need to wrap into a manual iterator
class & interface: JS doesn't have an actual class syntax; it's a syntactic sugar. And there's some issue when combining the TS interface with the class (abstract class/ static class?)
For dynamic function calls, there are lots of fromDefaults | fromObjects ... which you can rename them all into from and use typescript function overloading to handle it, which will simplify the APIs
generic type: python doesn't have a substantial type check as the typescript. So, most of the code is more challenging to maintain when pasted from the Python side. Because on the TS side, fewer developers are maintaining this project.
What is the goal of the TS project? LITS aims to support all core features of the Python side. However, the developers in JS/TS are more likely to use LLM in web apps and some end products instead of data analysis... Anyway, even the core design will be the same, but the final APIs should go toward the JS&Web standard and be compatible with JS runtimes(node.js/deno/bun/edge/cloudflare...) as much as possible. At this point, we are not targeting the Web(which means you are not supposed to literary import LITS in the browser), but we can gradually port some packages for cross-runtimes step by step.
No testing; each feature only added example code but did not fully cover the features and might have regression in the future.
Some PRs need to be reworked to fit the strong type:
I've noticed most of the PRs recently are generated by LLM, and this project has had some issues.
For example, this API doesn't tell what are
objects
,indexCls
, andindexKwargs
. Even though there's some trouble, it won't get fixed as time passes.LlamaIndexTS/packages/core/src/objects/base.ts
Lines 155 to 161 in 208282d
Not a good design; it's just a literary copy-pasted version of
llama index
Python code. llama index is a widely validated and used package, but some architectures are unsuitable for JS/TS. I listed here:sync
call on the JS side, so every function call relies on LLM (uses network request) and is async-forced.fromDefaults
|fromObjects
... which you can rename them all intofrom
and use typescript function overloading to handle it, which will simplify the APIsNo testing; each feature only added example code but did not fully cover the features and might have regression in the future.
Some PRs need to be reworked to fit the strong type:
Related issues:
The text was updated successfully, but these errors were encountered: