3 ms·
there are lots of useful parts here doesn't seem like it is Gen.AI but some other provided tool // automatically convert to text def("PDF", env.files, { endsWi
by bryanrasmussen 2y ago
there are lots of useful parts here doesn't seem like it is Gen.AI but some other provided tool
// automatically convert to text
def("PDF", env.files, { endsWith: ".pdf" })
// or parse and process
const { pages } = await parsers.PDF(env.files[0])
def("DATA", env.files, {
endsWith: ".csv",
// take top 100 rows
sliceHead: 100,
})
// or parse to JavaScript object array
const rows = await parsers.CSV(env.files[0])
const { files } = await workspace.grep(/[a-z][a-z0-9]+/, { globs: "*.md" })
so it seems to me these things could totally be so useful that you might use these and never care about the AI parts, at any rate I think I have to devote next week to this, as soon as the project I am on right now is shipped.
- yjftsjthsd-h 2y agoSorta-side note but for readability: To format code on HN, indent with 2 spaces.