Skip to content

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.

Notifications You must be signed in to change notification settings

bytehide/Dynamic-AI-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic AI App ⚡️ (OpenAI-powered .NET dynamic app)

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.

What is this?

This application is a simple example of how artificial intelligence can be used in a practical way to speed up software development.

How does it work?

  1. openAI is called based on a promp that can be dynamically entered into the application.
  2. The artificial intelligence generates the source code of the c# application.
  3. The code is compiled using native .NET functions that allow to build a dynamic assembly.
  4. The dynamic assembly is executed in the same process of the original application.
  5. You have just created an application without touching code.

Limitations

  • Dependencies

    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.

    • Possible solution to import dependencies

      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

  • Type of application

    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.

  • Several classes

    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.

How could you improve it

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).

Plus

  • 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.

Pull request and contributions welcome!

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages