GenAI for Java Developers 1: Getting started
Skills:
LLM Foundations80%
Key Takeaways
This video teaches Java developers how to get started with generative AI using essential tools and techniques
Full Transcript
[Music] Sometimes brewing Java feels like a science experiment. Grinders, filters, timers. I've ruined my fair share of mornings trying to get it right. Hi everyone. I'm I and I'm a cloud advocate here at Microsoft. My job is to help developers learn, experiment, and also have fun with new technologies. And with me, getting started is always the scariest part. However, if we know the right tools, it doesn't have to be. And that's why I'm so excited to have Rory with me here today. Rory's going to be talking about how we can keep it simple. No complicated setups, no intimidating environments. Just like instant coffee, you'll see how easy it is to get going, especially with GitHub code spaces. So, let's go ahead and dive in. So, the first thing you're going to want to start to do is go on to our demo repo, which is generative AI for beginners-java. And it is set up already with a dev container for you to go in and have Java, the necessary tools, and Visual Studio already set up. So, you're going to go in there, you're going to start, and you're going to fork it. And then, once you fork it, let's go into our fork there, you're going to create a code space from that fork. You're going to go to code there to code spaces. And I've already set up a code space there. And we have a very generous free tier that allows you to run the examples end to end at the same time with your free tier of your code space. I need you to go in and create a fine-grained token to be able to call the free tier of GitHub models. So, GitHub models is an online repository of most of the models that Microsoft and our partners want you to test with. You're going to generate a new token. And here, we'll call it uh token test. And then, you're going to set the permissions. So, if we go there, model permissions. And you can generate that token. And then, you're going to take that token that you see there, and you're going to paste it in to your dev container. So, I've started my dev container here. Here's my dev container. And then, I'm going to go export GitHub token, and I'm going to paste in that token there. And then, I'm going to then go in and set it. Now, I've already got a different token set up and everything. So, I'm ready to rock. So, I've got the GitHub token there, and I'm going to open up my code space, and I'm going to go through to the GitHub models example in the setup dev environment folder. And you can just go into that and just hit debug. Now, it's going to debug, and it's going to break on that point of going into the OpenAI client. We're using the OpenAI SDK. And you can see there, it's saying, "I'm going to use the model GPT-4.1 nano. And it's a very low um throttled model. So, you can do all of the examples with GPT-4.1 nano or the other little bit more heavyweight mini model. And we're going to hit that and we want to say, "Well, say hello world." We're going to add a system message just to tell the model, "Hey, listen, what do you want to do? You're a concise assistant." So, let's run that through there. And we're sending the request to GitHub models. It's using the model 4.1 nano. And then, we can see there, it says hello world. Once you're done, you can just close the code space. So, we'll use that a little bit later. And you can close that there. And in future sessions, we're going to go through core generative AI techniques, practical samples with apps, and then also responsible gen AI. So, to summarize the session that we've just done, we used a dev container, we created a GitHub model, we took a fork that is going to run our code space. We created our code space there. We opened up our code space, and then we ran the basic example. Thank you so much, Rory. I appreciate so much the level of detail you went into into your session. But not just that, how fun and entertaining you keep it the entire time. For everybody who joined us for this episode, if you would want to visit resources related to this episode, you can find them at aka.ms/javaandai for beginners. Link is in the description of this video. We'll see you in the next episode.
Original Description
Resources: https://aka.ms/JavaAndAIForBeginners
https://aka.ms/genaijava
In this episode, Ayan Gupta is joined by Rory who will guide you through the essential first steps of working with generative AI in Java. Just like brewing the perfect cup of coffee doesn't have to be complicated, getting started with GenAI for Java doesn't need to be intimidating when you have the right tools!
Building on the introduction, this hands-on episode shows you exactly how to set up your development environment quickly and easily. You'll learn how to use GitHub Codespaces to eliminate complicated setup processes, how to fork and work with the demo repository, and how to access GitHub Models—Microsoft's online repository of AI models that you can test with for free.
Rory demonstrates step-by-step how to create a fine-grained token for accessing GitHub Models, set up your dev container with all the necessary Java tools and Visual Studio Code pre-configured, and run your first "Hello World" example using the OpenAI SDK with GPT-4o mini. The best part? You can do all of this using GitHub's free tier for Codespaces, making it accessible to everyone.
This tutorial is perfect for Java developers who want to start experimenting with large language models without the hassle of complex local installations. By the end of this session, you'll have a working development environment and understand the foundational tools you'll use throughout the rest of this series.
Next up we'll dive deeper into core generative AI techniques, practical samples, and responsible AI practices. Don't forget to subscribe and follow along!
0:00 - Introduction: Making AI Simple Like Instant Coffee
0:23 - Why Getting Started Is the Scariest Part
0:54 - Setting Up the Demo Repository
1:01 - Forking the Generative AI for Beginners Java Repo
1:26 - Creating Your GitHub Codespace
1:51 - Creating a Fine-Grained Token for GitHub Models
2:42 - Configuring Your Dev Container
3:04 - Running Your First GitHub Models Example
3
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Microsoft Developer · Microsoft Developer · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Prepare for the DP-300 exam & the Azure Database Administrator Associate cert | Data Exposed
Microsoft Developer
What I Wish I Knew ... about landing a job in tech
Microsoft Developer
Igniting Developer Innovation with Vector Search
Microsoft Developer
Combining the power of vector search with Azure OpenAI then revolutionize image search with vectors!
Microsoft Developer
What I Wish I Knew ... about finding your place in tech
Microsoft Developer
Fluent UI React Insights: Accessible by default
Microsoft Developer
Signing Container Images with Notary Project
Microsoft Developer
What I Wish I Knew ... about finding your place in tech
Microsoft Developer
What programming languages does GitHub Copilot support?
Microsoft Developer
What I Wish I Knew ... about how much your job can change
Microsoft Developer
What I Wish I Knew ... about how much your job can change
Microsoft Developer
How do I become more confident about AI?
Microsoft Developer
How do I become more confident about AI?
Microsoft Developer
Performance Demos of SQL’s Intelligent Query Processing Feedback capabilities | Data Exposed
Microsoft Developer
What I Wish I Knew ... about coming to Microsoft
Microsoft Developer
What I Wish I Knew ... about coming to Microsoft
Microsoft Developer
Revolutionizing Image Search with Vectors
Microsoft Developer
Igniting developer innovation with Vector search and Azure OpenAI
Microsoft Developer
Getting Started with Azure AI Studio's Prompt Flow - Part 2
Microsoft Developer
What I Wish I Knew ... about finding my career path
Microsoft Developer
What I Wish I Knew ... about finding my career path
Microsoft Developer
Windows Terminal's journey to Open Source
Microsoft Developer
Can I trust the code that GitHub Copilot generates?
Microsoft Developer
What I Wish I Knew ... about interviewing
Microsoft Developer
What I Wish I Knew ... about interviewing
Microsoft Developer
What is the Microsoft TechSpark Program?
Microsoft Developer
SQL Server 2022: Accelerate query performance while reducing query compile time - w/ no code changes
Microsoft Developer
What I Wish I Knew ... about discovering computer science
Microsoft Developer
What I Wish I Knew ... about discovering computer science
Microsoft Developer
Call center transcription and analysis using Azure AI
Microsoft Developer
How to use Text Analytics for health in Azure AI Language
Microsoft Developer
Azure OpenAI-powered summarization in Azure AI Language
Microsoft Developer
Accelerate data labeling using Azure OpenAI and Azure AI Language
Microsoft Developer
Building a Private ChatGPT with Azure OpenAI
Microsoft Developer
What I Wish I Knew ... about how to interview
Microsoft Developer
What I Wish I Knew ... about how to interview
Microsoft Developer
Getting Started with Azure AI Studio's Prompt Flow - Part 3
Microsoft Developer
Intelligent Apps with Azure Kubernetes Service (AKS)
Microsoft Developer
Getting Started with Azure Blob Storage | Data Exposed: MVP Edition
Microsoft Developer
Chat + Your Data + Plugins
Microsoft Developer
What I Wish I Knew ... about different career paths
Microsoft Developer
What I Wish I Knew ... about different career paths
Microsoft Developer
Advanced Dev Tunnels Features | OD122
Microsoft Developer
Learn Live - Manage performance and availability in Azure Cosmos DB for PostgreSQL
Microsoft Developer
Plan your SQL Migration to Azure with confidence | Data Exposed
Microsoft Developer
What I Wish I Knew ... about social skills in a tech career
Microsoft Developer
What I Wish I Knew ... about social skills in a tech career
Microsoft Developer
All About Vectors, Search, and Function Calling in Azure OpenAI - Labor Day Special
Microsoft Developer
Introduction to project ORAS
Microsoft Developer
What I Wish I Knew ... about finding the right major
Microsoft Developer
What I Wish I Knew ... about finding the right major
Microsoft Developer
What I Wish I Knew ... about how to approach programming
Microsoft Developer
What I Wish I Knew ... about how to approach programming
Microsoft Developer
Learn Live - Scale from a single node to multiple nodes with Azure Cosmos DB for PostgreSQL
Microsoft Developer
What I Wish I Knew ... about diversity in tech #1
Microsoft Developer
What I Wish I Knew ... about diversity in tech #1
Microsoft Developer
Get started with SQL Server AGs across Windows, Linux and Container Replicas | Data Exposed
Microsoft Developer
Writing LLM Apps with Azure AI and PromptFlow
Microsoft Developer
What I Wish I Knew ... about how cool working in tech could be
Microsoft Developer
Open Source foundation models in Azure Machine Learning & optimization techniques behind the scenes
Microsoft Developer
More on: LLM Foundations
View skill →Related Reads
📰
📰
📰
📰
Panduan Teknikal: Compile llama.cpp di Debian 12/13 dan Cross Compile ARM64
Dev.to · hardyweb
The first AI was a syllogism machine in 1956. We're still building the same thing.
Reddit r/artificial
I Tested 300+ Models. Then I Killed the Benchmark.
Dev.to · Vilius
Human-in-the-Loop Approval for LangChain Agents
Dev.to · sekera-radim
Chapters (8)
Introduction: Making AI Simple Like Instant Coffee
0:23
Why Getting Started Is the Scariest Part
0:54
Setting Up the Demo Repository
1:01
Forking the Generative AI for Beginners Java Repo
1:26
Creating Your GitHub Codespace
1:51
Creating a Fine-Grained Token for GitHub Models
2:42
Configuring Your Dev Container
3:04
Running Your First GitHub Models Example
🎓
Tutor Explanation
DeepCamp AI