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

Update deps #84

Merged
merged 3 commits into from
Jun 2, 2023
Merged

Update deps #84

merged 3 commits into from
Jun 2, 2023

Conversation

fnordpig
Copy link
Contributor

@fnordpig fnordpig commented Jun 1, 2023

Hi! I'm looking to (at least in a fork) integrate GPT3.5 and DALL-E to generate sentences with a theme and character set and display ascii art pictures to help my daughter (who loves minecraft) get more into the experience. I'd like to rev up the versions and thought it would be useful to submit back.

@fnordpig
Copy link
Contributor Author

fnordpig commented Jun 1, 2023

I updated to use ratatui as tui was abandoned and forked into an org owned by the community and renamed.

@max-niederman max-niederman merged commit 217db1c into max-niederman:main Jun 2, 2023
2 of 3 checks passed
@max-niederman
Copy link
Owner

Thanks for the help with updating dependencies. I think it's probably out of scope of ttyper to add support for generative AI, although I'm considering adding some kind of quote sourcing in v2 (#83). You can probably get that working pretty easily by just writing a shell script which wraps ttyper and passes the sentences in a file or through stdin.

For ASCII art though, I'm not sure that enough people would want it for it to be worth the added complexity. How exactly do you envision the feature would work?

@fnordpig
Copy link
Contributor Author

fnordpig commented Jun 2, 2023

Hi, thanks for the merge! Yeah that's ok, I am doing it for my daughter first and foremost. She is 9 so typing in stories about minecraft is more fun than a series of words or quotes. I'm pushing my changes into the generative_ai branch on my fork, fwiw. Again, the pictures are more for my daughter to make it more interesting. Essentially the workflow today is:

  • Prompt the AI to generate a story with some constraints around the complexity of the typing task and keys to focus on, and a theme.
  • Retrieve a sentence of the story one at a time and those are the typing task of the page.
  • On each page it evolves the story based on the prior prompts and story.

The images fit in by taking the story sentence and submitting to DALL-E for image generation. The image is then rendered in the white space of the typing screen. The image is to liven up the experience and provide a visual queue prompted by the text being typed. I've not done all the image stuff yet.

Again, this isn't necessarily for merging to main. I just needed to refresh the dependencies and bump the rust version to get it working. It's kind of neat though, tbh. I grafted it in sort of violently and it's not in any shape for a merge yet.

Here's the load screen (as prompt generation can take 20 seconds or so (I plan to mask it behind the typing task after the first prompt):
image

Here's a few successive typing tasks:
image

image

image

Here's the associated ascii DALL-E for the last typing task:
image

@fnordpig fnordpig deleted the update_deps branch June 2, 2023 16:42
@fnordpig
Copy link
Contributor Author

fnordpig commented Jun 2, 2023

Here are the diff: main...fnordpig:ttyper:generative_ai
But note that I made no meaningful attempt to integrate smoothly, so I basically short circuit the existing Opt entirely and go off the hard coded stuff for now. If it serves any purpose I'll work to make it play nicer with the rest of the code, but at this point my goal is to teach my daughter typing :-)

@fnordpig
Copy link
Contributor Author

fnordpig commented Jun 2, 2023

Here's with DALL-E images rendered inline:
image

@max-niederman
Copy link
Owner

That's great! I'm happy you're able to adapt ttyper for teaching your daughter.

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

Successfully merging this pull request may close these issues.

None yet

2 participants