Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/build-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ permissions:

jobs:
build-chat-gateway:
name: Build provider-agnostic chat gateway
name: Test provider-agnostic chat gateway
runs-on: ubuntu-latest

steps:
Expand All @@ -86,16 +86,23 @@ jobs:
dotnet-version: "10.0.x"

- name: Restore
run: |
dotnet restore \
dotnet-ai/provider-agnostic-chat-gateway/ChatGatewayMinimal.csproj
run: >
dotnet restore
dotnet-ai/provider-agnostic-chat-gateway/ProviderAgnosticChatGateway.slnx

- name: Build
run: |
dotnet build \
dotnet-ai/provider-agnostic-chat-gateway/ChatGatewayMinimal.csproj \
--configuration Release \
--no-restore
run: >
dotnet build
dotnet-ai/provider-agnostic-chat-gateway/ProviderAgnosticChatGateway.slnx
--configuration Release
--no-restore

- name: Test deterministic layers
run: >
dotnet test
dotnet-ai/provider-agnostic-chat-gateway/ProviderAgnosticChatGateway.slnx
--configuration Release
--no-build

build-hybrid-search:
name: Build hybrid search RRF sample
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Each sample folder contains a focused implementation of one tutorial topic. The

| Sample | What it demonstrates | Full tutorial |
| --- | --- | --- |
| [`dotnet-ai/provider-agnostic-chat-gateway`](dotnet-ai/provider-agnostic-chat-gateway/) | One HTTP chat endpoint using Ollama and optional OpenAI providers through `Microsoft.Extensions.AI.IChatClient` | [Build a switchable multi-provider AI gateway with IChatClient](https://www.dotnet-guide.com/tutorials/dotnet-ai/provider-agnostic-chat-gateway/) |
| [`dotnet-ai/provider-agnostic-chat-gateway`](dotnet-ai/provider-agnostic-chat-gateway/) | .NET 10 `Microsoft.Extensions.AI` gateway with allow-listed `IChatClient` providers, bounded conversation state, SSE streaming, safe function calling, and deterministic tests | [Microsoft.Extensions.AI Tutorial: Build a Multi-Provider IChatClient Gateway](https://www.dotnet-guide.com/tutorials/dotnet-ai/provider-agnostic-chat-gateway/) |
| [`dotnet-ai/hybrid-search-ef-core-pgvector`](dotnet-ai/hybrid-search-ef-core-pgvector/) | Minimal Reciprocal Rank Fusion demo combining pre-ranked keyword and vector results | [Hybrid Search in .NET with EF Core 10 and pgvector](https://www.dotnet-guide.com/tutorials/dotnet-ai/hybrid-search-ef-core-pgvector/) |
| [`dotnet-ai/agent-framework-incident-triage`](dotnet-ai/agent-framework-incident-triage/) | Evidence-first Microsoft Agent Framework sample with read-only tools, deterministic incident evidence, `AgentSession` reuse, and correlation-vs-causation boundaries | [Microsoft Agent Framework Tutorial in C#: Build a Tool-Using AI Agent](https://www.dotnet-guide.com/tutorials/dotnet-ai/agent-framework-incident-triage/) |
| [`dotnet-aspire/orchestrate-distributed-system`](dotnet-aspire/orchestrate-distributed-system/) | Minimal Aspire AppHost coordinating a web project and API with service discovery and startup ordering | [Aspire in .NET: Orchestrate, Run, and Deploy a Distributed System from One App Host](https://www.dotnet-guide.com/tutorials/dotnet-aspire/orchestrate-distributed-system/) |
Expand Down Expand Up @@ -57,9 +57,10 @@ Each sample folder contains a focused implementation of one tutorial topic. The

```powershell
cd dotnet-ai\provider-agnostic-chat-gateway
dotnet restore
dotnet run --urls http://localhost:5123
````
dotnet restore ProviderAgnosticChatGateway.slnx
dotnet test ProviderAgnosticChatGateway.slnx --configuration Release
dotnet run --project .\src\ProviderAgnosticChatGateway\ProviderAgnosticChatGateway.csproj
```

### Hybrid search RRF sample

Expand All @@ -83,9 +84,13 @@ dotnet test
tutorials/
|-- dotnet-ai/
| |-- provider-agnostic-chat-gateway/
| | |-- ChatGatewayMinimal.csproj
| | |-- Program.cs
| | `-- README.md
| | |-- ProviderAgnosticChatGateway.slnx
| | |-- README.md
| | |-- global.json
| | |-- verified-environment.json
| | |-- docs/
| | |-- src/
| | `-- tests/
| `-- hybrid-search-ef-core-pgvector/
| |-- HybridSearchMinimal.csproj
| |-- Program.cs
Expand Down
11 changes: 11 additions & 0 deletions dotnet-ai/provider-agnostic-chat-gateway/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**/bin/
**/obj/
.vs/
.vscode/
.idea/
*.user
*.suo
.env
.env.*
secrets.json
_automation-backup/
126 changes: 0 additions & 126 deletions dotnet-ai/provider-agnostic-chat-gateway/Program.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Solution>
<Folder Name="/src/">
<Project Path="src/ProviderAgnosticChatGateway/ProviderAgnosticChatGateway.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/ProviderAgnosticChatGateway.Tests/ProviderAgnosticChatGateway.Tests.csproj" />
</Folder>
</Solution>
Loading
Loading