This provides a web UI for AI chat playground that is able to connect virtually any LLM from any platform.
- Azure Subscription
- .NET SDK 9
- Visual Studio Code + C# DevKit
- Docker Desktop
- PowerShell 7.4+
- Azure Developer CLI
- Azure CLI + Container Apps extension
- GitHub CLI
-
Login to GitHub.
gh auth login
-
Check login status.
gh auth status
-
Fork this repository to your account and clone the forked repository to your local machine.
gh repo fork aliencube/open-chat-playground --clone --default-branch-only
-
Get the repository root.
# bash/zsh REPOSITORY_ROOT=$(git rev-parse --show-toplevel)
# PowerShell $REPOSITORY_ROOT = git rev-parse --show-toplevel
-
Add GitHub Personal Access Token (PAT) for GitHub Models connection. Make sure you should replace
{{YOUR_TOKEN}}
with your GitHub PAT.# bash/zsh dotnet user-secrets --project $REPOSITORY_ROOT/src/OpenChat.PlaygroundApp \ set GitHubModels:Token "{{YOUR_TOKEN}}"
# PowerShell dotnet user-secrets --project $REPOSITORY_ROOT/src/OpenChat.PlaygroundApp ` set GitHubModels:Token "{{YOUR_TOKEN}}"
For more details about GitHub PAT, refer to the doc, Managing your personal access tokens.
-
Run the app.
dotnet run --project $REPOSITORY_ROOT/src/OpenChat.PlaygroundApp
-
Open your web browser and navigate to
http://localhost:8080
and enter prompts.
-
Get the repository root.
# bash/zsh REPOSITORY_ROOT=$(git rev-parse --show-toplevel)
# PowerShell $REPOSITORY_ROOT = git rev-parse --show-toplevel
-
Restore packages and install playwright.
cd $REPOSITORY_ROOT && dotnet restore pwsh $REPOSITORY_ROOT/test/OpenChat.PlaygroundApp.Tests/bin/Debug/net{YOUR_VERSION}/playwright.ps1 install
-
Run the app.
dotnet run --project $REPOSITORY_ROOT/src/OpenChat.PlaygroundApp
-
Run tests.
# With LLM provider cd $REPOSITORY_ROOT && dotnet test
# Without LLM provider cd $REPOSITORY_ROOT && dotnet test --filter "Category!=LLMRequired"
-
Get the repository root.
# bash/zsh REPOSITORY_ROOT=$(git rev-parse --show-toplevel)
# PowerShell $REPOSITORY_ROOT = git rev-parse --show-toplevel
-
Make sure you are at the repository root.
cd $REPOSITORY_ROOT
-
Login to Azure.
# Login to Azure Dev CLI azd auth login # Login to Azure CLI az login
-
Check login status.
# Azure Dev CLI azd auth login --check-status # Azure CLI az account show
-
Run the following commands in order to provision and deploy the app.
azd up
NOTE: You will be asked to provide Azure subscription and location for deployment.
-
Make sure you've logged in to Azure.
azd auth login --check-status
-
Run pipeline config.
azd pipeline config
-
Answer the question below:
? Select how to authenticate the pipeline to Azure
👉Federated Service Principal (SP + OIDC)
? Would you like to commit and push your local changes to start the configured CI pipeline?
👉No
-
Once the configuration is done, push a new commit to GitHub to run the GitHub Actions workflow.