Git Product home page Git Product logo

ai-onion's People

Contributors

geoff-maddock avatar

Watchers

 avatar  avatar

ai-onion's Issues

Return mocked API responses from OPENAPI to mock up site

In order to simulate how this would work w/o having to wait for the API responses:

  • From the POST endpoint, return an array of example data that I'd get back from the OPENAPI call
  • API/chat/server.ts
  • format of chat responses - this is a series of events, so not entirely sure how to mock that event stream
  • extract the code that's currently in onMount that makes the API calls into it's own function, and mock the response there
  • create the format of the response that will be the FULL response used in the UI
article
{
  title: string = "Title of the onion article",
  body: string = "Body of the onion article,
  seed: int = size of the seed used to generate article - to differentiate the short and long version
  createdAt: datetime = <time created>
  image: string = "url for generated image"
}

Mock returning one article, or 12 articles, and build the layout using that.
First article is the "main" and the rest will be displayed as thumbnails or just titles.

Build UI layout / frame

Find the layout for The Onion that I want to copy exactly and copy it with dummy data.
Then work on replacing that.

How much do I want to get from the AI? Can I make a single query and get a number of headlines or articles?
Maybe ask for 10 headlines and then one full article?

Same with images - can I get 10 thumbnails and then one large?

Change generation to happen once per day

If I want to make this a public site, I'll have to prevent people from maxing out my account.
Should I refresh and then store in a DB rather than in local storage?

Consider some options about how frequently to allow refresh of the content?

  • On every page load
  • Every time a "get more news" button is clicked
  • Once every hour via cron?
  • Once every day

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.