Skip to content

RonniKahalani/chatgpt-jokes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Jokes Example

Shows how to use the ChatGPT API to make jokes based on the users input.

Image

This project was originally made by my fellow computer science lecturer Lars Mortensen (retired), from the Copenhagen School of Design & Technology.

It consists of a simple Java Spring backend and a browser-based frontend (HTML, CSS and JavaScript) page.

Backend

There are 3 different features (controllers) in the backend:

JokeController

Gets ChatGPT to create a joke, by passing an input, telling what the joke should be about.

JokeLimitedController

Does the same as above, but implements an IP-rate limitation (max. number of request in a small timeframe.)

OwnInfoController

Shows how to make custom responses that the ChatGPT AI has not been trained in.

Services

Frontend

Adding an API key

You have to create a OpenAI account with credits and an API key to run this example successfully.

Image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published