Skip to content

Paulabad-BigData/API-ChatGPT-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API-ChatGPT-Java

LinkedIn Badge GitHub contributors GitHub follow GitHub stars GitHub forks GitHub watchers

Project development API connects to GPT-3 for user interaction:

petal_20230209_142430.mp4

Technology

How to get it running

  • Clone this GIT project.
  • Make sure it is a Maven project and Maven is executed to load dependencies.
  • Create an Account at OpenAI & log in
  • Create API key
  • Store the key in application.properties file in cloned project.
  • Start it as Spring Boot application.
  • For chatting with ChatGPT: http://localhost:8080/
  • For drawing images with DALL-E: http://localhost:8080/image

Setup proxy

If you need a proxy to communicate with Internet (ChatGPT API is in Internet), adapt ChatGptController.java like this:

  • Replace: private HttpClient client = HttpClient.newHttpClient();
  • with: private HttpClient client = HttpClient.newBuilder().proxy(ProxySelector.of(InetSocketAddress.createUnresolved("proxy.host.com", 8080))).build();

Documentation

OpenAI API documentation: https://beta.openai.com/docs/api-reference/completions/create

Expression of Gratitude

  • Comment and share with other Developers about this project 📢
  • Invite me for a coffee ☕ "Raise funds to support Software Development Students of SENA Dosquebradas - Colombia".
  • Say thank you publicly 🤓.

⌨️ with 💜 by Paula Abad 😊

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published