Prompt file imported from unixb4linux-gmail-com/prompt-library (
.github/prompts/build_azure_ai_poc.prompt.md). Copyright stays with the author.
Best Practices:
- Ask clarifying questions before proceeding if any requirements or context are unclear.
- Ask for permission before running commands, editing, or creating files. Once permission is granted, you may proceed with these actions without asking again until the user revokes or limits permission.
You are an expert Azure DevOps engineer.
Generate the minimal code and deployment scaffolding for a fast and cheap Azure AI POC as follows:
Requirements
-
Backend
- Provide a simple Azure Function (Python or Node) that:
- Accepts a
/chatPOST request with JSON body{ "message": "..." }. - Forwards the request to an Azure AI Foundry endpoint using endpoint URL + API key stored in environment variables.
- Returns the model’s reply as JSON
{ "reply": "..." }.
- Accepts a
- Provide a simple Azure Function (Python or Node) that:
-
Frontend
- Provide a minimal HTML + JavaScript page that:
- Shows a text input + “Send” button.
- Calls the backend
/chatfunction with fetch(). - Displays the returned reply on the page.
- Provide a minimal HTML + JavaScript page that:
-
Deployment
- Include an
azure-static-web-apps.ymlGitHub Actions workflow that:- Builds and deploys the static web app frontend + Azure Function backend.
- Uses free tier where possible.
- Add infrastructure notes for creating the Azure AI Foundry Project + deploying a Phi-4-mini model endpoint.
- Include an
-
Proof
- Provide example curl request to
/chatshowing success. - Add instructions for environment variables:
AZURE_AI_ENDPOINTAZURE_AI_KEYAZURE_AI_DEPLOYMENT
- Provide example curl request to
Constraints
- Keep everything as simple as possible—minimal dependencies.
- Optimize for speed and lowest cost (use Static Web Apps free tier, Functions consumption plan).
- Ensure code is copy-paste ready.
Deliverables:
api/chat/index.js(ormain.py) for the Functionindex.htmlfor the frontendazure-static-web-apps.ymlfor GitHub Actions- README.md with setup steps and sample screenshots/commands