Live data from Hacker News

Generative AI Scripting

microsoft.github.io

21–30 of 60 posts

Re: Generative AI Scripting

#21
At first glance, it looks like this is almost JavaScript (or TypeScript), but with imports removed / implied. (Sort of like Arduino is almost C++.)

I'm wondering if the same functionality would be available as an actual JavaScript library, or whether there is something special (other than syntactic sugar) that requires a different file type?

Re: Generative AI Scripting

#22
This seems like it can be super useful - lot to go over but want to focus on running commands in containers. Having a clean and elegant way of executing LLM commands in a containerized environment is definitely better than running on a single VM/machine. I do wonder how something like this would run in a containerized application though - can you define the "host" to be a kubernetes control plane?

Note that the container link on the homepage to https://microsoft.github.io/genaiscript/referenc/scripts/con... seems to be broken.

Edit: Okay, taking a deeper look - this seems to be a separate runtime on top of node - "$" seems to be global and files are defined as .genai.mjs and run through VSCode. I see that there's a way to run via CLI as well: `npx genaiscript run proofreader path/to/files*.md`, but I wonder what the rationale around these design decisions are. It seems like it's tying these files to a different runtime - can I use them directly in Node or Bun as part of an API? Something like "import {templateStr as $, def} from 'genaiscript'", then use it normally in Node?

Re: Generative AI Scripting

#24
post #14

I don't get it from the landing. Is this like a fake code language that a LLM can interpret? Is the syntax invented on the go? Like if I ask GPT: "Imagine the following code belongs to a known language and execute it"?

[deleted]

Re: Generative AI Scripting

#26

ok Microsoft, so you are trying to make something useful out of LLMs. But now that you have one hell of a reputation to overcome, the questions are: Is this happening on device? Without sending anything to the internet? And is it going to be REALLY FUCKING CLEAR when you change that in the future? with the option of FUCK NO instead of "maybe later"?

[deleted]

Re: Generative AI Scripting

#27

> Programmatically assemble prompts for LLMs using JavaScript. > $`Analyze ${env.files} and report errors. Use gitmojis.` This is kinda misleading and confusing as a lead. I could literally say: > Programmatically assemble prompts for LLMs using strings! > ... amazing! I like that they've provided ways to define schemas and standardized function-calling/tools, plus CLI helpers. But I find the page quite overwhelming…

Hi GenAIScript dev here, you'll find the readme at https://github.com/microsoft/genaiscript. Thanks for your feedback!

Re: Generative AI Scripting

#28

> Programmatically assemble prompts for LLMs using JavaScript. > $`Analyze ${env.files} and report errors. Use gitmojis.` This is kinda misleading and confusing as a lead. I could literally say: > Programmatically assemble prompts for LLMs using strings! > ... amazing! I like that they've provided ways to define schemas and standardized function-calling/tools, plus CLI helpers. But I find the page quite overwhelming…

Agree. Using LLMs from code is already so easy I don't see why a developer would need something like this.

In one evening I whipped up a lib for talking to ollama, usings agents, tool use, sandboxed code execution etc. and that was doing it the hardish way, from scratch.

This seems like a decent collection of tools but anyone able to use this could already do the same things with normal JS with not a lot of effort.

Re: Generative AI Scripting

#29
post #22

This seems like it can be super useful - lot to go over but want to focus on running commands in containers. Having a clean and elegant way of executing LLM commands in a containerized environment is definitely better than running on a single VM/machine. I do wonder how something like this would run in a containerized application though - can you define the "host" to be a kubernetes control plane? Note that the conta…

One of the early ideas was to make the scripting syntax as lightweight as possible. Thus not requiring to install or import anythying to start writing a prompt (the project evolved). Definitely inspired from google/zx.

Re: Generative AI Scripting

#30

ok Microsoft, so you are trying to make something useful out of LLMs. But now that you have one hell of a reputation to overcome, the questions are: Is this happening on device? Without sending anything to the internet? And is it going to be REALLY FUCKING CLEAR when you change that in the future? with the option of FUCK NO instead of "maybe later"?

GenAIScript does not collect any data/usage analytics. The LLM query is sent to the provider you configured. Hope this helps answer your question?
Post reply on HN