microsoft / generative-ai-for-beginners

Microsoft / Generative-AI-for-Beginners

21 Lessons teaching everything you need to know to start building Generative AI applications. 这是一套包含 21 节课程的教程,教授你开始构建生成式 AI 应用所需的一切知识。

🌐 Multi-Language Support Supported via GitHub Action (Automated & Always Up-to-Date): Arabic | Bengali | Bulgarian | Burmese (Myanmar) | Chinese (Simplified) | Chinese (Traditional, Hong Kong) | Chinese (Traditional, Macau) | Chinese (Traditional, Taiwan) | Croatian | Czech | Danish | Dutch | Estonian | Finnish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Kannada | Khmer | Korean | Lithuanian | Malay | Malayalam | Marathi | Nepali | Nigerian Pidgin | Norwegian | Persian (Farsi) | Polish | Portuguese (Brazil) | Portuguese (Portugal) | Punjabi (Gurmukhi) | Romanian | Russian | Serbian (Cyrillic) | Slovak | Slovenian | Spanish | Swahili | Swedish | Tagalog (Filipino) | Tamil | Telugu | Thai | Turkish | Ukrainian | Urdu | Vietnamese. 🌐 多语言支持:通过 GitHub Action 实现(自动化且保持最新)。支持语言包括:阿拉伯语、孟加拉语、保加利亚语、缅甸语、简体中文、繁体中文(香港)、繁体中文(澳门)、繁体中文(台湾)、克罗地亚语、捷克语、丹麦语、荷兰语、爱沙尼亚语、芬兰语、法语、德语、希腊语、希伯来语、印地语、匈牙利语、印尼语、意大利语、日语、卡纳达语、高棉语、韩语、立陶宛语、马来语、马拉雅拉姆语、马拉地语、尼泊尔语、尼日利亚皮钦语、挪威语、波斯语、波兰语、葡萄牙语(巴西)、葡萄牙语(葡萄牙)、旁遮普语、罗马尼亚语、俄语、塞尔维亚语(西里尔字母)、斯洛伐克语、斯洛文尼亚语、西班牙语、斯瓦希里语、瑞典语、他加禄语(菲律宾)、泰米尔语、泰卢固语、泰语、土耳其语、乌克兰语、乌尔都语、越南语。

Prefer to Clone Locally? This repository includes 50+ language translations which significantly increases the download size. To clone without translations, use sparse checkout: 想要在本地克隆?本仓库包含 50 多种语言翻译,这会显著增加下载体积。若要跳过翻译文件进行克隆,请使用稀疏检出(Sparse Checkout):

Bash / macOS / Linux:

git clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.git
cd generative-ai-for-beginners
git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'

CMD (Windows):

git clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.git
cd generative-ai-for-beginners
git sparse-checkout set --no-cone "/*" "!translations" "!translated_images"

This gives you everything you need to complete the course with a much faster download. 这样你就能以更快的下载速度获取完成课程所需的一切内容。

Generative AI for Beginners (Version 3) - A Course Learn the fundamentals of building Generative AI applications with our 21-lesson comprehensive course by Microsoft Cloud Advocates. 生成式 AI 初学者课程(第三版) 通过微软云技术倡导者(Cloud Advocates)提供的 21 节综合课程,学习构建生成式 AI 应用的基础知识。

🌱 Getting Started This course has 21 lessons. Each lesson covers its own topic so start wherever you like! Lessons are labeled either “Learn” lessons explaining a Generative AI concept or “Build” lessons that explain a concept and code examples in both Python and TypeScript when possible. For .NET Developers checkout Generative AI for Beginners (.NET Edition)! Each lesson also includes a “Keep Learning” section with additional learning tools. 🌱 入门指南 本课程共有 21 节。每节课涵盖独立的主题,你可以从任何感兴趣的地方开始!课程分为“学习(Learn)”类(讲解生成式 AI 概念)和“构建(Build)”类(讲解概念并尽可能提供 Python 和 TypeScript 代码示例)。对于 .NET 开发者,请查看《生成式 AI 初学者课程(.NET 版)》!每节课还包含一个“持续学习(Keep Learning)”部分,提供额外的学习工具。

What You Need To run the code of this course, you can use either:

  • Azure OpenAI Service - Lessons: “aoai-assignment”
  • Microsoft Foundry Models - Lessons: “githubmodels” (GitHub Models is retiring at the end of July 2026 - use Microsoft Foundry Models instead)
  • OpenAI API - Lessons: “oai-assignment”
  • Foundry Local - Run models fully offline on your own device, no cloud subscription required
  • Basic knowledge of Python or TypeScript is helpful - *For absolute beginners check out these Python and TypeScript courses
  • A GitHub account to fork this entire repo to your own GitHub account We have created a Course Setup lesson to help you with setting up your development environment. Don’t forget to star (🌟) this repo to find it easier later. 你需要准备什么 要运行本课程的代码,你可以使用以下任一方式:
  • Azure OpenAI Service - 对应课程:“aoai-assignment”
  • Microsoft Foundry Models - 对应课程:“githubmodels”(GitHub Models 将于 2026 年 7 月底停用,请改用 Microsoft Foundry Models)
  • OpenAI API - 对应课程:“oai-assignment”
  • Foundry Local - 在你自己的设备上完全离线运行模型,无需云订阅
  • 具备 Python 或 TypeScript 的基础知识会有所帮助 - *对于绝对的初学者,请查看这些 Python 和 TypeScript 课程
  • 一个 GitHub 账号,以便将整个仓库 Fork 到你自己的 GitHub 账号下 我们创建了一节“课程设置(Course Setup)”课来帮助你配置开发环境。别忘了给这个仓库点个星(🌟),以便日后查找。

🧠 Ready to Deploy? If you are looking for more advanced code samples, check out our collection of Generative AI Code Samples in both Python and TypeScript. 🧠 准备好部署了吗? 如果你正在寻找更高级的代码示例,请查看我们收集的 Python 和 TypeScript 生成式 AI 代码示例。

🗣️ Meet Other Learners, Get Support Join our official Microsoft Foundry Discord server to meet and network with other learners taking this course and get support. Ask questions or share product feedback in our Microsoft Foundry Developer Forum on Github. 🗣️ 结识其他学习者,获取支持 加入我们的官方 Microsoft Foundry Discord 服务器,与其他学习本课程的学员交流并获取支持。你也可以在 GitHub 上的 Microsoft Foundry 开发者论坛中提问或分享产品反馈。

🚀 Building a Startup? Visit Microsoft for Startups to find out how to get started building with Azure credits today. 🚀 正在创业? 访问“Microsoft for Startups”,了解如何立即通过 Azure 额度开始构建你的项目。

🙏 Want to help? Do you have suggestions or found spelling or code errors? Raise an issue or Create a pull request. 🙏 想要提供帮助? 有建议、发现拼写错误或代码错误?请提交 Issue 或创建 Pull Request。

📂 Each lesson includes:

  • A short video introduction to the topic
  • A written lesson located in the README
  • Python and TypeScript code samples supporting Azure OpenAI and OpenAI API
  • Links to extra resources to continue your learning 📂 每节课包含:
  • 关于该主题的简短视频介绍
  • 位于 README 中的书面课程内容
  • 支持 Azure OpenAI 和 OpenAI API 的 Python 和 TypeScript 代码示例
  • 供继续学习的额外资源链接

🗃️ Lessons (Table omitted for brevity, please refer to the original repository for the full list) 🗃️ 课程列表 (为简洁起见省略表格,完整列表请参考原仓库)