Project development API connects to GPT-3 for user interaction:
petal_20230209_142430.mp4
- IDE: Intellij IDEA
- Java 17
- Spring
- Maven
- 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
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();
OpenAI API documentation: https://beta.openai.com/docs/api-reference/completions/create
- 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 ๐