Now Hiring: Are you a driven and motivated 1st Line IT Support Engineer?

New AutoGen UPDATE 0.2.27 | Frontend Code + .NET Developers!

1717435490_maxresdefault.jpg

New AutoGen UPDATE 0.2.27 | Frontend Code + .NET Developers!

Explore the New Features in AutoGen Update 0.2.27: Empowering .NET and Frontend Developers

Technology never stands still, especially in the fast-paced world of software development. AutoGen, known for its weekly updates that consistently enhance development capabilities, has once again brought forth a new wave of features that are bound to excite both .NET and frontend developers. With Update 0.2.27, AutoGen broadens its horizon by integrating more succinct support for .NET platforms and expanding its frontend code capabilities.

Introduction to AutoGen’s Latest Enhancements

AutoGen has been on the frontline of providing robust code automation tools that cater to various programming needs. This week, the spotlight is on the introduction of advanced capabilities for .NET developers and enriched support for executing and managing frontend code in HTML, CSS, and JavaScript. This development is particularly significant as it coincides with the integration of OpenAI’s GPT-3 API version 2, marking a leap in the tool’s functionality and application spectrum.

Enhanced .NET Support with OpenAI GPT-3 API Version 2 Integration

Starting with .NET

The AutoGen update brings comprehensive support for .NET, one of the most popular frameworks for building various applications. With the inclusion of OpenAI’s latest GPT-3 API version 2, .NET developers can now explore more advanced features and capabilities. Installation and setup have been made straightforward, thanks to detailed guidance provided for setting up projects using Visual Studio and Visual Studio Code.

Key Features for .NET:

  • Initialization of an Agent with Message History: Developers can initialize an automation agent that retains and leverages past interaction histories, enhancing contextual understanding and responses.
  • Event Logging: This feature allows for robust logging mechanisms, ensuring that every significant event within the application gets recorded for debugging and analysis.
  • Handling Multiple Speaker Names: In scenarios involving dialogues (like group chats), AutoGen’s update aids in better identifying and managing multiple speakers, enhancing the clarity and context management in conversations.

Frontend Code Execution: HTML, CSS, and JavaScript

Setting Up Your Project

Alongside .NET enhancements, this update stands out for its frontend development capabilities. AutoGen now supports coding in HTML, CSS, and JavaScript directly, with a new caching backend facilitated by Azure Cosmos DB supporting the operations. This integration not only speeds up development processes but also optimizes performance through efficient data management.

Features for Frontend Developers:

  • Code Execution for HTML, CSS, and JavaScript: Developers can write and test frontend code directly within the AutoGen environment, streamlining the development process for web-based projects.
  • New Caching Mechanism: The use of Azure Cosmos DB as a caching backend introduces a robust, scalable NoSQL database solution that enhances data retrieval and storage efficiency, perfect for dynamic web applications.

Practical Guide: Implementing the New Features

Setting up a project with the new features involves a few straightforward steps. After installing the appropriate IDE and .NET SDK, developers can proceed to create their .NET project. Within the project, users can leverage the capabilities of OpenAI’s GPT-3 API version 2, alongside developing and executing frontend code. The process involves modifying the standard project files and integrating the necessary API functionalities according to the developer’s needs.

How to Execute and Save Frontend Code

In a significant enhancement, the update allows the local command-line code executor to handle HTML, CSS, and JavaScript. This means that developers can not only write but also execute and save frontend code directly on their local machines. This capability opens up opportunities for rapid testing and deployment of web components and interfaces.

Conclusion: Unlock Your Development Potential with AutoGen 0.2.27

AutoGen’s Update 0.2.27 is a game-changer, especially for developers working in the .NET framework and those involved in frontend web development. By combining enhanced support for .NET with the power to execute and manage HTML, CSS, and JavaScript code proficiently, AutoGen continues to pave the way for innovative software development tools that streamline processes and boost productivity.

Whether you are a seasoned .NET developer or a frontend coder, this update from AutoGen promises to elevate your coding experience, making it smoother and more efficient. Dive into these new features, and harness the full potential of your programming skills with AutoGen’s latest tools.

[h3]Watch this video for the full details:[/h3]


Welcome to a new update from AutoGen 0.2.27. This isn’t the biggest in terms of scope but offers some new features that I think you will like: OpenAI Assistant v2 compatibility, Frontend Code ‘execution’, a couple miscellaneous upgrades and now AutoGen is available to .NET Developers!

Video Download Links:
Visual Studio Code: https://code.visualstudio.com/
.NET SDK: https://dotnet.microsoft.com/en-us/download

You can download the IDE I use and you can use the Conda Environment with the following download as well:

???? PyCharm Download: https://www.jetbrains.com/pycharm/download
???? Anaconda Download: https://www.anaconda.com/download

AutoGen Beginner Course: https://youtu.be/JmjxwTEJSE8
AutoGen Studio Full Course: https://youtu.be/apEA0oJaFb4

Don’t forget to sign up for the FREE newsletter below to give updates in AI, what I’m working on and struggles I’ve dealt with (which you may have too!):

=========================================================
???? Newsletter Sign-up: https://bit.ly/tylerreed
=========================================================

Join me on Discord: https://discord.gg/Db6e8KkHww

Connect With Me:
???? X (twitter): @TylerReedAI
????‍♂️ GitHub: https://github.com/tylerprogramming/ai
???? Instagram: TylerReedAI
???? LinkedIn: https://www.linkedin.com/in/tylerreedai/

???? 31 Day Challenge Playlist: https://youtube.com/playlist?list=PLwPL8GA9A_umryTQCIjf3lU6Tq9ioNe36&si=4XCDtT8ep1U6KjkR

????‍♂️ GitHub 31 Day Challenge: https://github.com/tylerprogramming/31-day-challenge-ai

???? Ollama Download: https://ollama.com/
???? LM Studio Download: https://lmstudio.ai/

???? Chapters:
00:00 Intro
00:14 Quick Updates
01:01 Downloads for .NET
03:16 Running Code
03:40 OpenAI API v2
04:45 HTML, CSS, JS
08:35 Running in PyCharm
09:08 Why it’s not ‘executing’
10:15 Outro

???? If you have any issues, let me know in the comments and I will help you out!

[h3]Transcript[/h3]
autogen brings updates every week and in some weeks there are multiple this week there are a couple interesting ones including bringing net to autogen and saving executing frontend code okay so with the latest version it brings new language support forn net they can now support open AI assistant version 2 API which I think is in beta right now so you can also use version one but they allow for version two as well there are a couple new features allowing initialization of an agent with message history and event logging they also allow you to requery a speaker name when multiple speaker names are returned during the group chat this is a really interesting one which is the new language support and code execution for HTML CSS and JavaScript and there’s a new caching backend using Azure Cosmos DB and I believe this is a nosql database I’m going to show you how to set up a net project which by all means I am not a net developer although I have used C before when I was developing for Unity quite a few years ago so after doing some research here is how I set up my project with autogen using net well the first thing is you need an IDE that can support support the C language for net and if you’re on Windows you can download visual studio 2022 there’s a free download for the Community Edition you can go ahead and use that or if you’re not a Windows or you just rather prefer to use this you can download visual studio code this is the one that I’m going to be using so I’m just going to go ahead and download this if you download and use Visual Studio code once you have it running on the extension tab here go ahead and install the C dev kit and while that’s installing the next thing you need is the net SDK so I will have this link in the description but it’s just net. microsoft.com you go to the download section and then download the SDK then just go through the installer okay then we’re going to go ahead and start creating our firstnet project with autogen okay so you do have to shut down Visual Studio code completely reopen it and then the SDK will appear or it will say that it can recognize it then you can go ahead and create a net project and then you get come up with the several different options and to be honest with you I don’t really know all of these options so I just went and created an empty one and then for the name I’m just going to call it autogen okay great so at the top left here it created a sample project for us so it gives a sample CS project file and a C file as well and this is and this program.cs is the file that we’re going to modify for autogen okay so we have a sample project file for autog just copy this we want to come back to visual studio code now you have to actually go into the project right so uh if you list what we currently have in the path you need to CD into autog everything I kind of already did this but um so it’ll be more for you but it only takes a couple seconds now with that I’m just going to go ahead and copy all this code here in this line you could set environment variable I’m not going to do that I’m just going to hardcode the string here um because I’m not worried about doing all that I just want to show you that it actually works okay so now all we need to do is run it is open up your terminal and type in the command. netrun okay and we started so we can just start chatting with our AI agent so if I just ask you what the longest river in Europe is say the longest river in Europe is the vulgar River if I even pronounce that right and I don’t know what that is but I also don’t know a lot okay and we can just chat with our agent if you’re net developer well good news you can now start using autogen so very briefly I just wanted to go over that they do support assistance API uh version 2 for open AI so if we go to their latest release change in their open AI utilities python file um in the create GPT assistant you can see if the GPT assistant API version is V2 then there are more more options for the tools and you know file IDs if file search is the tool that you want to use um and then they return the client. b. assistance. create and these are the arguments and the last thing that I’m going to go over is they said they have support for code execution with HTML CSS and JavaScript only using the local commandline code executor well to be honest I couldn’t get to actually execute code and I’ll show you why I don’t think it actually executed but I did get it to save and before it didn’t know or understand the language HTML CSS or JavaScript but now it does and it recognize it and you can actually save to files okay so for the coding um in my AI uh project I’ll have a new directory for autogen update 0. 2.27 um I’ll only have well I guess I’ll try to somehow put the net code in here as well so you can at least just copy and paste it but as you can see here whenever I ran uh my main. python file it did save um file into HTML uh JavaScript and CSS which is cool so here’s the changes that you need to make that happen now again it only works for local command line executors right that means it can only work on your machine’s local command line so this is the first thing you need to import and then typically so we just have an assistant agent and then a user proxy agent so typically for the code execution instead of this right just pretend that’s not here uh you would typically have workor directory and then you can give it coding and then you might say use Docker false and then we’re good now or you can set this to true if you’re using Docker but you no longer need well you can still do that but to make this work you can’t do that you have to actually set this to use a local command line executor so you know here we instantiated an execute this is an instantiated object of the local command line executor and all you need here you don’t even really need this timeout but uh I don’t think you need it but I put it there um and then for the working directory you give it the code okay that’s kind of the same that we’ve uh what I just showed you but just now it’s in this object and you see we don’t need to say use Docker is false because it knows that we’re trying to run this on our local command line and everything else um is pretty much just I haven’t I mean everything else is uh similar you know I have the openi config list. Json you know I had that over here everything else isn’t too different from what you’ve done with autogen uh already right but you need to do this if you want to save HTML CSS or JavaScript so for my message I just said create a simple HTML uh homepage stylize it with some CSS create a button that one click displays hello using JavaScript and something that I think you need to have is to make sure to comment out the F nams at the top of each file because you know HTML JavaScript and CSS uh whenever it tries to save the file name so in order to actually save it right it need to give the file name um at the top of the code that it generates but each of these different languages um use comments differently so you have to tell it to make sure like to do this so that actually comments it out or you know the JavaScript won’t run right so if I come over open up my script.js you know you comment out with double slashes but if I just did uh hashtag like we’ve been doing with python then this isn’t going to work right so you have to have the double uh you have to say that so it knows how to do this properly so if we run this okay so we ran it with the the message um so the first thing is we have triple triple tick marks for HTML see it commented out uh it didn’t have the hashtag here CU that that wouldn’t work we need we need to comment this properly but this still allows it to save it to our working directory so it did the same thing for our CSS and then finally did the same thing for JavaScript now if now if we now if we scroll down a little bit more you can see it tried you know say it’s saying that the user is executing three code blocks HT CSS in JavaScript it did not fail but it didn’t actually you know it didn’t execute the HTML file or didn’t started up um and come up in my browser right it didn’t do anything and I’ll show you why in just a minute why I believe that didn’t happen U but it did save all three files to the code directory for home.html style and script.js okay and then it finished so let’s just I can show you real quick how to run this in py charm so if you open up or double click the home.html you know this is HTML file it created on the top right here it gives you a list of a few browsers I’m just going to choose Chrome so if I click on Chrome it’s going to open this up in Chrome and then this is obviously super ugly but if I uh click on the click me button it brings up the alert for hello which is done through JavaScript now you know this is I just did this simple um I did this very simple project just to show you that it can work all right but now we can actually have it run and save front end files for us now back to why I believe it did not actually execute instead of just saving the files like it says that it would do on the release so if we you know there were changes done in this local command line code executor class if we come into here right it updated the support languages and default execution policy so you see we added JavaScript HTML and CSS for both of these where uh on the default execution policy dictionary we have JavaScript HTML and CSS they are to the bully and false instead of true like all the others okay that’s strange but what does that mean well if we scroll down a little bit here okay we had we say in the it says in the comment section that execution policy determine whether each language’s code blocks are executed or saved only and if we scroll down a little bit further to the arguments it said for the execution policies that you know we we know it’s a dictionary mapping of languages to their policies it says true for execution false for saving only and because these uh come back up here uh JavaScript HTML CSS are set to false that’s why it didn’t actually execute them even though it didn’t fail when executed um it didn’t do anything for me okay and that’s it for the updates a couple it wasn’t they weren’t as big in total as in scope having a lot of updates but I think a couple of them opened up uh newer possibilities right especially having the front end code that I can generate and save and in the future execute for us so for you try to have um set a message to where it can uh create multiple HTML files and it add routing to each one of them from like the homepage and have it try to maybe stylize and bring in bootstrap maybe to see if it’ll stylize it that way and then you know you can add in some more JavaScript just to see if it works for you so join my Discord for a community that is you know growing getting there sign up for my newsletter which should be in the description if you have any questions concerns or comments please leave them down the section below or if you have any ideas for um what they can maybe do for updates or if something didn’t work for you please let me know and I’ll see if I can help here’s some more videos for you to watch in the meantime I will see you next video