$49.90
Description
This product contains two packages – a minimal GPT (Generative Pre-trained Transformer) Spring Boot Micro Service and a Vaadin Web App that communicates with the first throught RabbitMQ Messaging Service. If you dought that it is import – read more on tha AI topic on my blog: https://programtom.com/dev/?s=chatgpt
This product uses the Open Source Open AI – Java API with some small tweaks and improvements. With setting up a simple API Key or passing it in the requests – you will be able to communicate with the Open AI Back-End. You will receive all functionality wrapped in @Service and exposed for using in your application via Rabbit MQ Json Messages. I could also add REST endpoints doing the same if you request.
Text /AI Chat/
You could use this feature currently implemented in the Spring Boot GPT Micro Service. It has been tuned to wait up to minute, because sometimes the request times out and you will not receive anything.
The JSON that you need to pass in should look like this:
{ "userId":"asd", "question":"Ask ChatGPT Something", "":"", "apiKey": { "name" : "asd"}, "languageModel": { "name" : "model name"}, } private String answer; private String error;
You will get back the same JSON, but with added either
{ "userId":"asd", //..... "answer" : "the response from open ai" /// or "error": "timeout" }
Audio & Image Generation and Recognition
Open AI has APIs for:
- Text to Audio
- Text to Speech (TTS)
- Speech to Text (Whisper)
The GPT Micro Service has proof of concepts with text to speech and text to image generation. They are not ready and linked to the Web App. I plan to polish these functionalities at some point, but you also could ping me if you need some of them. If you do so – you will get the discounted price as – when I personally integrate them – will raise the price.
Web App Screens
Because I use the app only internally – currently it has hard-coded login and commented integration – register/login – against a local database. I could removed it and add a Google Login plug-in. It is already part of another – Watermarking App: https://programtom.com/dev/product/image-watermark-maker-vaadin-web-app-micro-service/
The Web App stores it’s data in a Maria DB Database so you need to create the scheme: gpt_app. After that the app will auto-create it’s tables with the help of the setting spring.jpa.hibernate.ddl-auto=update
You have a screen where you could enter multiple Open AI – API Keys.
After you have a key – you could hit refresh language models and the app will clear the models assigned to the key and fetch the available ones – from Open AI.
And once you have an API Key and language models – you could go to the prompt section. Here you could choose from them and ask Chat GPT something. You have full control over language model selection. At the moment – Text to Speech and Text to Image are not working, but a Proof of Concept is implemented in the Micro Service App.
And there is a history of previous Question and Answers – very much like in the Chat GPT interface.
Here is an example response – when the timeout setting is set to low value:
Text to Text
Chat is essentially text to text. In the latest update – the product allows passing some additional tunning parameters:
- How long the responce to be
- how repetitive/random
Text To Image
The text to image language models are dall-e. Currently 2 and 3. After you’ve chosen it – you will be able to choose from variout parameters like:
- The count of images,
- format(currently only supported url),
- image size,
- style of the picture…
Text to Audio
Text to speech allows you to generate audio from the provided text. It is currently limited to around 4000 characters.
In the latest version this package supports selection from:
- voice tember
- language
- audio format
Update 23.02.2024:
An unified package has been added to this product containing both MS configured and connected to each other with docker-compose configuration.
Update 18.03.2024:
More Integrations – with text to image, text to voice, additional parameters – entered from the front-end