microsoft / genaiscript

Generative AI Scripting
https://microsoft.github.io/genaiscript/
MIT License
81 stars 22 forks source link

Expand the explanation of CSV reading #559

Closed bzorn closed 1 week ago

bzorn commented 2 weeks ago

In the docs, the example for reading a CSV is:

const rows = CSV.parse(...) const md = CSV.markdownify(obj)

Is obj in the second line supposed to be rows? When would I need to use markdownify versus just using rows in a def()?

Also, how do I get the value in rows into a def?
When I try def("DATA", rows) it needs me to do some operation on rows but it isn't clear what operator gives me values that def consumes. For example, when I try rows.toString() I get a values just as [Object].