# alfredodeza/azure-chat-demo architecture

> Architecture diagram of the GitHub repository alfredodeza/azure-chat-demo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alfredodeza/azure-chat-demo
- Repository: https://github.com/alfredodeza/azure-chat-demo

## Overview

This repository is a set of Azure chat demos, not one integrated application. The sampled root demo configures a Semantic Kernel chat service, registers a prompted chat function and a travel-weather plugin, then invokes the chat function. The examples directory names indicate additional prompt, function, and microservice variants; README also documents a separate Cognitive Search RAG setup. Those unsampled examples are represented as capabilities, but their internal wiring is not inferred.

Main entry points: [`chat.py`](https://github.com/alfredodeza/azure-chat-demo/blob/main/chat.py) (Weather Chat Demo), [`examples/1-simple/chat.py`](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/1-simple/chat.py) (Simple Chat), [`examples/2-system-prompt/chat.py`](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/2-system-prompt/chat.py) (System Prompt), [`examples/3-advanced-prompts/chat.py`](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/3-advanced-prompts/chat.py) (Advanced Prompts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Sampled Runtime"]
  node_main["Weather Chat Demo<br/>[chat.py]"]
  node_kernel["Semantic Kernel<br/>[chat.py]"]
  node_chatfn["Prompted Chat Function<br/>[chat.py]"]
  node_weather["Travel Weather Plugin<br/>[chat.py]"]
end

subgraph group_examples["Chat Examples"]
  node_simple["Simple Chat<br/>[chat.py]"]
  node_system["System Prompt<br/>[chat.py]"]
  node_advancedprompts["Advanced Prompts<br/>[chat.py]"]
  node_functions["Function Calling<br/>[chat.py]"]
  node_wine["Wine Plugin Assets<br/>[skprompt.txt]"]
  node_advancedfunctions["Advanced Functions<br/>[chat.py]"]
  node_nativefunctions["Native Functions<br/>[chat.py]"]
  node_microservice["Chat Microservice<br/>[chat.py]"]
end

subgraph group_integrations["External Services"]
  node_azure{{"Azure OpenAI"}}
  node_search[("Azure Cognitive Search")]
end

node_user(("Demo User"))

node_user -->|"runs demo"| node_main
node_main -->|"configures"| node_kernel
node_kernel -->|"registers chat service"| node_azure
node_main -->|"imports plugin"| node_kernel
node_main -->|"registers function"| node_chatfn
node_main -->|"invokes"| node_chatfn
node_chatfn -.->|"offers function"| node_weather
node_user -.->|"uses example"| node_simple
node_user -.->|"uses example"| node_system
node_user -.->|"uses example"| node_advancedprompts
node_user -.->|"uses example"| node_functions
node_user -.->|"uses example"| node_advancedfunctions
node_user -.->|"uses example"| node_nativefunctions
node_user -.->|"uses example"| node_microservice
node_user -.->|"configures for RAG"| node_search

click node_main "https://github.com/alfredodeza/azure-chat-demo/blob/main/chat.py"
click node_kernel "https://github.com/alfredodeza/azure-chat-demo/blob/main/chat.py"
click node_chatfn "https://github.com/alfredodeza/azure-chat-demo/blob/main/chat.py"
click node_weather "https://github.com/alfredodeza/azure-chat-demo/blob/main/chat.py"
click node_simple "https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/1-simple/chat.py"
click node_system "https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/2-system-prompt/chat.py"
click node_advancedprompts "https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/3-advanced-prompts/chat.py"
click node_functions "https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/4-functions/chat.py"
click node_wine "https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/4-functions/plugins/WinePlugin/Somellier/skprompt.txt"
click node_advancedfunctions "https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/5-advanced-functions/chat.py"
click node_nativefunctions "https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/6-native-functions/chat.py"
click node_microservice "https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/7-microservice/chat.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_kernel,node_chatfn,node_weather,node_user toneBlue
class node_simple,node_system,node_advancedprompts,node_functions,node_wine,node_advancedfunctions,node_nativefunctions,node_microservice toneAmber
class node_azure,node_search toneMint
```

## Components

### Sampled Runtime

- [Weather Chat Demo](https://github.com/alfredodeza/azure-chat-demo/blob/main/chat.py): `chat.py`
- [Semantic Kernel](https://github.com/alfredodeza/azure-chat-demo/blob/main/chat.py): `chat.py`
- [Prompted Chat Function](https://github.com/alfredodeza/azure-chat-demo/blob/main/chat.py): `chat.py`
- [Travel Weather Plugin](https://github.com/alfredodeza/azure-chat-demo/blob/main/chat.py): `chat.py`

### Chat Examples

- [Simple Chat](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/1-simple/chat.py): `examples/1-simple/chat.py`
- [System Prompt](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/2-system-prompt/chat.py): `examples/2-system-prompt/chat.py`
- [Advanced Prompts](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/3-advanced-prompts/chat.py): `examples/3-advanced-prompts/chat.py`
- [Function Calling](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/4-functions/chat.py): `examples/4-functions/chat.py`
- [Wine Plugin Assets](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/4-functions/plugins/WinePlugin/Somellier/skprompt.txt): `examples/4-functions/plugins/WinePlugin/Somellier/skprompt.txt`
- [Advanced Functions](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/5-advanced-functions/chat.py): `examples/5-advanced-functions/chat.py`
- [Native Functions](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/6-native-functions/chat.py): `examples/6-native-functions/chat.py`
- [Chat Microservice](https://github.com/alfredodeza/azure-chat-demo/blob/main/examples/7-microservice/chat.py): `examples/7-microservice/chat.py`

### External Services

- **Azure OpenAI**
- **Azure Cognitive Search**

### Other components

- **Demo User**

## Connections

- Demo User → Weather Chat Demo: runs demo (evidence: `chat.py`)
- Weather Chat Demo → Semantic Kernel: configures (evidence: `chat.py`)
- Semantic Kernel → Azure OpenAI: registers chat service (evidence: `chat.py`)
- Weather Chat Demo → Semantic Kernel: imports plugin (evidence: `chat.py`)
- Weather Chat Demo → Prompted Chat Function: registers function (evidence: `chat.py`)
- Weather Chat Demo → Prompted Chat Function: invokes (evidence: `chat.py`)
- Prompted Chat Function → Travel Weather Plugin: offers function (evidence: `chat.py`)
- Demo User → Simple Chat: uses example
- Demo User → System Prompt: uses example
- Demo User → Advanced Prompts: uses example
- Demo User → Function Calling: uses example
- Demo User → Advanced Functions: uses example
- Demo User → Native Functions: uses example
- Demo User → Chat Microservice: uses example
- Demo User → Azure Cognitive Search: configures for RAG (evidence: `README.md`)
