ofaust90/whatshouldieat

Add ChatGPT as additional recommendation provider

Opened this issue · 2 comments

Use Case: Get personalized recommendation based on what you have left in your fridge.

Means: Utilize the chat-gpt api and prompt engineering to achieve this.
https://platform.openai.com/account/api-keys

Proposed Steps:

  • Build a new python based microservice from scratch
  • Study api and engineer the necessary prompts
  • Expose functionality via a rest interface using the flask framework
  • Secure api to only accept requests signed with valid jwt token from aws cognito IdP. (https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_V5cEAto6w)
  • Package as docker container
  • Deploy to kubernetes and define configuration yaml (expose via ELB).
  • Create new github actions workflow to automatically deploy by pushing on master branch (ci/cd)
  • Extend Angular user interface to interact with the api via the flask webservice

Desired outcome
The user can choose to use an additional recommendation provider in the web app where he can get a cooking suggestion based on whats left in the fridge.

Note:
I think that we could easily use the free tier of open apis service. We just need to make sure that this functionality is only available after the user has been logged in. We maybe also need to make sure that we have a rate limit in case someone would abuse our service as it is publicly exposed on the internet.

questions are:

  • how should the service handle inputs with multiple languages
  • pricing !

Is the language an issue? Can't the api detect the language by it self?
lets discuss on thursday :-D