Skip to content

Commit 98e4066

Browse files
MingMing
authored andcommitted
feat: Add Azure AI Foundry models (gpt-5.2, gpt-5.1) with distinct color schemes
- Backend: Add AzureFoundryAdapter for Foundry project endpoint - Backend: Configure gpt-5.2 (aqua blue #00b4d8) and gpt-5.1 (ocean blue #0077b6) in model config - Frontend: Add model options to dropdown with distinct color indicators - Frontend: Apply consistent color scheme across buttons, message labels, and modal indicators - Docs: Update README files with Foundry models setup instructions - Docs: Sync GitHub Pages with Foundry models info and colored chips - Tests: Add testFoundryModels.js for integration testing - Config: Update .envtemplate with AZURE_AI_FOUNDRY_ENDPOINT/KEY examples
1 parent 615be86 commit 98e4066

14 files changed

Lines changed: 280 additions & 36 deletions

File tree

.envtemplate

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,9 @@ GPT_4_1_MINI_API_URL=https://yourserver.openai.azure.com/openai/deployments/gpt-
6363
GPT_4_1_MINI_API_KEY=your-gpt41-mini-key
6464

6565
SORA_API_URL=https://yourserver.openai.azure.com/openai/deployments/sora/video/generations/jobs?api-version=2025-02-15-preview
66-
SORA_API_KEY=your-sora-api-key
66+
SORA_API_KEY=your-sora-api-key
67+
68+
# Azure AI Foundry Project Endpoint Configuration
69+
# For models deployed through Azure AI Foundry projects (gpt-5.2, gpt-5.1, etc.)
70+
AZURE_AI_FOUNDRY_ENDPOINT=https://your-project-resource.services.ai.azure.com/api/projects/your-project/chat/completions?api-version=2024-05-01-preview
71+
AZURE_AI_FOUNDRY_KEY=your-foundry-api-key

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"editor.formatOnSave": false,
1414
// Only format when ESLint configuration is detected
1515
"editor.formatOnSaveMode": "modificationsIfAvailable",
16+
"liveServer.settings.port": 5501,
1617

1718
}

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
> **Language / 语言**: [English](README.md) | [中文](README.zh-CN.md)
44
> **Live Demo / 在线演示**: [English](https://hddevteam.github.io/Azure-chatGPT-demo/) | [中文](https://hddevteam.github.io/Azure-chatGPT-demo/zh-cn/)
55
6-
Welcome to Azure chatGPT, a fascinating chatGPT web app built with Node.js and leveraging the latest Azure OpenAI models including **GPT-5 series** (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat), **O-series reasoning models** (o3, o3-mini, o4-mini), GPT-4o-realtime/o1/o1-mini/GPT-4O/GPT-4O-mini/GPT-4.1 series, enhanced with cutting-edge Sora AI video generation capabilities. This project serves as an excellent starting point for developers interested in developing comprehensive AI applications using JavaScript, the Azure OpenAI API, and advanced video generation features.
6+
Welcome to Azure chatGPT, a fascinating chatGPT web app built with Node.js and leveraging the latest Azure OpenAI models including **GPT-5 series** (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat) and **Azure AI Foundry models** (gpt-5.2, gpt-5.1), **O-series reasoning models** (o3, o3-mini, o4-mini), GPT-4o-realtime/o1/o1-mini/GPT-4O/GPT-4O-mini/GPT-4.1 series, enhanced with cutting-edge Sora AI video generation capabilities. This project serves as an excellent starting point for developers interested in developing comprehensive AI applications using JavaScript, the Azure OpenAI API, and advanced video generation features.
77

88
## 📚 Learnings from this Project
99

1010
By working on this project, you will gain hands-on experience with several key APIs and services, including:
1111

12-
- **Azure OpenAI API**: Learn how to integrate and utilize various advanced GPT models, including **GPT-5 series** (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat), **O-series reasoning models** (o3, o3-mini, o4-mini), GPT-4o, GPT-4o-mini, GPT-4o-realtime, and GPT-4.1 series to build intelligent conversational agents with cutting-edge capabilities.
12+
- **Azure OpenAI API**: Learn how to integrate and utilize various advanced GPT models, including **GPT-5 series** (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat), **Azure AI Foundry models** (gpt-5.2, gpt-5.1), **O-series reasoning models** (o3, o3-mini, o4-mini), GPT-4o, GPT-4o-mini, GPT-4o-realtime, and GPT-4.1 series to build intelligent conversational agents with cutting-edge capabilities.
1313
- **Sora Video Generation API**: Master advanced AI video generation capabilities, including text-to-video conversion, job management, and asynchronous processing workflows.
1414

1515
- **Azure Speech Service**: Understand how to implement both Text-to-Speech and Speech-to-Text functionalities to enhance user interactions with voice capabilities.
@@ -25,6 +25,7 @@ These learnings will equip you with the skills to build robust, feature-rich cha
2525
- **🎬 NEW: Sora AI Video Generation - Create stunning videos from text descriptions using OpenAI's cutting-edge Sora model! 🎬**
2626
![Sora Video Generation Screenshot](screenshots/screenshot_sora.jpeg)
2727
- **🎉Support for GPT-5 Series - Latest reasoning models with enhanced capabilities: gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat🎉**
28+
- **🚀Support for Azure AI Foundry Models - GPT-5.2 and GPT-5.1 deployed through Azure AI Foundry project endpoints (distinct UI colors for quick identification)🚀**
2829
- **🎉Support for O-series Models - Advanced reasoning capabilities: o3, o3-mini, o4-mini🎉**
2930
- **🎙️Enhanced Realtime Voice Chat - dual GPT Realtime models (gpt-realtime & gpt-realtime-mini), instant model switching, 8 voice options, and speaker mute control🎙️**
3031
- **✨Support PWA (Progressive Web App)✨**
@@ -125,6 +126,10 @@ This application now includes powerful video generation capabilities powered by
125126
O4_MINI_API_URL=https://yourserver.openai.azure.com/openai/deployments/o4-mini/chat/completions?api-version=2024-12-01-preview
126127
O4_MINI_API_KEY=your-o4-mini-key
127128
129+
# Azure AI Foundry Project Endpoint (for gpt-5.2, gpt-5.1, etc.)
130+
AZURE_AI_FOUNDRY_ENDPOINT=https://your-project-resource.services.ai.azure.com/api/projects/your-project/chat/completions?api-version=2024-05-01-preview
131+
AZURE_AI_FOUNDRY_KEY=your-foundry-api-key
132+
128133
# Traditional O1 Models
129134
O1_MINI_API_URL=https://yourserver.openai.azure.com/openai/deployments/o1-mini/chat/completions?api-version=2024-12-01-preview
130135
O1_MINI_API_KEY=your-o1-mini-key

README.zh-CN.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# 🤖 强大的 Azure OpenAI GPT 模型 chatGPT 与 Sora 视频生成
22

3-
欢迎使用 Azure chatGPT,这是一个基于 Node.js 构建的迷人 chatGPT 网络应用,利用最新的 Azure OpenAI 模型,包括 **GPT-5 系列**(gpt-5、gpt-5-mini、gpt-5-nano、gpt-5-chat)、**O系列推理模型**(o3、o3-mini、o4-mini)、GPT-4o-realtime/o1/o1-mini/GPT-4O/GPT-4O-mini/GPT-4.1 系列,并增强了尖端的 Sora AI 视频生成功能。该项目为对使用 JavaScript、Azure OpenAI API 和高级视频生成功能开发综合 AI 应用程序感兴趣的开发者提供了一个绝佳的起点。
3+
欢迎使用 Azure chatGPT,这是一个基于 Node.js 构建的迷人 chatGPT 网络应用,利用最新的 Azure OpenAI 模型,包括 **GPT-5 系列**(gpt-5、gpt-5-mini、gpt-5-nano、gpt-5-chat)、**Azure AI Foundry 模型**(gpt-5.2、gpt-5.1)、**O系列推理模型**(o3、o3-mini、o4-mini)、GPT-4o-realtime/o1/o1-mini/GPT-4O/GPT-4O-mini/GPT-4.1 系列,并增强了尖端的 Sora AI 视频生成功能。该项目为对使用 JavaScript、Azure OpenAI API 和高级视频生成功能开发综合 AI 应用程序感兴趣的开发者提供了一个绝佳的起点。
44

55
## 📚 项目学习收获
66

77
通过这个项目,您将获得几个关键 API 和服务的实践经验,包括:
88

9-
- **Azure OpenAI API**:学习如何集成和利用各种先进的 GPT 模型,包括 **GPT-5 系列**(gpt-5、gpt-5-mini、gpt-5-nano、gpt-5-chat)、**O系列推理模型**(o3、o3-mini、o4-mini)、GPT-4o、GPT-4o-mini、GPT-4o-realtime 和 GPT-4.1 系列,构建具有尖端功能的智能对话代理。
9+
- **Azure OpenAI API**:学习如何集成和利用各种先进的 GPT 模型,包括 **GPT-5 系列**(gpt-5、gpt-5-mini、gpt-5-nano、gpt-5-chat)、**Azure AI Foundry 模型**(gpt-5.2、gpt-5.1)、**O系列推理模型**(o3、o3-mini、o4-mini)、GPT-4o、GPT-4o-mini、GPT-4o-realtime 和 GPT-4.1 系列,构建具有尖端功能的智能对话代理。
1010
- **Sora 视频生成 API**:掌握高级 AI 视频生成功能,包括文本转视频、作业管理和异步处理工作流。
1111

1212
- **Azure 语音服务**:了解如何实现文本转语音和语音转文本功能,通过语音功能增强用户交互。
@@ -22,6 +22,7 @@
2222
- **🎬 新功能:Sora AI 视频生成 - 使用 OpenAI 尖端的 Sora 模型从文本描述创建惊人的视频!🎬**
2323
![Sora 视频生成截图](screenshots/screenshot_sora.jpeg)
2424
- **🎉支持 GPT-5 系列 - 最新推理模型,具备增强功能:gpt-5、gpt-5-mini、gpt-5-nano、gpt-5-chat🎉**
25+
- **🚀支持 Azure AI Foundry 模型 - 通过 Azure AI Foundry 项目端点部署的 GPT-5.2 和 GPT-5.1(前端使用独立颜色便于区分)🚀**
2526
- **🎉支持 O系列模型 - 高级推理能力:o3、o3-mini、o4-mini🎉**
2627
- **🎙️增强版实时语音聊天 - 提供 gpt-realtime 与 gpt-realtime-mini 双模型、即时切换、8 种语音以及扬声器静音控制🎙️**
2728
- **✨支持 PWA(渐进式网络应用程序)✨**

docs/assets/css/style.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,31 @@ p {
441441
font-size: 1rem;
442442
}
443443

444+
/* Model chips (used in GitHub Pages to highlight model support) */
445+
.model-chip {
446+
display: inline-flex;
447+
align-items: center;
448+
gap: 0.35rem;
449+
padding: 0.15rem 0.55rem;
450+
border-radius: 999px;
451+
font-size: 0.85rem;
452+
font-weight: 600;
453+
line-height: 1.4;
454+
color: #fff;
455+
vertical-align: baseline;
456+
white-space: nowrap;
457+
}
458+
459+
.model-chip::before {
460+
content: "●";
461+
font-size: 0.85em;
462+
line-height: 1;
463+
opacity: 0.9;
464+
}
465+
466+
.model-chip--gpt52 { background: #00b4d8; }
467+
.model-chip--gpt51 { background: #0077b6; }
468+
444469
.feature-card__list {
445470
list-style: none;
446471
padding: 0;

docs/index.html

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Azure ChatGPT Demo - Powerful AI & Sora Video Generation</title>
7-
<meta name="description" content="Experience the next generation of AI conversation with Azure OpenAI GPT-5, GPT-4o, O-series reasoning models, Sora video generation, real-time voice chat, and comprehensive AI features. Open source and ready to deploy.">
8-
<meta name="keywords" content="Azure OpenAI, ChatGPT, GPT-5, GPT-4o, O-series models, Sora video generation, AI chat, Node.js, realtime voice, reasoning models">
7+
<meta name="description" content="Experience the next generation of AI conversation with Azure OpenAI GPT-5, Azure AI Foundry models (gpt-5.2, gpt-5.1), GPT-4o, O-series reasoning models, Sora video generation, real-time voice chat, and comprehensive AI features. Open source and ready to deploy.">
8+
<meta name="keywords" content="Azure OpenAI, Azure AI Foundry, ChatGPT, GPT-5, gpt-5.2, gpt-5.1, GPT-4o, O-series models, Sora video generation, AI chat, Node.js, realtime voice, reasoning models">
99
<meta name="author" content="HDDevTeam">
1010

1111
<!-- Open Graph Meta Tags -->
1212
<meta property="og:title" content="AI007 - Azure ChatGPT Demo with GPT-5 & Sora Video Generation">
13-
<meta property="og:description" content="Powerful chatGPT web app with Azure OpenAI GPT-5, GPT-4o, O-series reasoning models, Sora AI video generation, and real-time voice capabilities.">
13+
<meta property="og:description" content="Powerful chatGPT web app with Azure OpenAI GPT-5, Azure AI Foundry models (gpt-5.2, gpt-5.1), GPT-4o, O-series reasoning models, Sora AI video generation, and real-time voice capabilities.">
1414
<meta property="og:type" content="website">
1515
<meta property="og:url" content="https://hddevteam.github.io/Azure-chatGPT-demo/">
1616
<meta property="og:image" content="https://hddevteam.github.io/Azure-chatGPT-demo/assets/images/icons/512.png">
1717

1818
<!-- Twitter Card Meta Tags -->
1919
<meta name="twitter:card" content="summary_large_image">
2020
<meta name="twitter:title" content="AI007 - Azure ChatGPT Demo with GPT-5 & Sora Video Generation">
21-
<meta name="twitter:description" content="Powerful chatGPT web app with Azure OpenAI GPT-5, GPT-4o, O-series reasoning models, Sora AI video generation, and real-time voice capabilities.">
21+
<meta name="twitter:description" content="Powerful chatGPT web app with Azure OpenAI GPT-5, Azure AI Foundry models (gpt-5.2, gpt-5.1), GPT-4o, O-series reasoning models, Sora AI video generation, and real-time voice capabilities.">
2222
<meta name="twitter:image" content="https://hddevteam.github.io/Azure-chatGPT-demo/assets/images/icons/512.png">
2323

2424
<!-- Structured Data -->
@@ -27,7 +27,7 @@
2727
"@context": "https://schema.org",
2828
"@type": "SoftwareApplication",
2929
"name": "AI007 - Azure ChatGPT Demo",
30-
"description": "Powerful chatGPT web app built with Node.js and leveraging Azure OpenAI GPT-5, GPT-4o, O-series reasoning models, Sora video generation, and real-time voice capabilities.",
30+
"description": "Powerful chatGPT web app built with Node.js and leveraging Azure OpenAI GPT-5, Azure AI Foundry models (gpt-5.2, gpt-5.1), GPT-4o, O-series reasoning models, Sora video generation, and real-time voice capabilities.",
3131
"url": "https://hddevteam.github.io/Azure-chatGPT-demo/",
3232
"applicationCategory": "DeveloperApplication",
3333
"operatingSystem": "Cross-platform",
@@ -114,7 +114,7 @@ <h1 class="hero__title">
114114
Powerful chatGPT for <span class="hero__title-highlight">Azure OpenAI</span>
115115
</h1>
116116
<p class="hero__subtitle">
117-
Experience the next generation of AI conversation with Azure OpenAI GPT-5 series (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat), O-series reasoning models (o3, o3-mini, o4-mini), GPT-4o models, and GPT-4.1 series, enhanced with Sora video generation and real-time voice capabilities.
117+
Experience the next generation of AI conversation with Azure OpenAI GPT-5 series (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat), Azure AI Foundry models (gpt-5.2, gpt-5.1), O-series reasoning models (o3, o3-mini, o4-mini), GPT-4o models, and GPT-4.1 series, enhanced with Sora video generation and real-time voice capabilities.
118118
</p>
119119
<div class="hero__features">
120120
<div class="hero__feature">
@@ -188,7 +188,9 @@ <h3 class="feature-card__title">Enhanced Real-time Voice Chat</h3>
188188
<div class="feature-card__icon"><svg class="icon" viewBox="0 0 24 24"><path d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div>
189189
<h3 class="feature-card__title">Latest AI Models</h3>
190190
<p class="feature-card__description">
191-
Support for the most advanced AI models including GPT-5 series (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat), O-series reasoning models (o3, o3-mini, o4-mini), GPT-4o series, and GPT-4.1 series.
191+
Support for the most advanced AI models including GPT-5 series (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat), Azure AI Foundry models
192+
(<span class="model-chip model-chip--gpt52">gpt-5.2</span> <span class="model-chip model-chip--gpt51">gpt-5.1</span>),
193+
O-series reasoning models (o3, o3-mini, o4-mini), GPT-4o series, and GPT-4.1 series.
192194
</p>
193195
</div>
194196

@@ -314,10 +316,11 @@ <h3 class="step__title">Clone Repository</h3>
314316
<div class="step__number">2</div>
315317
<div class="step__content">
316318
<h3 class="step__title">Configure Environment</h3>
317-
<p class="step__description">Set up your Azure OpenAI API keys and endpoints</p>
319+
<p class="step__description">Set up your Azure OpenAI credentials (and Azure AI Foundry project endpoint for gpt-5.2 / gpt-5.1)</p>
318320
<div class="code-block">
319321
<code>cp .envtemplate .env
320-
# Edit .env with your Azure OpenAI credentials</code>
322+
# Edit .env with your Azure OpenAI credentials
323+
# If using Azure AI Foundry models (gpt-5.2 / gpt-5.1), also set AZURE_AI_FOUNDRY_ENDPOINT and AZURE_AI_FOUNDRY_KEY</code>
321324
<button class="code-block__copy" data-clipboard-text="cp .envtemplate .env" title="Copy to clipboard" aria-label="Copy command to clipboard">
322325
<svg viewBox="0 0 24 24" fill="currentColor">
323326
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/>
@@ -361,10 +364,11 @@ <h3 class="step__title">Start the Application</h3>
361364
<div class="step__number">2</div>
362365
<div class="step__content">
363366
<h3 class="step__title">Configure Environment</h3>
364-
<p class="step__description">Set up your Azure OpenAI API keys and endpoints</p>
367+
<p class="step__description">Set up your Azure OpenAI credentials (and Azure AI Foundry project endpoint for gpt-5.2 / gpt-5.1)</p>
365368
<div class="code-block">
366369
<code>cp .envtemplate .env
367-
# Edit .env with your Azure OpenAI credentials</code>
370+
# Edit .env with your Azure OpenAI credentials
371+
# If using Azure AI Foundry models (gpt-5.2 / gpt-5.1), also set AZURE_AI_FOUNDRY_ENDPOINT and AZURE_AI_FOUNDRY_KEY</code>
368372
<button class="code-block__copy" data-clipboard-text="cp .envtemplate .env" title="Copy to clipboard" aria-label="Copy command to clipboard">
369373
<svg viewBox="0 0 24 24" fill="currentColor">
370374
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/>
@@ -412,6 +416,7 @@ <h3 class="getting-started__requirements-title">Prerequisites</h3>
412416
<ul class="getting-started__requirements-list">
413417
<li>Node.js 16+ installed</li>
414418
<li>Azure OpenAI API access</li>
419+
<li>(Optional) Azure AI Foundry project access (for gpt-5.2 / gpt-5.1)</li>
415420
<li>Azure subscription (for advanced features)</li>
416421
<li>Sora API access (for video generation)</li>
417422
</ul>

0 commit comments

Comments
 (0)