Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
6
stevekrouse avatar

Awesome!!! I'd love it if the Usage sections would output a single code snippet one could copy and paste into a val. Right now it requires a lot of different copy and pastes. Maybe a change to the prompt could fix that?

nbbaier avatar

I'll do that!

stevekrouse avatar

Excellent! I'd simplify your API and docs like so:

import { draftReadme } from "https://esm.town/v/nbbaier/readmeGPT";

console.log(await draftReadme({ username: "nbbaier", val: "exampleVal" }))
nbbaier avatar

I added this to the prompt: Usage sections should include a single code snippet that a user can copy and paste.

Also, to clarify your API suggestion - you're saying move away from the class based API here?

stevekrouse avatar

Yep! There's no reason to do a class based thing here in my opinion

nbbaier avatar

Fair! I'll refactor later this week

Updated: January 22, 2024