guidance-ai / guidance

A guidance language for controlling large language models.
MIT License
18.91k stars 1.04k forks source link

Javascript Support #46

Open stephenasuncionDEV opened 1 year ago

stephenasuncionDEV commented 1 year ago

Is your feature request related to a problem? Please describe. JavaScript support is currently not available.

Describe the solution you'd like I would like to request JavaScript support.

Describe alternatives you've considered I have considered using alternative libraries or frameworks to achieve similar functionality in JavaScript like langchainjs and my own version. However, the Guidance library stands out due to its specific features and capabilities.

yermie commented 1 year ago

Another benefit of JS would be first-class support of js templating languages along with custom helpers instead of the limited, pythonic implementation as included in this library.

I also would encourage use of mustache.js instead of handlebars.js.

Part of the power of guidance is that we can create custom logic to guide responses. Better capabilities of template logic is inline with that mission.

LevanKvirkvelia commented 1 year ago

Just made a port for the library: https://github.com/LevanKvirkvelia/salute

K0IN commented 1 year ago

I like salute but its not a replacement, salute is using code to represent template control structures.

while guidance uses a custom language, which can be easily serialized.

I would still like a 1to1 (syntax) port.

marcotcr commented 1 year ago

We have no plans to implement a js version, but as soon as we get server support going it should be easy to call guidance from js

abosaiftaha commented 1 year ago

@stephenasuncionDEV I found this Package yesterday, It seems to be in an early stage but I found it very useful: https://github.com/Yawanseh/guidescript