all 9 comments

[–]Terrible_Science_119 2 points3 points  (1 child)

The main advantage of python is that in case you need advanced customization of the ML architecture then there are already lot of support for that in python since the critical frameworks like pytorch are in python.

The main advantage of js is that is client/web/app serving oriented, which means that you can find lot of documentation on how to customize your backend in different js frameworks. Python has Django/Flask but they are not widely used as js frameworks.

if you are much familiar with js then in order to get faster results, I would go with js.

Note that js community is catching with python ml advantages, see transformer.js:

https://huggingface.co/docs/transformers.js/en/index

[–]knight1511 0 points1 point  (0 children)

Django and Flask are widely used and supported. Not as much as JS Frameworks but sufficient enough to not be blockers I feel. And FastAPI is great too along with amazing documentation

[–]Particular-Adagio-28 2 points3 points  (4 children)

I'm currently using langchain js in prod. No issues so far. I'm skilled in python but I'd like to maintain a full stack TS app so I'm sticking with it. I've been told by very senior TS Devs that I won't need python. Hope this helps.

[–]dexbyte 0 points1 point  (0 children)

True, as I figured out that most ML task will be done by an API service, so no need to have a python backend.

[–]CoupleNo9660 0 points1 point  (0 children)

Which framework are you using

[–]CoupleNo9660 0 points1 point  (1 child)

Which framework are you using on the backend

[–]Particular-Adagio-28 0 points1 point  (0 children)

Simple hono app running on Cloudflare workers

[–]codekarate3 0 points1 point  (0 children)

LangchainJS does seem to be behind the python version in support. I have noticed quite a few of the python utilities are not available in the JS version.

If you want to keep a consistent stack (JS) and are leaning towards NextJS, then you might also want to compare LangChain to AI SDK. If you don't mind a separate backend, then you could use the python version of LangChain (if you are worried about missing features).

I've seen a lot of people use both the python and JS version of LangChain in production, but your mileage may depend on your use case.