Simple application that has the ability to create the application that you request using artificial intelligence and compiles and runs it in the same process.
This application is a simple example of how artificial intelligence can be used in a practical way to speed up software development.
- openAI is called based on a promp that can be dynamically entered into the application.
- The artificial intelligence generates the source code of the c# application.
- The code is compiled using native .NET functions that allow to build a dynamic assembly.
- The dynamic assembly is executed in the same process of the original application.
- You have just created an application without touching code.
-
The code generated by the artificial intelligence will use (depending on the complexity) different libraries that must be imported as reference in the dynamic assembly.
-
When you get the source code generated by the AI in plain text, you can create a simple function to read all the lines of type
using {reference}
, with regex for example.Then, we will obtain the main namespaces of these libraries, contrasting them with system libraries or directly with
nuget
, in the part of References we will add all the resolved libraries, in the case that they are not of the system, we can use nuget to download them previously to the equipment with https://github.com/NuGet/NuGet.Client
-
-
A console application will work in most of the cases, an application with graphical interface not only requires functions that manipulate the controls, but, of the own initialization of these controls, thing that openai usually does not take into account.
-
An application that requires many classes will be more complex to compile, openai puts everything in a single file, but we could divide the response of the prompt in several classes and compile them one by one.
I can think of a couple of ideas:
- Make the prompt better and always force to create an output in c#, so the user doesn't have to deal with it.
- Make the promp dynamic, so you can tell the application every time you want to create.
- Solve the previous problem of dependencies.
- Create a web application with a very simple interface that asks you: What application do you need to create?
- That web interface can launch an azure function, or run this console in the background to create the application.
- Add the execution of this application to the interface "natively".
- If the app works as the user wants, let them download the ready compiled.
- You've just created a freelancer developer with a nice UX/UI (basic, all said).
- Add the option to dictate the promp with voice and transcribe it to the application promp.
Maybe ByteHide might interest you? We are looking for feedback from people like you!
If you want to know how artificial intelligence can help you secure your .NET software, we at ByteHide are developing the platform of the future to secure distributed software, without the need for experts, centralized and automated, AI-powered so you can focus on developing good software and delegate the security of it.