Received 12.01.2024, Revised 24.04.2024, Accepted 30.05.2024

Integration module of web applications with artificial intelligence

Tatiana Martyniuk, Elena Voitsekhovska, Oksana Horodetska, Andriy Ryzhkov

The method of integrating the server part of the web application for organizing a diet and workouts with artificial intelligence ChatGpt was improved in the work, which made it possible to improve the User Experience when using the server part of the web application and increase the speed of processing requests by artificial intelligence and speed up the user's work with artificial intelligence. Modern technologies for the connection of the server part of the web application with the database, the implementation of authorization in order to implement the protection of the server part from intruders and the methods of integrating the web application with artificial intelligence are analyzed. Based on the results of the analysis, a stack of technologies was chosen, in particular, Web-API was used to develop the server part, Entity Framework technology was used to connect the server part of the web application with the database, and authorization was provided using JWT Tokens. The server part of the web application for workouts and diet organization was developed in the C# programming language, taking into account the principles of SOLID object-oriented programming. During the development, a multi-level architecture was used to distribute various functionalities between different modules of the server part. The connection of the server part of the web application with the database for receiving and saving information is configured. An authorization mechanism on JWT-Tokens was implemented, which made it possible to protect the methods for integration with artificial intelligence from attackers and gave the opportunity to only authorized users to use artificial intelligence to build workouts and diets. An MSSQL database that stores personal user data used to build the ChatGpt AI diet and workouts is designed. Database queries are optimized by using the Eager Loading technique and Deferred Execution queries.

web application, integration module, artificial intelligence, ChatGpt, multi-tier architecture, .NET, Access Token
5-12
Martyniuk, T., Voitsekhovska, E., Horodetska, O., & Ryzhkov, A. (2024). Integration module of web applications with artificial intelligence. Information Technologies and Computer Engineering, 21(1), 5-12. https://doi.org/10.31649/1999-9941-2024-59-1-5-12

References

[1] Introducing APIs for GPT-3.5 Turbo and Whisper. (2024). Retrieved from https://openai.com/blog/introducing-chatgpt-and-whisper-apis .

[2] Think Qwik. (n.d.). Retrieved from https://qwik.builder.io/docs/concepts/think-qwik.

[3] Understanding multilayer architecture. (n.d.). Retrieved from https://www.csharpcorner.com/UploadFile/1492b1/understanding-multilayered-architecture-in-net.

[4] Ak, H. (2019). A multi-layer back-end application architecture in.NET Core. Retrieved from https://hamzaak.medium.com/a-multi-layer-back-end-application-architecture-in-net-core-c08898f2427e  

[5] Introduction to Entity Framework. (2020). Retrieved from https://www.partech.nl/nl/publicaties/2020/11/introduction-to-entity-framework.

[6] Voytsekhovska, O.V., Horodetska, O.S., & Ryzhkov, A.K. (2023). Analysis of authorization methods in the design of the server part of a web application. In Proceedings of the international scientific and practical Internet conference “Electronic information resources: creation, use, access (pp. 225-227). Vinnytsia: VNTU.

[7] Authentication and authorization in Web API. (n.d.). Retrieved from https://dotnettutorials.net/lesson/authentication-and-authorization-in-web-api.

[8] Introduction to authorization in ASP.NET Core. (2022). Retrieved from https://learn.microsoft.com/en-us/aspnet/core/security/authorization/introduction?view=aspnetcore-7.0.

[9] JSON Web Tokens. (n.d.). Retrieved from https://auth0.com/docs/secure/tokens/json-web-tokens.

[10] Prompt engineering. (n.d.). Retrieved from https://platform.openai.com/docs/guides/prompt-engineering.

[11] Embeddings. (n.d.). Retrieved from https://platform.openai.com/docs/guides/embeddings.