Skip to content

Commit 9afdb3c

Browse files
authored
Merge pull request #12 from MicrosoftCloudEssentials-LearningHub/AI-SA-refs
Update README with detailed project information
2 parents cf034f8 + 9f00623 commit 9afdb3c

File tree

3 files changed

+48
-53
lines changed

3 files changed

+48
-53
lines changed

.github/workflows/use-visitor-counter.yml

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
uses: actions/checkout@v4
2222
with:
2323
fetch-depth: 0
24+
ref: ${{ github.head_ref || github.ref_name }}
2425

2526
- name: Shallow clone visitor counter logic
2627
run: git clone --depth=1 https://github.com/brown9804/github-visitor-counter.git
@@ -57,38 +58,23 @@ jobs:
5758
git config --global user.name "github-actions[bot]"
5859
git config --global user.email "github-actions[bot]@users.noreply.github.com"
5960
60-
- name: Commit and push changes (PR)
61-
if: github.event_name == 'pull_request'
61+
- name: Commit and merge changes
6262
env:
63-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
PR_BRANCH: ${{ github.head_ref || github.ref_name }}
64+
GIT_AUTHOR_NAME: github-actions[bot]
65+
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
66+
GIT_COMMITTER_NAME: github-actions[bot]
67+
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
6468
run: |
65-
git fetch origin
66-
git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }}
67-
git add "*.md" metrics.json
68-
git commit -m "Update visitor count" || echo "No changes to commit"
69-
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
70-
git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
71-
git push origin HEAD:${{ github.event.pull_request.head.ref }}
72-
73-
- name: Commit and push changes (non-PR)
74-
if: github.event_name != 'pull_request'
75-
env:
76-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
77-
run: |
78-
git fetch origin
79-
git checkout ${{ github.event.pull_request.head.ref }} || git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }}
80-
git add "*.md" metrics.json
81-
git commit -m "Update visitor count" || echo "No changes to commit"
82-
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
83-
git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
84-
git push origin HEAD:${{ github.event.pull_request.head.ref }}
85-
86-
- name: Create Pull Request (non-PR)
87-
if: github.event_name != 'pull_request'
88-
uses: peter-evans/create-pull-request@v6
89-
with:
90-
token: ${{ secrets.GITHUB_TOKEN }}
91-
branch: update-visitor-count
92-
title: "Update visitor count"
93-
body: "Automated update of visitor count"
94-
base: main
69+
# Ensure we're on the correct branch
70+
git switch -c "$PR_BRANCH" || git switch "$PR_BRANCH"
71+
72+
# Stage and commit changes if any
73+
git add -A
74+
git diff --staged --quiet || git commit -m "Update visitor count"
75+
76+
# Pull and merge existing changes
77+
git pull origin "$PR_BRANCH" --no-rebase
78+
79+
# Push all changes
80+
git push origin "$PR_BRANCH"

README.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Costa Rica
88
[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/)
99
[brown9804](https://github.com/brown9804)
1010

11-
Last updated: 2025-08-07
11+
Last updated: 2025-10-29
1212

1313
----------
1414

@@ -31,21 +31,30 @@ Last updated: 2025-08-07
3131

3232
- [Solution Accelerator for AI Document Processor (ADP)](https://github.com/azure/ai-document-processor) - AI Factory
3333

34-
| **Category** | **Details** |
35-
|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
36-
| **Purpose** | Automate document processing using Azure services and LLMs. Extracts data from files (PDF, Word, MP3), processes via Azure OpenAI, and outputs structured insights (JSON/CSV) to blob storage. |
37-
| **Infrastructure Provisioning** | Uses Bicep templates to deploy all required Azure resources. Automates setup of networking, identity, and access controls using RBAC and managed identities to ensure secure and scalable deployment. |
38-
| **Main Azure Resources** | - **Azure Function App**: Hosts the orchestrator and activity functions using Durable Functions to manage the document processing workflow.<br>- **Azure Storage Account**: Stores input documents (bronze container) and output results (gold container). Also holds prompt configurations if UI is not deployed.<br>- **Azure Static Web App**: Provides a user-friendly interface for uploading files, editing prompts, and triggering workflows.<br>- **Azure OpenAI**: Processes extracted text using LLMs to generate structured summaries or insights.<br>- **Azure Cognitive Services**: Specifically uses Document Intelligence for OCR and text extraction from uploaded files.<br>- **Cosmos DB**: Stores prompt configurations when the frontend UI is enabled, allowing dynamic updates from the web interface.<br>- **Key Vault**: Securely stores secrets, keys, and credentials used by the Function App and other services.<br>- **Application Insights**: Enables monitoring, logging, and diagnostics for the Function App and other components.<br>- **App Service Plan**: Provides the compute resources for running the Function App. |
39-
| **Pipeline Components** | - `function_app.py`: Main orchestrator using Durable Functions chaining pattern.<br>- `activities/runDocIntel.py`: Extracts text from documents using Azure Document Intelligence.<br>- `activities/callAoai.py`: Sends extracted text and prompt to Azure OpenAI and receives structured JSON.<br>- `activities/writeToBlob.py`: Writes the final output to the gold container in blob storage. |
40-
| **Data Flow** | 1. Upload document to bronze container<br>2. OCR via Document Intelligence<br>3. Send extracted text + prompt to Azure OpenAI<br>4. Receive structured JSON<br>5. Write output to gold container |
41-
| **Frontend UI (Optional)** | - Allows business users to upload files and edit prompts<br>- Prompts are stored in Cosmos DB<br>- Users can trigger workflows and view job status directly from the interface |
42-
| **Prompt Configuration** | - Without UI: Prompts are stored in `prompts.yaml` file in blob storage<br>- With UI: Prompts are stored and managed in Cosmos DB via the web interface |
43-
| **Deployment Steps** | 1. Fork and clone the GitHub repo<br>2. Run `az login`, `azd auth login`, `azd up`<br>3. Provide User Principal ID for RBAC setup<br>4. Choose whether to deploy frontend UI |
44-
| **Execution (Without UI)** | - Update `prompts.yaml` with desired instructions<br>- Send POST request to `http_start` endpoint with blob metadata<br>- Monitor pipeline execution via Log Stream |
45-
| **Execution (With UI)** | - Upload files via web interface<br>- Edit system and user prompts<br>- Click "Start Workflow" to trigger pipeline<br>- View success/failure messages and job status |
46-
| **Monitoring & Troubleshooting** | - Use Log Stream for real-time logs<br>- Use Log Analytics Workspace to query exceptions and performance metrics<br>- Use SSH console in Development Tools to inspect deployment logs and file system |
47-
| **Pre-Requisites** | - Azure CLI<br>- Azure Developer CLI (azd)<br>- Node.js 18.x.x<br>- npm 9.x.x<br>- Python 3.11 |
48-
| **License** | MIT License – Free to use, modify, and distribute with attribution. No warranty provided. |
34+
| **Category** | **Details** |
35+
|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
36+
| **Purpose** | Automate document processing using Azure services and LLMs. Extracts data from files (PDF, Word, MP3), processes via Azure OpenAI, and outputs structured insights (JSON/CSV) to blob storage. |
37+
| **Infrastructure Provisioning** | Uses Bicep templates to deploy all required Azure resources. Automates setup of networking, identity, and access controls using RBAC and managed identities to ensure secure and scalable deployment. |
38+
| **Main Azure Resources** | - **Azure Function App**: Hosts the orchestrator and activity functions using Durable Functions to manage the document processing workflow.<br>- **Azure Storage Account**: Stores input documents (bronze container) and output results (gold container). Also holds prompt configurations if UI is not deployed.<br>- **Azure Static Web App**: Provides a user-friendly interface for uploading files, editing prompts, and triggering workflows.<br>- **Azure OpenAI**: Processes extracted text using LLMs to generate structured summaries or insights.<br>- **Azure Cognitive Services**: Specifically uses Document Intelligence for OCR and text extraction from uploaded files.<br>- **Cosmos DB**: Stores prompt configurations when the frontend UI is enabled, allowing dynamic updates from the web interface.<br>- **Key Vault**: Securely stores secrets, keys, and credentials used by the Function App and other services.<br>- **Application Insights**: Enables monitoring, logging, and diagnostics for the Function App and other components.<br>- **App Service Plan**: Provides the compute resources for running the Function App. |
39+
| **Pipeline Components** | - `function_app.py`: Main orchestrator using Durable Functions chaining pattern.<br>- `activities/runDocIntel.py`: Extracts text from documents using Azure Document Intelligence.<br>- `activities/callAoai.py`: Sends extracted text and prompt to Azure OpenAI and receives structured JSON.<br>- `activities/writeToBlob.py`: Writes the final output to the gold container in blob storage. |
40+
| **Data Flow** | 1. Upload document to bronze container<br>2. OCR via Document Intelligence<br>3. Send extracted text + prompt to Azure OpenAI<br>4. Receive structured JSON<br>5. Write output to gold container |
41+
| **Frontend UI (Optional)** | - Allows business users to upload files and edit prompts<br>- Prompts are stored in Cosmos DB<br>- Users can trigger workflows and view job status directly from the interface |
42+
| **Prompt Configuration** | - Without UI: Prompts are stored in `prompts.yaml` file in blob storage<br>- With UI: Prompts are stored and managed in Cosmos DB via the web interface |
43+
| **Deployment Steps** | 1. Fork and clone the GitHub repo<br>2. Run `az login`, `azd auth login`, `azd up`<br>3. Provide User Principal ID for RBAC setup<br>4. Choose whether to deploy frontend UI |
44+
| **Execution (Without UI)** | - Update `prompts.yaml` with desired instructions<br>- Send POST request to `http_start` endpoint with blob metadata<br>- Monitor pipeline execution via Log Stream |
45+
| **Execution (With UI)** | - Upload files via web interface<br>- Edit system and user prompts<br>- Click "Start Workflow" to trigger pipeline<br>- View success/failure messages and job status |
46+
| **Monitoring & Troubleshooting** | - Use Log Stream for real-time logs<br>- Use Log Analytics Workspace to query exceptions and performance metrics<br>- Use SSH console in Development Tools to inspect deployment logs and file system |
47+
| **Pre-Requisites** | - Azure CLI<br>- Azure Developer CLI (azd)<br>- Node.js 18.x.x<br>- npm 9.x.x<br>- Python 3.11 |
48+
| **License** | MIT License – Free to use, modify, and distribute with attribution. No warranty provided. |
49+
50+
<img width="835" height="535" alt="image" src="https://github.com/user-attachments/assets/61dbac57-f635-4dd6-9292-50e51823a8c4" />
51+
52+
> Data flow:
53+
54+
<img width="930" height="620" alt="image" src="https://github.com/user-attachments/assets/2f01a07b-71cd-4ee9-b316-c0a2273d01b2" />
55+
56+
> ZTA:
57+
<img width="1840" height="935" alt="image" src="https://github.com/user-attachments/assets/947ddf0d-daf3-4df3-949c-1271a3fef7bb" />
4958
5059
- [Use Azure AI services with SynapseML in Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/data-science/how-to-use-ai-services-with-synapseml)
5160
- [Plan and manage costs for Azure AI Foundry](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/costs-plan-manage)
@@ -986,7 +995,7 @@ If you need further assistance with the code, please click [here to view all the
986995
987996
<!-- START BADGE -->
988997
<div align="center">
989-
<img src="https://img.shields.io/badge/Total%20views-1304-limegreen" alt="Total views">
990-
<p>Refresh Date: 2025-09-17</p>
998+
<img src="https://img.shields.io/badge/Total%20views-1298-limegreen" alt="Total views">
999+
<p>Refresh Date: 2025-10-29</p>
9911000
</div>
9921001
<!-- END BADGE -->

terraform-infrastructure/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ graph TD;
109109

110110
<!-- START BADGE -->
111111
<div align="center">
112-
<img src="https://img.shields.io/badge/Total%20views-1304-limegreen" alt="Total views">
113-
<p>Refresh Date: 2025-09-17</p>
112+
<img src="https://img.shields.io/badge/Total%20views-1298-limegreen" alt="Total views">
113+
<p>Refresh Date: 2025-10-29</p>
114114
</div>
115115
<!-- END BADGE -->

0 commit comments

Comments
 (0)