Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 3.28 KB

README.org

File metadata and controls

29 lines (15 loc) · 3.28 KB

https://github.com/themkat/aitales/actions/workflows/pages/pages-build-deployment/badge.svg https://github.com/themkat/aitales/actions/workflows/backend_build.yml/badge.svg

AI Tales / Tales from the deep mind

AI generated stories and illustrational imagery. Hopefully this can inspire people to see that very basic usage of OpenAI APIs can produce fun results :)

My main goal for this project was simply to play with the APIs from OpenAI and see how I could use them. I had some other project ideas in mind as well at the time, but have not find ways to explore them. It was at least fun to see that I could automate a lot.

NOTE! This is a spare time project where I have taken some shortcuts in the Rust code. Production ready Rust code would probably be prettier and more optimized. Would also include some more unit tests that might mock the OpenAI API calls, maybe using the mockall create? As the code base is small, and easy to test manually I did some shortcuts. If I were to maintain this codebase for a longer period of time, this lack of tests would come back to bite me in the ass…

Basic details about the implementation

This repo is split into 3 main components:

  • frontend using jekyll. (pretty thanks to WowTheme!)
  • a story generator application written in Rust. This application does all of the API calls and generates all the data
  • Github Actions workflow using the application and transforming the result into something Jekyll can use. (there are also workflows for building and releasing the story generator off course)

The story generator could easily have been implemented in any other language. I used Rust because I like the language and wanted to look at some crates I have not worked with yet (tokio, reqwest etc.). I was also happy to play around with clap, and will probably use that for my future CLIs as well :)