Supercharge your development workflow with Gemini

Google Cloud · Intermediate ·🧠 Large Language Models ·2y ago

Key Takeaways

Builds a development workflow using Gemini, an AI-powered collaborator, to enhance coding efficiency and understand existing codebases

Full Transcript

[Music] Hello everybody welcome to this session we're very glad to have you here uh welcome to supercharge your development workflow with Gemini code assist this will be a demo heavy session we try to have pretty big fonts so everybody can follow along but if you want to come a little bit closer don't be shy uh you'll have a better experience we hope um my name is Alexi and I am joined today hi I'm Roman by Roman and uh we're here to talk to you about uh com Gemini code assist and Roman you know I haven't been following really everything that's going on with you know as AI assisted coding so maybe we can use this session to try to go through some of the things and you can show me uh how much value I can get out of an AI assistant uh whilst coding um yeah so what we have uh today is U you know what you see in terms of first we'll just start off with in terms of software development what are some of the efficiencies uh that uh you know typically we would uh want from some of these AI assistants and then we'll sort of zoom into uh the Gemini code assist uh you know uh assistant that's there uh across the IDS that we will show you plus we'll see how all of this fits within uh the software development life cycle so at each of the stages how Gemini code assist helps you uh whether it's to do with designing to do with building testing deployment and all of that and it's going to be uh you know demo uh you know right across each of these steps excellent so I think the goal here what I'm expecting from this is to be more productive I want to spend less time context switching less time searching for things more time doing things and at the end of the day achieve more I mean that's really what I think I I want to expect from this so at the end of the day I want to do things a bit faster you know I want the quality of what I deliver to be uh better as well I want to be more productive at the end of the day and hopefully what we'll show today um is more than just coding uh I want to be able to do a bit more than just writing code I want to be able to understand code I want to be able to write tests and I want to be able to deploy and troubleshoot so hopefully we'll be able to do all of that yeah and particular right uh J can uh help us do that because not just from say writing code writing test cases uh but even if you go across different personas like can we maybe uh understand some of the logs that are out there can jna help us with that so we'll be looking at each of these areas and seeing how uh you know it can help us but it's also nice uh next slide uh to and or at least put down right in terms of not just how it can help us but what are the areas that developers expect AI assistance to help with so uh This research paper it highlights key areas that you know AI Assistance or or or the other way developers expect AI assistance to help them with so if you look at the first uh uh you know set of points in the first column you will find it's right from code summarization uh to uh you know just code generation code completion writing unit tests um but also support for uh you know most programming languages that uh you know all of us use today plus integrating and working in tools which you are familiar with but not just these requirements you're also seeing that there are more uh you know pointed U I would say expectations in terms of how are these prompts used uh for example how did we reach some of those answers where is this exactly hosted are these recent llms but primarily what we'll be focusing on today is what you see in the First Column primarily around you know designing building it out coding it out deploying and all of that and yeah so you know I I I'm assuming that this is Gemini cesis this is what we'll be showing and and and and highlighting here uh it's called Gemini so Roman you know we hear a lot about Gemini how how does this relate to everything else maybe we it's time to clarify a few things yeah so it it's good Alexi that you asked this uh uh so if if you look at this slide right the way uh we would like to put this out is that there are you know deep mind and Google research the the core Foundation models that are out there now these are hosted on the Vex AI infrastructure so if you are a builder uh you know you're familiar with uh some of the ml you know tools Frameworks Etc out there you would use vertex AI to build out models uh to host them to monitor them build pipelines completely but we also want to bring this uh you know whole models and the usefulness of that to users of the platform so if you are a user and specifically in this case if you're a developer you know that model is sort of surfaced into Gemini code assist so that it can help you with the task as a developer that you're familiar with and and to sort of highlight that a little bit more in terms of how we've built this out uh this uh slight sort of points that so the way you would want to read this is at the core Foundation you know you got those foundational models uh you know which are hosted on our infrastructure but the next thing which you see which is tuned for Google Cloud expertise so we've taken these foundational models we've infused them with Google Cloud knowledge so this could be our API docs our documentation our code samples and a lot of that which comes together so that this model is now well tuned to help you out as you're working with gcp not just from a developer point of view but even if you are an operator looking out for certain commands and more you you also see a an additional uh point out there or step out there it's optional but in case an Enterprise wants to customize this such that the answers are from their code base depending upon their code style Etc it can even uh be built in that fashion finally what you find is now depending on whether you are a developer uh you know working in the ID or you're an operator responsible for running apps on Google cloud and you're looking for certain kind of help of that nature the it's contextualized now and brought into the familiar tools so whether you're using an ID you're using a console you know you'll be having access to this but the whole goal is that all of this should help you work much more efficiently uh with Google cloud and in other words increase your productivity excellent so um coding is more than just writing code it's also reading code making sense of code that you're handed over uh it's about testing the code it's about you know doing a lot of different things so um this code assist and I think the answer is yes but I would like to know a bit more uh can help with uh different phases of what we call the software development life cycle yeah so if you break down the software development life cycle right we broken this down into uh two uh sections which you see one is assistant sorry assisted development and the other one is assisted uh operations now if you go through the sdlc cycle stages right uh you you start off with design so can it help you with uh you know building out an API specification and then moving forward let's take that specification can we build out you know let's say the next set of boiler plate code keep enhancing going iterating through that writing some test cases and so on that's pretty much the inner loop that you have out there but as you move on On To The Next Step you find that you would also want to now take this deploy this run it in uh you know production get some feedback from there maybe some incidents or log analysis and more so even for example suggestions on how I could better scale it how how I could configure this application of production it can help you in these stages also so in summary what we are saying is that the Gemini code assist or Gemini for cloud it helps you across all of these stages of the stlc our Focus would be primarily on the assisted development part today where we'll show you the entire cycle and of course some bits of even the operations will show you how we can get help to deploy this okay so we're actually deploying to production in the demo yes we will We we'll try okay great awesome so uh speaking of uh the demo I think it's about to stop talking and start showing um hey Roman you know I I shared you uh with you that um data um we have all the sessions from this conference so 500 plus sessions uh they're listed with um you know speakers abstracts titles all of that I you know gave you access to that database so maybe we can leverage that and start building something from that yeah definitely okay uh that sounds great so how about uh we actually uh move to the demo machine and start showing how to use Google Cloud code assist so uh Roman this looks familiar for anybody that uses VSS code uh we're in the cloud this is actually Cloud shell editor but this is really VSS code running in the cloud right um all of everything you're about to see you could do running on your local machine with a vs code or in different IDs like intellig is another option and there are more um options uh possible but here for the sake of this demo we'll be running in uh Google Cloud yeah um do you want to show maybe the the database I I I I you um I gave you so what we'll be using here is something called Cloud fire store yeah uh which is a document database and in our case we have a collection of documents every document is a session and with each of them you'll find you know categories speakers obviously a title and a summary and each document has a unique identifier uh to um to be that it can be referenced by sure so that's the database you know we have that it's structured but raw data at this point uh and this is um uh the cloud shell editor that was configured as you might see here to use um Cloud um Gemini code assist formerly known as DUI if any of you were following along so um how about we uh do the following um I like to work with ap I you know uh I think we should Define an API Implement that API yeah then we'll eventually get to consume that um can we get a specification like an open API specification and get some help from um code assist to generate that API yeah so we'll start right from scratch as you're saying again just to reiterate we are going to be dealing with uh you know the sessions that are happening at this event and maybe an API to list a sessions search sessions by ID uh and so on so so I'll just switch sometimes to a to a doc so that I can just copy the prompts that I have ready to show you over here so bear with me while I do that sometimes so the first step uh as uh Alexi mentioned so I'm uh you know inside of the ID I'm uh opening up Gemini code assist over here and I'm going to be giving a prompt over here let me just fire The Prompt and then I'll just go through what we are doing here so first up we are saying Help Me generate an open API spec that helps me go through session sessions by ID and so on and each session I'm also mentioning the uh attributes that are there uh the ID the title so uh that was the prompt that we had and uh it's given us basically the open API spec as you can see the parts that we mentioned for sessions sessions by ID then we had sessions uh by uh you know category and at the uh end you also got the session object schema schema uh which has uh uh we specified it like it's got ID the title the list of speakers categories and so on so what I'm going to do is uh there are multiple ways you could get this into you know your file but one of the ways I'll just quickly create this specification uh so I'm going into my project and I'll just put this as open API spec. yl I've just got a template at flask application and we'll obviously overwrite it with uh you know all the code that we develop along the way so I put in the open API uh spec over here so that's our first step uh that you're seeing Alexi looks good to you um it looks good but I see a lot of errors here like did it generate actually errors that's not good well they look like errors but these are more like I would say things that you need to pay attention to so you may have heard about a recitation Checker that checks that in case Gemini has you know given you code or any kind of configuration thing but if it is from projects uh that have been permiss ible to uh you know use for our training if it's recited exactly it points out the source of that uh code so that you can make a decision whether this is okay for you to use or not so whenever you see that it's likely that uh you know it's it's it's a code recitation thing of course could be uh another issue also but you can see as you highlight here it's shown to you and you can make a decision now whether you want to accept this code Enterprises particularly require this so that in case they have some requirements that say we not okay with use of a certain open- Source license maybe this is a way you can uh you know have a safeguard yeah and and we're here in a pretty uh open environment so you as a developer get to decide that but Enterprises are also able to log down choices to configure it to their developers that's that's excellent yeah okay so we have that um how about we you know um python is your language uh of choice uh flask is probably what will use as a framework yeah I think at this point uh we just have a you know um a a blanket um an open uh project we want to generate the API that will implement this specification sure so probably uh get some help from um could assist here as well okay so here's my next prompt that I'm going to uh go for let me just U help you with some screen estate Okay so we've got our open API spec and and here's the next prompt I'm firing that generate a python application using the flas framework based on this uh you know yaml file which is the open API spec and for data right now though we'll connect later to the fir store database we saying just use some local inmemory maybe a sample uh list of Records so as you can see it's h it's um got you the sample data as well as some uh you know code to go for those methods yeah I like I like the sample data that's that's probably very useful to to start testing um the import statements look good to me um you know flash restful is that good for you is that that's something it it's relying on I'm I'm assuming here uh I'm not too familiar with flash restful extension uh probably what I would have liked is uh maybe just core flask itself to do this so I'm going to give it a short here by uh telling it do not use uh flask restful uh extension so basically it's you just doing a followup you know just G shown you some code but maybe you just want some changes in my case I'm not too familiar with this let me see what it comes up with here now and again I think this the point here is it's an assistant right first of all you're in charge and then the goal is not to feed it answers and expect everything to be right from the the get-go obviously you can iterate and have this conversation in context of what you're doing okay so did it bring anything um more interesting for you uh seems it has removed that import statement yeah it's removed that and it's gone back to the standard app routes uh you know which are there uh so I'm good with this for now so what I'm going to be doing is uh just overwriting the existing app.py which I had in my project I'll just take that and uh you know rep oops replace it with uh this particular thing itself okay so I have uh now at least so I've got three of my end points now uh there and with sample data that's there in this collection at this point okay um I'll be honest I'm not a big uh python guy uh what's you know what is this last line like I'm assuming that's the bootstrap that's how you run the app can you tell me more about that or can C assis tell me more about that yeah we'll we'll ask Cod assist that so I've just highlighted a snippet uh that I want more details on but this could be the entire file but in this case we'll just go for the specific one and multiple ways you can invoke the code assistant for explaining the code but what we'll do here is you see this light bulb we've highlighted the code we want more details on and you see this explain this year so when I fire this let me increase this oops I didn't mean to go here okay that's fine all right so so what happens now is it's it's giving you some more details on U you know what that line of code was about and potentially it also tells you that the default Port is like 5,000 maybe we may want to change that uh any other requirements Alexi you might have to do this um maybe listen on a given IP address as well and bind this to like 00000000 yeah so let me take the next prompt just to show you like you know you've already got some code that's highlighted there and you are saying like update this one uh to use another application Port maybe bind it to a different host address and uh you know yeah let's see what what happens here so in that iterative mode okay and I guess it's come back with something that makes sense but I guess we'll we'll find out if this is right yeah so I'll just since I've already highlighted it here I'm just going to go ahead and show you another way I could just insert the new stet of code and that's where I'll just uh use this so there you go we've got some of our code now up and running here yeah I think we should run this now sure we we have enough to run this we have dummy data but you know something to maybe exercise that API should we do that yeah so let's uh you know it's it's local here right now uh I'm I've just opened up a terminal and uh I'm going to just uh do a python app.py it's it'll bring up the development server in debug mode Let's see so we've got it up and running Port 880 as you can see I'll be using the web preview feature here uh to just see what comes up because we're in the cloud port 8080 on Local Host is actually in the cloud as well it's not really Local Host yeah uh but sounds like um you know we have a small error here um so but I think I know what this is and you do too you go first I think we we just haven't mapped the route here to anything like we have different paths to sessions we just don't have anything there so maybe yeah so we've got sessions we've got sessions uh by ID and category but we don't have the root thing so that's why it's got not found which is fine we'll we'll we'll fix all of that also going forward but for now we could test out the sessions sorry the sessions uh uh end point so we go with sessions there you go and we have that dummy D we' got the three records that we have let's see our sessions maybe one more thing session by id id maybe two oops my ID was wrong here so ID is two that brings up this okay okay so it sounds like we have a a running implementation of that API with dummy data yeah um the way this was created is we have everything in this one file called app.py um and it has the dummy data in there not a big fan of you know mixing code and data can we maybe switch uh to like split this into having a data uh in a different file and and could assist help us with some refactoring to make that a bit cleaner yeah so let's refactor you know this data out and take help from code assist what it tells us so that's my next prompt here which is uh let me fire this and then we'll talk about it so I'm just saying can I improve this code separate out the sessions data you know from this uh app.py this should ideally be giving us some suggestions on how we can separate this and maybe link back into the main file also so this is merely just a refactoring there's like we're not adding features we're not changing anything but we're getting um suggestions on how to make this clod a bit cleaner yeah so right now it's telling you could create a file called sessions dopy um and and put this here and it's also telling you that in your app.py you could just do a reference the you know the import sessions which you see I think you should do that that makes a lot so let me uh go ahead first and uh and by the way uh We've we've got a development server up and running so you know in case we make any changes it's going to reload if there errors we'll be able to see that okay so I'm going you break anything okay yeah let's try that so so I'm going to go to first uh creating a separate file called sessions. piy I'll go back to Gemini code assist I'll insert this new sessions you'll see there that see it's it's like refreshed that so far okay surviving uh I'll go back to app pi and obviously I want this removed so I'll just uh take all of this and see a minute as I do this okay so I'm going to just take uh whatever it's uh given the modified code put that so far okay I'm going to come back to my URL do a refresh all this looks good for okay you haven't broken anything congrats Roman thank you yeah okay so we have something that's a bit cleaner um how about we get some real data we you start hooking up the database I think it's time like we have the separated it out yeah um like we need to talk to a database it's a service it's running we saw the data live um but how do I even get to this in Python you know are there libraries that you should be using maybe again code assist can help here yeah so earlier you had mentioned we've got this data loaded in our fire store collection and um I know there's a library sorry a module in Python for called Google Cloud fir store that helps you sort of make it easier to work with fir store so our next prompt will be to sort of um see what we can do to refactor this or you know just transform this sessions. Pi completely uh to connect to a live database so I'm going to take uh that prompt let me fire that and we'll talk about it so what I'm saying here is could you further uh refactor this to read from a fir store database which had our sessions collection right and and you find here that it's given you uh some code for you know replacing your sessions. pit right uh and of course the rest of it would be pretty much the way it is so what I'm going to do now is um just take this new code that it's given me and insert that let's see what happens oops I think you broke something the server is not running anymore uh what happened there uh okay uh so what's happened is that uh We've imported the Google Cloud fir store uh you know uh module uh but we've probably not updated our requirements. text the python environment with it so let me do that it's good that this happened so I'm going to go back to my requirements file uh and of course uh gole Cloud Express the dependency by store now once I do that vs code environment has detected there probably a change this is again the vs code environment let's go ahead and just update uh the existing one so that it just gets this new module too okay so now we have an environment just to recap a little bit we've created that open API file we've implemented this in a python Django application we've exercised this made it a bit cleaner started talking to the database or so we hope so let's see can you start the server again and see if it comes up now we should be loading that library and okay servers come up let's see if uh we get the data from the database yeah and it's look looks like we are able to scan through a good number I think 500 plus sessions yeah and let's say if we go to maybe one of the detail ones they have 308 there you go so it's now connected live to the fire store uh database and the sessions collection okay good good job Roman or good job cesis I don't that's both you okay um hey Roman yeah there's no test like this is wrong like I I I I I don't feel great maybe should we do a UI first web application um okay maybe we do you the web UI okay let's do that okay so so let's create a web application uh a simple one a form that lets you search these same results by let's say a category right so we don't have anything right now so let's again use um a code assist so another The Prompt that I'll fire for generating a web application so what you're saying is we've implemented the API it's getting its data now we want to consume that API and what we're doing here is we're building a web app that will be consuming hitting all those endpoints yeah maybe one end point for now to just search sessions by category okay let's do that so what I'm saying over here is that uh you know just give me uh sessions by category search single page uh HTML which has all the JavaScript CSS in it of course I could always iterate over it let's let's just take the file right now and uh see what it's come up with and we'll take a look at this so I'm just going into the existing uh index HTML that we have let me get some space over here so contr one okay all right so if you see we've got some style that it's given us uh We've also got a form uh where you can submit the category and this submission happens to uh our sessions you know category end point which we already have so we've got the index HTML but we still need to um you know have a Handler for the root part you know there was a not found exception that we saw in the first uh uh you know a while back so we need to add another route to it so again I'll just take help from uh uh you know Gemini here let's say um generate a new app route to return let's say index HTML and VI the render framework render template framework that I know about in flask so let's see it should give us a new app route which will handle the root uh endpoint and which returns back this new index HTML that we've just uh got okay so it's given me the entire file but you can see it would have added this app route here that you you see uh for the index HTML so let me just take all oops not this code all of this and then I go here and just inserted into the file uh let's see if our you know development server is still up and running which it is sorry so I go back here to the running app sorry the the browser let's go here let's and you have a congrats okay and let's search for a few there you go a few of these and uh yeahi AI yeah I hear there's a bit of AI at this conference so yeah can you click on just any of those to see like clearly we only have a front end so the rest will be Json but um yeah yeah okay good yeah hey how about tests all right I really want T yeah yeah so this is this is where Gemini really comes in right where you have written some codee and you're telling me to write test okay I'll tell Gemini to write code test for that's Gemini that's fine okay so because I'm getting my test I'm happy yep okay so uh let's let's go for test case generation and and a few things that we'll show you there so the first prompt right which is uh so I'm in my app.py and I've got several okay let me just clear up this okay and I've got some of these uh uh you know app routes out there so the easiest ways something like this you can further you know refine this prompt to but I'm just saying generate unit test cases and use the python unit test uh module okay so I mean this is testing so it's not smart enough to write all the tests or is it you know how does it know what to test for it knows the infrastructures it knows about different routes test with what is a a passing test is probably something we'll need to refine yeah so let's let's just take a look at first what it's come up with uh so I'm just going to first create this uh test. Pi file and I'm going to space this here let's get some more space okay let's revisit what is done so it's imported our flash cap it's got now several of these uh you know end points so we've got our get sessions uh and if you see here it hits the sessions Point request 200 is okay and of course it's adding a few asserts uh which which at times it may not have the information on so here we know that there's a fire store collection somewhere and maybe it doesn't know the IDS or things like that so it's probably put some dummy asserts uh for data that is so we could maybe I just I'll just try a few modifications here so I'll go with 200 for now uh then let's see get session by ID right I so I'm going to go to the user real ID the real ID that we got iner of one and hopefully then this test should also pass with 200 I I mean I could figure out exactly how to write this uh assert equal but I just take it out uh then we've got uh you know uh sessions by category by index what I'll do is I'll just um maybe I'll just skip these uh tests for now though if for example the index page which you see you could have known what's the HTML return and even checked some part of it so a certain maybe that's fine but for now let's you're deleting test already yeah maybe yeah and it's then even completed that hey you know this is how you could uh you know run your test so I've got uh three tests over here sorry two tests over here let's see what happens so what I'll do is I'm going to again go back to my local development server that's running fine I'll keep that running because I need to hit that server so I'm going to open up another terminal uh let's get some space here okay I'll just clear this up and do python test.py what do you think should happen should well I'm hoping they pass okay okay they do the two tests have passed okay so we have some tests F we have some yeah it's a start okay yeah um I like tests written before code tdd tdd like okay can we try to do that like there's probably a few things we can add as a feature maybe search by do you want to search by category maybe the category we've already got oh we have it we have it I'm sorry so we've got ID we've got category uh speakers is missing you decideed so speakers let's go for that okay so we want to the test have it fail because obviously the implementation is not there yeah and then write the implementation let's do that okay so um we're in test. by that's fine we'll we'll open up Gemini here and uh I'm going to put this prompt over here generate a new test case so I don't have the implementation for that in my app.py I'm just saying let's generate a test case for to search for sessions by Speaker okay so that shouldn't be too so it's given me something let's uh let's create some more space okay so I'm going to put in this new test that I've got okay and uh of course uh you know it's given me some dummy data this you might exist no all right let's use something someone we know exist yeah so I'll just take this live data that we have I'll take U the speaker's name from here and I'm going to put this here so this should uh ideally get me uh 200 if everything is fine I'll just remove this assert equal for now now um obviously we don't have this implementation right so if we are going to be running uh the test Suite again yeah so now we we have three tests and one of them is failing one of them is failed and it's saying uh it's not we got a 400 because there is really nothing by you know uh speaker so that's that's where we are so we don't have any implementation here that says get sessions by speaker so the next step would be then hey give me that implementation so that my test can pass so I'm just going to take this prompt again here and I'm going to say add a new route to search by sessions for a specific speaker okay let's see what happens here you know there should be more data to add to your app.py file yes that's correct so I'm going to uh go into the app.py file maybe one more route that's come up here uh and the list comprehension let's quickly see everything looks fine speaker in session speaker okay this looks good uh maybe so let's do we still have that server running we still have that server yes it's running okay so we're going to go back to the other terminal instance that we had uh let me just clear this and run my test again so we're successful now with the third test okay good I feel better we have three tests uh they're passing okay this is this is good um I think it's time we actually deploy this uh we've done a bunch of things we started off with an API uh We've implemented the API we've hooked up the database we have this web app yeah uh we have a few tests that are passing yeah um should we deploy yeah we can uh where do you want to deploy to Cloud run yeah I'll I'll I'll choose Cloud run uh but a cloud run is amazing to run containers like this is not a container at least not yet can we not yet so uh I do know that there is a command uh a g-cloud command to deploy Cloud uh sorry an application to Cloud run from sources in other words it would build the container behind the scenes for you I don't want to build anything of that sort locally here but I don't exactly remember the command for that so I'm going to be firing a prompt that sort of says what my requirement is so let me get that and um put it out here so what I'm saying here is I would like to deploy this to Cloud run I don't want to build a container image locally sorry it went happen to fast here so uh and deploy directly from source so what's the g-cloud command for it so this is another way by which you know you could use Gemini code assist to even help you not just with your development task but you're working with Google Cloud so specific like g-cloud CLI can help you with commands for that so are you happy with the results source is in the rout and sessions would be my service name authentic unauthenticated is fine probably there are other more parameters but if they're mandatory ones the g-cloud command line should should bring that up okay so you want to use that and deploy straight yep so let's do that so I'll just uh go ahead and so we're deploying the sessions app from Source in an environment okay it's asking you a question where do you want to deploy this to deploy it yeah since cloud is a regional service so let's go with uh us Central one and now if you if you see what's happening it's it's taking your sources uploading it up there there's a cloud build service behind the scenes that sort of builds out this container creates a cloud run revision a service revision for you and points it to that container image so it's going to take some time okay um was this a good application to deploy the production you know should should we have done anything can we can we maybe ask we can try to because we've done something in debug mode uh and I don't know what are the suggestions it could give but let's try all right let's see let's see what it says Wild deploying shouldn't take too long but maybe we have enough to yeah so we we will ask a fairly generic question out here that uh you know hey uh let's get some more space here that is there anything I need to do to deploy this application to production let's see what it comes up with I mean this is a general question maybe it'll give us some suggestions let's see what it comes up with can't say but let's see yeah I don't feel too good about the debug equals true but not bad so it's done a few good suggestions out here so of course you know there's a flask environment variable it's letting you know because you could accordingly do feature Flags via this uh the second point is interesting it's it's telling us that uh you could have I mean ideally you don't want this to be uh in debug mode and um sure there's also some suggestions out there for doing that and it's given you probably some some changes but again it's completely up to you another thing it could have said is maybe add some logging because things will go wrong and you probably want it didn't say that but didn't say that yeah so yeah or you could have asked uh in maybe this prompt in a slightly different way too possible yeah okay uh how's the deployment going no it's still going on okay it's going on yeah it's going on yeah shouldn't take much longer it's the revision at least the um the container has been built yeah so now we're pushing it and we should um we should get a URL back ideally once the service is running ready to receive requests we should be getting a UR yeah okay great um anything else so we don't have uh logging here at this point but there's system logging happening in any case so we see deployments happening we see uh HTTP requir so we're able to with the logging uh tool to actually go and see all of that happening so I think once the service is deployed uh we'll just we'll just check whether the app came up uh whether we can hit a few URLs and then those URLs should be visible in our uh access logs okay looks like it's taking a little bit longer than we had expected uh but that's fine do you want to try adding logs then in that case um just you know we're not going to deploy it because it's still going on but you want to ask yeah what it would take to actually um add those logs yeah do we need a specific like um library for there's a library that's there but of of course I I would like to know how to use that and what could be the sample code to do that okay let's try that so I could go here again sorry to Gemini let's get this space and I say how do I use this package in Python I mean this could be any other language this could be any other client libraries that we've got or working with any different services and that should also give you so obviously it's telling you there's a new package to install uh but post that it's also giving you step by-step things around creating the the client to it maybe giving your logger a name and then it would be as simple as um just logging the text so I could have put this maybe in any of my uh you know uh app routes for example sessions by Speaker sessions by ID and got some logging also in place okay great yeah hey I think it it has deployed yeah took a little bit longer but we're there that's the UR let's let's okay let's try to hit that URL and it should look familiar right that should look like what we have in development so this is a cloud run uh you know service that's deployed now and we could oops let's go to Ai and search there you go the sessions are still there yeah the sessions are still there awesome there's one by AI maybe there's one by app modernization come up that correctly yep yeah perfect all right so to recap we started off with the idea of building that API you know uh putting this in an open API uh file we've implemented that this happened to be ajango uh Django of course yeah uh see my my preferences are showing now uh so this this was a flask application implementing that API we tested this with dummy data hooked up the database all of this in development mode created using codes that front end that you're seeing U that obviously needs work but it's something to to work with uh We've added tests yeah the test passed we deployed and we did all of that as you saw with some iteration some back and forth sometimes with the assistant this remains an assistant like it should be considered as that but assistant an assist an assistant that's really giving you like an increase in productivity that is really uh the goal so hopefully you got to see a glimpse of that uh productivity G productivity gain that you can also benefit from uh and with that will go back to uh the slides just to close and wrap this up um what I think I I want to say and this is a recap of uh what I was just saying and the things we talked about the design phase the building and testing the deployment but this is really some what some people would call Day One there's a lot of lot more things that can happen like things can go wrong in production you can get error messages that you don't quite understand that you could feed to code assist and hopefully get some valuable information again because it understands what Google cloud is and has been um infused with all of that knowledge um the other thing uh that we want to say is that everything you've you've seen is obviously real it's live uh we didn't fake any anything there um not only that but you can do everything we've just done in a code lab which is freely accessible from this QR code or this URL uh which will require you to have a Google Cloud uh account but otherwise you know it will take you just you know pretty much the time we took you'll find all the prompts you'll find all the code and um even some troubleshooting steps uh if if things were to to go wrong so hopefully you can leverage that as well and and help um yourself try to see what uh code assist can bring you okay um Roman thank you uh very much I think I know a bit more what I can expect from this um you you probably seen this side also about offers and we do care greatly about uh feedback feedback is a gift thank you for your time that's the other thing you've given us if you can give us a little bit of feedback we'd love that as well and with that I think we're done thank you Roman thank you everyone thank [Music] you

Original Description

Join this demo-driven session to transform your development workflow with Gemini, your AI-powered collaborator. We'll start with a blank canvas and build, test, and deploy an application, leveraging Gemini's assistance at every stage. Explore how Gemini not only enhances your coding efficiency but also helps you understand and improve existing codebases. By the end, you'll discover a range of ways Gemini can supercharge your application development journey. Speakers: Alexis Moussine-Pouchkine, Romin Irani Watch more: All sessions from Google Cloud Next → https://goo.gle/next24 #GoogleCloudNext Event: Google Cloud Next 2024
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Google Cloud · Google Cloud · 0 of 60

← Previous Next →
1 Top 3 ways organizations are adjusting their cloud strategies to prepare for economic uncertainty
Top 3 ways organizations are adjusting their cloud strategies to prepare for economic uncertainty
Google Cloud
2 Google Cloud Retail Search and Browse Console deep dive
Google Cloud Retail Search and Browse Console deep dive
Google Cloud
3 Google Cloud Backup and DR - How to mount, clone or restore a VMware VM
Google Cloud Backup and DR - How to mount, clone or restore a VMware VM
Google Cloud
4 Google Cloud Backup and DR - VMware vSphere Backup Overview
Google Cloud Backup and DR - VMware vSphere Backup Overview
Google Cloud
5 Google Cloud Backup and DR - Creating backup Plans for VMware VM backups
Google Cloud Backup and DR - Creating backup Plans for VMware VM backups
Google Cloud
6 Google Cloud Backup and DR - Compute Engine Instance Backups and Sole Tenant Nodes
Google Cloud Backup and DR - Compute Engine Instance Backups and Sole Tenant Nodes
Google Cloud
7 Google Cloud Backup and DR - Managing Service Accounts
Google Cloud Backup and DR - Managing Service Accounts
Google Cloud
8 Let’s solve for what’s next
Let’s solve for what’s next
Google Cloud
9 Google Cloud Executive Briefing Center | Cloud Space | Silicon Valley
Google Cloud Executive Briefing Center | Cloud Space | Silicon Valley
Google Cloud
10 Tinyclues with Google Cloud offers CRM Intelligence to maximize conversions
Tinyclues with Google Cloud offers CRM Intelligence to maximize conversions
Google Cloud
11 Aible partners with Google Cloud helping customers build predictive models within minutes
Aible partners with Google Cloud helping customers build predictive models within minutes
Google Cloud
12 TELUS streamlines big data ingestion with help from Google Cloud and Accenture
TELUS streamlines big data ingestion with help from Google Cloud and Accenture
Google Cloud
13 Getting started with Apigee API Management
Getting started with Apigee API Management
Google Cloud
14 Google Cloud Retail Search
Google Cloud Retail Search
Google Cloud
15 Building your first API proxy with Apigee
Building your first API proxy with Apigee
Google Cloud
16 Brands and agencies develop dynamic video ads with Connected-Stories NEXT and Google Cloud
Brands and agencies develop dynamic video ads with Connected-Stories NEXT and Google Cloud
Google Cloud
17 Redefining the transportation industry
Redefining the transportation industry
Google Cloud
18 Google Cloud Project Katalyst
Google Cloud Project Katalyst
Google Cloud
19 Israel's Family Court: Creating more compelling experiences for its citizens
Israel's Family Court: Creating more compelling experiences for its citizens
Google Cloud
20 Tausight partners with Google Cloud to help healthcare industry protect PHI activity & take action
Tausight partners with Google Cloud to help healthcare industry protect PHI activity & take action
Google Cloud
21 Google Cloud Retail Browse
Google Cloud Retail Browse
Google Cloud
22 Verifying API keys and debugging your API proxy flow
Verifying API keys and debugging your API proxy flow
Google Cloud
23 Getting started with Apigee API Management
Getting started with Apigee API Management
Google Cloud
24 Adding policies to your APIs
Adding policies to your APIs
Google Cloud
25 Google Cloud Backup and DR - Configuring Google Cloud VMware Engine to work with Backup and DR
Google Cloud Backup and DR - Configuring Google Cloud VMware Engine to work with Backup and DR
Google Cloud
26 Topaz Subsea Cable
Topaz Subsea Cable
Google Cloud
27 Episode 29: Building a culture of data literacy with Latin America’s biggest ecommerce platform
Episode 29: Building a culture of data literacy with Latin America’s biggest ecommerce platform
Google Cloud
28 Weshalb Datananalysten die Sparringspartner von Produktmanagern sein sollten
Weshalb Datananalysten die Sparringspartner von Produktmanagern sein sollten
Google Cloud
29 Warum und wie METRO eine Machine Learning-Pipeline implementiert hat
Warum und wie METRO eine Machine Learning-Pipeline implementiert hat
Google Cloud
30 Wie nutzt METRO Data Science, um geschäftliche Herausforderungen zu meistern?
Wie nutzt METRO Data Science, um geschäftliche Herausforderungen zu meistern?
Google Cloud
31 Google Cloud in Qatar. Let's get solving.
Google Cloud in Qatar. Let's get solving.
Google Cloud
32 Google Cloud for Qatar
Google Cloud for Qatar
Google Cloud
33 Doha has a new Google Cloud region
Doha has a new Google Cloud region
Google Cloud
34 The new Google Cloud region in Qatar
The new Google Cloud region in Qatar
Google Cloud
35 Build, tune, and deploy foundation models with Vertex AI
Build, tune, and deploy foundation models with Vertex AI
Google Cloud
36 Generative AI on Google Cloud
Generative AI on Google Cloud
Google Cloud
37 Who will be coming to Google Cloud Day Tel Aviv? #Shorts
Who will be coming to Google Cloud Day Tel Aviv? #Shorts
Google Cloud
38 Protect your organization at the edge
Protect your organization at the edge
Google Cloud
39 Google Cloud Backup and DR Alert Notifications setup
Google Cloud Backup and DR Alert Notifications setup
Google Cloud
40 Build, tune, and deploy foundation models with Generative AI Support in Vertex AI
Build, tune, and deploy foundation models with Generative AI Support in Vertex AI
Google Cloud
41 Where the Internet Lives: Data center on the prairie
Where the Internet Lives: Data center on the prairie
Google Cloud
42 Which developer program are you joining?
Which developer program are you joining?
Google Cloud
43 Lufthansa Group baut intelligente Systeme zur Vereinfachung des Flugbetriebs
Lufthansa Group baut intelligente Systeme zur Vereinfachung des Flugbetriebs
Google Cloud
44 How ASML revived Moore's Law and remade chipmaking
How ASML revived Moore's Law and remade chipmaking
Google Cloud
45 CMO of Unity celebrates Women's History Month
CMO of Unity celebrates Women's History Month
Google Cloud
46 Vint Cerf on Google Cloud Digital Leader
Vint Cerf on Google Cloud Digital Leader
Google Cloud
47 Mobile World Congress 2023
Mobile World Congress 2023
Google Cloud
48 Topaz - Canada
Topaz - Canada
Google Cloud
49 Google Data Cloud & AI Summit 2023: Reveal opportunities to transform your business
Google Data Cloud & AI Summit 2023: Reveal opportunities to transform your business
Google Cloud
50 Building a conversational bot with Google Cloud Gen App Builder
Building a conversational bot with Google Cloud Gen App Builder
Google Cloud
51 Elisa Polystar and Google Cloud partner to bring the power of analytics and automation to CSPs
Elisa Polystar and Google Cloud partner to bring the power of analytics and automation to CSPs
Google Cloud
52 Network modernization - how can CSPs start now?
Network modernization - how can CSPs start now?
Google Cloud
53 How Semios uses imported and remote models for inference with BigQuery ML
How Semios uses imported and remote models for inference with BigQuery ML
Google Cloud
54 Deliver your AI solutions up to 100 times faster with Google Cloud partner, Snorkel AI
Deliver your AI solutions up to 100 times faster with Google Cloud partner, Snorkel AI
Google Cloud
55 Capture consumer perspectives for CPG using NLP and analytics with Harmonya and Google Cloud
Capture consumer perspectives for CPG using NLP and analytics with Harmonya and Google Cloud
Google Cloud
56 Delivering Cloud-Native Network Transformation
Delivering Cloud-Native Network Transformation
Google Cloud
57 Proactively detect & investigate anomalies & data quality issues in BigQuery with Telmai
Proactively detect & investigate anomalies & data quality issues in BigQuery with Telmai
Google Cloud
58 Introducing AlloyDB Omni
Introducing AlloyDB Omni
Google Cloud
59 Episode 30: How Auto Trader transitioned to the cloud to analyze tricky customer data
Episode 30: How Auto Trader transitioned to the cloud to analyze tricky customer data
Google Cloud
60 MongoDB Atlas on Google Cloud
MongoDB Atlas on Google Cloud
Google Cloud

Related Reads

📰
Mutation testing, but for LLM evals — early experiment, would love feedback
Learn to evaluate LLMs using mutation testing to improve model reliability and robustness
Dev.to · Ashwin Ugale
📰
Stop Calling Real LLMs in CI: Record the Decisions, Replay the Rest
Improve agent test suite efficiency by recording and replaying LLM decisions instead of calling real LLMs in CI
Medium · DevOps
📰
Stop Calling Real LLMs in CI: Record the Decisions, Replay the Rest
Optimize agent test suites by recording and replaying LLM decisions instead of calling real LLMs in CI to reduce slowness, expense, and flakiness
Medium · LLM
📰
AI From Scratch #1: What AI Actually Is (And What It Isn't)
Learn the basics of AI and its misconceptions to build a strong foundation for further learning
Dev.to · Abuka-Victor
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →