microsoft / genaiscript

Automatable GenAI Scripting
https://microsoft.github.io/genaiscript/
MIT License
2k stars 113 forks source link

make more clear how to generate and edit files #861

Closed sciabarracom closed 1 week ago

sciabarracom commented 1 week ago

I have read the documentation https://microsoft.github.io/genaiscript/reference/scripts/file-output/

But it is still totally unclear to me how to actually generate files.

It makes no sense for me you specify a pattern for output! What it means? If I have spec/a.md and spec/b.md how I have to specify I want spec/a.py spec/b.py as output? spec/*.py? And how are matched input with output?

Furthermore I tried to run a generation task from samples.

I installed genai from sources and I tried to generate the file packages/sample/src/counting.py.

I removed it, and then ran:

npm run  cli run python packages/sample/src/counting.gpspec.md 

I was expecting the counting.py file to be regenerated, but it is not the case... I tried to add -ae, specify -o <something> with no luck.

What am I missing?

pelikhan commented 1 week ago

Let me take a look. The .gpspec stuff is really old dating from the first prototype of genaiscript.

sciabarracom commented 1 week ago

I tried hard to generate files and I failed. I can to in code but it was supposed to be supported...

pelikhan commented 1 week ago

Did you take a look at https://microsoft.github.io/genaiscript/reference/scripts/file-output/ ?

May I ask what you tried?

pelikhan commented 1 week ago

@sciabarracom I've added a round of updates to https://microsoft.github.io/genaiscript/reference/scripts/file-output/

sciabarracom commented 1 week ago

thanks - I am now able to generate files.