Skip to content

Commit c82685a

Browse files
docs: Updated readme, added sample prompts, updated broken links
2 parents 03ed938 + e5dcba5 commit c82685a

13 files changed

+84
-714
lines changed

content-gen/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ BRAND_SECONDARY_COLOR=#107C10
183183
- [AZD Deployment Guide](docs/AZD_DEPLOYMENT.md) - Deploy with Azure Developer CLI
184184
- [Manual Deployment Guide](docs/DEPLOYMENT.md) - Step-by-step manual deployment
185185
- [Image Generation Configuration](docs/IMAGE_GENERATION.md) - DALL-E 3 and GPT-Image-1 setup
186-
- [API Reference](docs/API.md)
187186

188187
## License
189188

190-
MIT License - See [LICENSE](LICENSE) for details.
189+
MIT License - See [LICENSE](../LICENSE) for details.

content-gen/docs/AZD_DEPLOYMENT.md

Lines changed: 9 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ azd auth login
5858

5959
# Login to Azure CLI (required for some post-deployment scripts)
6060
az login
61+
```
62+
Alternatively, login to Azure using a device code (recommended when using VS Code Web):
63+
64+
```
65+
az login --use-device-code
6166
```
6267

6368
### 2. Initialize Environment
@@ -72,36 +77,7 @@ azd env new <environment-name>
7277
azd env new content-gen-dev
7378
```
7479

75-
### 3. Configure Parameters (Optional)
76-
77-
The deployment has sensible defaults, but you can customize:
78-
79-
```bash
80-
# Set the Azure region (default: eastus)
81-
azd env set AZURE_LOCATION swedencentral
82-
83-
# Set AI Services region (must support your models)
84-
azd env set AZURE_ENV_OPENAI_LOCATION swedencentral
85-
86-
# GPT Model configuration
87-
azd env set gptModelName gpt-4o
88-
azd env set gptModelVersion 2024-11-20
89-
azd env set gptModelDeploymentType GlobalStandard
90-
azd env set gptModelCapacity 50
91-
92-
# Image generation model (dalle-3 or gpt-image-1)
93-
azd env set imageModelChoice gpt-image-1
94-
azd env set dalleModelCapacity 1
95-
96-
# Embedding model
97-
azd env set embeddingModel text-embedding-3-large
98-
azd env set embeddingDeploymentCapacity 50
99-
100-
# Azure OpenAI API version
101-
azd env set azureOpenaiAPIVersion 2024-12-01-preview
102-
```
103-
104-
### 4. Choose Deployment Configuration
80+
### 3. Choose Deployment Configuration
10581

10682
The [`infra`](../infra) folder contains the [`main.bicep`](../infra/main.bicep) Bicep script, which defines all Azure infrastructure components for this solution.
10783

@@ -124,7 +100,7 @@ Before running `azd up`, copy the contents from the production configuration fil
124100
5. Select all existing content (Ctrl+A) and paste the copied content (Ctrl+V).
125101
6. Save the file (Ctrl+S).
126102

127-
### 5. Deploy
103+
### 4. Deploy
128104

129105
```bash
130106
azd up
@@ -139,25 +115,6 @@ This single command will:
139115
6. **Configure** RBAC and Cosmos DB roles
140116
7. **Upload** sample data and create the search index
141117

142-
## Deployment Parameters Reference
143-
144-
| Parameter | Default | Description |
145-
|-----------|---------|-------------|
146-
| `AZURE_LOCATION` | eastus | Primary Azure region |
147-
| `azureAiServiceLocation` | eastus | Region for AI Services (must support chosen models) |
148-
| `gptModelName` | gpt-4o | GPT model for content generation |
149-
| `gptModelVersion` | 2024-11-20 | Model version |
150-
| `gptModelDeploymentType` | GlobalStandard | Deployment type |
151-
| `gptModelCapacity` | 50 | TPM capacity (in thousands) |
152-
| `imageModelChoice` | dalle-3 | Image model: `dalle-3` or `gpt-image-1` |
153-
| `dalleModelCapacity` | 1 | Image model capacity |
154-
| `embeddingModel` | text-embedding-3-large | Embedding model |
155-
| `embeddingDeploymentCapacity` | 50 | Embedding TPM capacity |
156-
| `enablePrivateNetworking` | false | Enable VNet and private endpoints |
157-
| `enableMonitoring` | false | Enable Log Analytics + App Insights |
158-
| `enableScalability` | false | Enable auto-scaling |
159-
| `enableRedundancy` | false | Enable zone/geo redundancy |
160-
161118
## Using Existing Resources
162119

163120
### Reuse Existing AI Foundry Project
@@ -174,13 +131,6 @@ azd env set AZURE_EXISTING_AI_PROJECT_RESOURCE_ID "/subscriptions/<sub-id>/resou
174131
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>"
175132
```
176133

177-
### Use Existing Container Registry
178-
179-
```bash
180-
# Set the name of your existing ACR
181-
azd env set ACR_NAME myexistingacr
182-
```
183-
184134
## Post-Deployment
185135

186136
After `azd up` completes, you'll see output like:
@@ -212,51 +162,6 @@ azd env get-value WEB_APP_URL
212162
azd env get-value RESOURCE_GROUP_NAME
213163
```
214164

215-
## Day-2 Operations
216-
217-
### Update the Application
218-
219-
After making code changes:
220-
221-
```bash
222-
# Rebuild and redeploy everything
223-
azd up
224-
225-
# Or just redeploy (no infra changes)
226-
azd deploy
227-
```
228-
229-
### Update Only the Backend (Container)
230-
231-
```bash
232-
# Get ACR and ACI names
233-
ACR_NAME=$(azd env get-value ACR_NAME)
234-
ACI_NAME=$(azd env get-value CONTAINER_INSTANCE_NAME)
235-
RG_NAME=$(azd env get-value RESOURCE_GROUP_NAME)
236-
237-
# Build and push new image
238-
az acr build --registry $ACR_NAME --image content-gen-app:latest --file ./src/WebApp.Dockerfile ./src
239-
240-
# Restart ACI to pull new image
241-
az container restart --name $ACI_NAME --resource-group $RG_NAME
242-
```
243-
244-
### Update Only the Frontend
245-
246-
```bash
247-
cd src/app/frontend
248-
npm install && npm run build
249-
250-
cd ../frontend-server
251-
zip -r frontend-deploy.zip static/ server.js package.json package-lock.json
252-
253-
az webapp deploy \
254-
--resource-group $(azd env get-value RESOURCE_GROUP_NAME) \
255-
--name $(azd env get-value APP_SERVICE_NAME) \
256-
--src-path frontend-deploy.zip \
257-
--type zip
258-
```
259-
260165
### View Logs
261166

262167
```bash
@@ -331,7 +236,7 @@ Error: az acr build failed
331236
**Solution**: Check the Dockerfile and ensure all required files are present:
332237
```bash
333238
# Manual build for debugging
334-
cd src
239+
cd src/app
335240
docker build -f WebApp.Dockerfile -t content-gen-app:test .
336241
```
337242

@@ -403,6 +308,6 @@ When `enablePrivateNetworking` is enabled:
403308

404309
## Related Documentation
405310

406-
- [Manual Deployment Guide](DEPLOYMENT.md)
311+
- [Deployment Guide](DEPLOYMENT.md)
407312
- [Image Generation Configuration](IMAGE_GENERATION.md)
408313
- [Azure Developer CLI Documentation](https://learn.microsoft.com/azure/developer/azure-developer-cli/)

content-gen/docs/DEPLOYMENT.md

Lines changed: 18 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,12 @@ When you start the deployment, most parameters will have **default values**, but
134134
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------- |
135135
| **Azure Region** | The region where resources will be created. | *(empty)* |
136136
| **Environment Name** | A **3–20 character alphanumeric value** used to generate a unique ID to prefix the resources. | env\_name |
137-
| **GPT Model** | Choose from **gpt-4, gpt-4o, gpt-4o-mini**. | gpt-4o-mini |
138-
| **GPT Model Version** | The version of the selected GPT model. | 2024-07-18 |
137+
| **GPT Model** | Choose from **gpt-4, gpt-4o, gpt-4o-mini, gpt-5.1**. | gpt-5.1 |
138+
| **GPT Model Version** | The version of the selected GPT model. | 2025-11-13 |
139139
| **OpenAI API Version** | The Azure OpenAI API version to use. | 2025-01-01-preview |
140-
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models** (in thousands). | 30k |
141-
| **DALL-E Model** | DALL-E model for image generation. | dall-e-3 |
140+
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models** (in thousands). | 150k |
141+
| **Image Model** | Choose from **dall-e-3, gpt-image-1, gpt-image-1.5** | gpt-image-1 |
142142
| **Image Tag** | Docker image tag to deploy. Common values: `latest`, `dev`, `hotfix`. | latest |
143-
| **Use Local Build** | Boolean flag to determine if local container builds should be used. | false |
144143
| **Existing Log Analytics Workspace** | To reuse an existing Log Analytics Workspace ID. | *(empty)* |
145144
| **Existing Azure AI Foundry Project** | To reuse an existing Azure AI Foundry Project ID instead of creating a new one. | *(empty)* |
146145

@@ -171,30 +170,14 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
171170
172171
Follow steps in [App Authentication](./AppAuthentication.md) to configure authentication in app service. Note: Authentication changes can take up to 10 minutes.
173172
174-
2. **Assign RBAC Roles (if needed)**
175-
176-
If you encounter 401/403 errors, run the RBAC assignment script and wait 5-10 minutes for propagation:
177-
178-
```shell
179-
bash ./scripts/assign_rbac_roles.sh
180-
```
181-
182-
3. **Deleting Resources After a Failed Deployment**
173+
2. **Deleting Resources After a Failed Deployment**
183174
- Follow steps in [Delete Resource Group](./DeleteResourceGroup.md) if your deployment fails and/or you need to clean up the resources.
184175
185176
## Troubleshooting
186177
187178
<details>
188179
<summary><b>Common Issues and Solutions</b></summary>
189180
190-
### 401 Unauthorized Errors
191-
192-
**Symptom**: API calls return 401 errors
193-
194-
**Cause**: Missing RBAC role assignments
195-
196-
**Solution**: Run `assign_rbac_roles.sh` and wait 5-10 minutes for propagation
197-
198181
### 403 Forbidden from Cosmos DB
199182
200183
**Symptom**: Cosmos DB operations fail with 403
@@ -230,56 +213,29 @@ az webapp config set -g $RESOURCE_GROUP -n <app-name> --http20-enabled false
230213
231214
### Image Generation Not Working
232215
233-
**Symptom**: DALL-E requests fail
216+
**Symptom**: DALL-E/GPT-Image requests fail
234217
235-
**Cause**: Missing DALL-E model deployment or incorrect endpoint
218+
**Cause**: Missing DALL-E/GPT-Image model deployment or incorrect endpoint
236219
237220
**Solution**:
238-
1. Verify DALL-E 3 deployment exists in Azure OpenAI resource
239-
2. Check `AZURE_OPENAI_DALLE_ENDPOINT` and `AZURE_OPENAI_DALLE_DEPLOYMENT` environment variables
221+
1. Verify DALL-E 3 or GPT-Image-1 or GPT-Image-1.5 deployment exists in Azure OpenAI resource
222+
2. Check `AZURE_OPENAI_IMAGE_MODEL` environment variable
240223
241224
</details>
242225
243-
## Environment Variables Reference
244-
245-
<details>
246-
<summary><b>Backend Environment Variables (ACI)</b></summary>
247-
248-
| Variable | Description | Example |
249-
|----------|-------------|---------|
250-
| AZURE_OPENAI_ENDPOINT | GPT model endpoint | https://ai-account.cognitiveservices.azure.com/ |
251-
| AZURE_OPENAI_DEPLOYMENT_NAME | GPT deployment name | gpt-4o-mini |
252-
| AZURE_OPENAI_DALLE_ENDPOINT | DALL-E endpoint | https://dalle-account.cognitiveservices.azure.com/ |
253-
| AZURE_OPENAI_DALLE_DEPLOYMENT | DALL-E deployment name | dall-e-3 |
254-
| COSMOS_ENDPOINT | Cosmos DB endpoint | https://cosmos.documents.azure.com:443/ |
255-
| COSMOS_DATABASE | Database name | content-generation |
256-
| AZURE_STORAGE_ACCOUNT_NAME | Storage account | storagecontentgen |
257-
| AZURE_STORAGE_CONTAINER | Product images container | product-images |
258-
| AZURE_STORAGE_GENERATED_CONTAINER | Generated images container | generated-images |
259-
260-
</details>
261-
262-
<details>
263-
<summary><b>Frontend Environment Variables (App Service)</b></summary>
264-
265-
| Variable | Description | Example |
266-
|----------|-------------|---------|
267-
| BACKEND_URL | Backend API URL | http://backend.contentgen.internal:8000 |
268-
| WEBSITES_PORT | App Service port | 3000 |
269-
270-
</details>
226+
## Sample Workflow
271227
272-
## Sample Prompts
228+
To get started with the Content Generation solution, follow these steps:
273229
274-
To help you get started, here are some **sample prompts** you can use with the Content Generation Solution:
230+
1. **Task:** From the welcome screen, select one of the suggested prompts. Sample prompts include:
231+
- *"I need to create a social media post about paint products for home remodels. The campaign is titled 'Brighten Your Springtime' and the audience is new homeowners. I need marketing copy plus an image."*
232+
- *"Generate a social media campaign with ad copy and an image. This is for 'Back to School' and the audience is parents of school age children. Tone is playful and humorous."*
275233
276-
- "Create a product description for a new eco-friendly water bottle"
277-
- "Generate marketing copy for a summer sale campaign"
278-
- "Write social media posts promoting our latest product launch"
279-
- "Create an image for a blog post about sustainable living"
280-
- "Generate a product image showing a modern office setup"
234+
2. **Task:** Click the **"Confirm Brief"** button.
235+
> **Observe:** The system analyzes the creative brief to provide suggestions later.
281236
282-
These prompts serve as a great starting point to explore the solution's capabilities with text generation, image generation, and content management.
237+
3. **Task:** Select a product from the product list, then click **"Generate Content"**.
238+
> **Observe:** Enters "Thinking Process" with a "Generating Content.." spinner. Once complete, the detailed output is displayed.
283239
284240
## Architecture Overview
285241
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Deleting Resources After a Failed Deployment in Azure Portal
2+
3+
If your deployment fails and you need to clean up the resources manually, follow these steps in the Azure Portal.
4+
5+
---
6+
7+
## **1. Navigate to the Azure Portal**
8+
1. Open [Azure Portal](https://portal.azure.com/).
9+
2. Sign in with your Azure account.
10+
11+
---
12+
13+
## **2. Find the Resource Group**
14+
1. In the search bar at the top, type **"Resource groups"** and select it.
15+
2. Locate the **resource group** associated with the failed deployment.
16+
17+
![Resource Groups](images/resourcegroup.png)
18+
19+
![Resource Groups](images/resource-groups.png)
20+
21+
---
22+
23+
## **3. Delete the Resource Group**
24+
1. Click on the **resource group name** to open it.
25+
2. Click the **Delete resource group** button at the top.
26+
27+
![Delete Resource Group](images/DeleteRG.png)
28+
29+
3. Type the resource group name in the confirmation box and click **Delete**.
30+
31+
📌 **Note:** Deleting a resource group will remove all resources inside it.
32+
33+
---
34+
35+
## **4. Delete Individual Resources (If Needed)**
36+
If you don’t want to delete the entire resource group, follow these steps:
37+
38+
1. Open **Azure Portal** and go to the **Resource groups** section.
39+
2. Click on the specific **resource group**.
40+
3. Select the **resource** you want to delete (e.g., App Service, Storage Account).
41+
4. Click **Delete** at the top.
42+
43+
![Delete Individual Resource](images/deleteservices.png)
44+
45+
---
46+
47+
## **5. Verify Deletion**
48+
- After a few minutes, refresh the **Resource groups** page.
49+
- Ensure the deleted resource or group no longer appears.
50+
51+
📌 **Tip:** If a resource fails to delete, check if it's **locked** under the **Locks** section and remove the lock.

content-gen/docs/QuotaCheck.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The final table lists regions with available quota. You can select any of these
7272
**To check quota for the deployment**
7373

7474
```sh
75-
curl -L -o quota_check_params.sh "https://raw.githubusercontent.com/microsoft/content-generation-solution-accelerator/main/content-gen/infra/script/quota_check_params.sh"
75+
curl -L -o quota_check_params.sh "https://raw.githubusercontent.com/microsoft/content-generation-solution-accelerator/main/content-gen/infra/scripts/quota_check_params.sh"
7676
chmod +x quota_check_params.sh
7777
./quota_check_params.sh
7878
```
@@ -82,9 +82,9 @@ The final table lists regions with available quota. You can select any of these
8282
1. Open the terminal in VS Code or Codespaces.
8383
2. If you're using VS Code, click the dropdown on the right side of the terminal window, and select `Git Bash`.
8484
![git_bash](images/git_bash.png)
85-
3. Navigate to the `content-gen/infra/script` folder where the script files are located and make the script as executable:
85+
3. Navigate to the `content-gen/infra/scripts` folder where the script files are located and make the script as executable:
8686
```sh
87-
cd content-gen/infra/script
87+
cd content-gen/infra/scripts
8888
chmod +x quota_check_params.sh
8989
```
9090
4. Run the appropriate script based on your requirement:
76.6 KB
Loading

0 commit comments

Comments
 (0)