Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gish to generate a web application #12

Closed
drorm opened this issue Apr 7, 2023 · 1 comment
Closed

Use gish to generate a web application #12

drorm opened this issue Apr 7, 2023 · 1 comment
Labels

Comments

@drorm
Copy link
Owner

drorm commented Apr 7, 2023

This is a specific case of #10.
GPT4 is capable of generating web application that include HTML, CSS and javascript enclosing each portion in ```.
In general, it seems to have the inclination to include these even when not asked to.

You can ask it to generate a file like this (because of the markdown in the file, can't include it inline):
example.txt

So in effect, we could, with a simple gish request, generate a full web application.
Generate the files in a directory, and for extra points, we can launch a local server, and the app is right there in the user's browser :-).

For a standard web app it could be

  • ```index.html
  • ```styles.css
  • ```index.js
  • ``` README.md -- optional for any comments.

For this initial version use regex to parse the file, but for future versions, consider using https://github.com/pegjs/pegjs.
The advantage of going in that direction is that

  1. It is more robust.
  2. It can give us a definitive answer whether GPT's response is compliant: it only has files enclosed in ```.
@drorm
Copy link
Owner Author

drorm commented Apr 9, 2023

See the Web app example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant