HackerTrans
TopNewTrendsCommentsPastAskShowJobs

ramadis

no profile record

Submissions

Show HN: Dynamically generate JavaScript class methods at runtime

github.com
1 points·by ramadis·ano passado·0 comments

Show HN: Dynamically generate JavaScript class methods at runtime

github.com
2 points·by ramadis·ano passado·1 comments

comments

ramadis
·ano passado·discuss
built a weird little library last friday night. it uses LLMs to auto-generate JavaScript class methods at runtime; no need to define the method ahead of time—just decorate your class, call whatever you want, and the model figures it out on the fly.

it uses `Proxy`s, and pipes the class definition and the call example to the LLM for it to generate a valid method.

of course it was not built for production use, but it was a fun exploration. would love to hear your thoughts!
ramadis
·há 2 anos·discuss
It'd be helpful if they exposed a summary of the chain-of-thought response instead. That way they'd not be leaking the actual tokens, but you'd still be able to understand the outline of the process. And, hopefully, understand where it went wrong.
ramadis
·há 7 anos·discuss
que gorras