Skip to content

Integration for Azure.AI.projects #7819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 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
64 changes: 64 additions & 0 deletions Aspire.sln
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.MongoDB.Driver.v3.Te
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stress.Empty", "playground\Stress\Stress.Empty\Stress.Empty.csproj", "{6C4B55AD-5D98-452D-B71D-CAF628E822B0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Azure.AI.Projects", "src\Components\Aspire.Azure.AI.Projects\Aspire.Azure.AI.Projects.csproj", "{05AC71CD-C263-4E0C-BF59-9B2537473DF6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AIProjects.AppHost", "playground\AzureAIProjects\AIProjects.AppHost\AIProjects.AppHost.csproj", "{94DF499C-E97D-4943-8FB7-FF96333D09A6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AzureAIProjects", "AzureAIProjects", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AIProjects.Web", "playground\AzureAIProjects\AIProjects.Web\AIProjects.Web.csproj", "{22724A46-2A09-82CF-75BB-B020CC77004B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Hosting.Seq.Tests", "tests\Aspire.Hosting.Seq.Tests\Aspire.Hosting.Seq.Tests.csproj", "{CA86754E-3AED-4937-BE7B-14EF9929E245}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Cli", "src\Aspire.Cli\Aspire.Cli.csproj", "{F2B3404B-2BB3-4C75-9A3D-978A8562DCF7}"
Expand Down Expand Up @@ -665,6 +673,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Hosting.Azure.ContainerRegistry", "src\Aspire.Hosting.Azure.ContainerRegistry\Aspire.Hosting.Azure.ContainerRegistry.csproj", "{6CBA29C8-FF78-4ABC-BEFA-2A53CB4DB2A3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Azure.AI.Projects.Tests", "tests\Aspire.Azure.AI.Projects.Tests\Aspire.Azure.AI.Projects.Tests.csproj", "{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Hosting.Azure.AppService", "src\Aspire.Hosting.Azure.AppService\Aspire.Hosting.Azure.AppService.csproj", "{5DDF8E89-FBBD-4A6F-BF32-7D2140724941}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AzureAppService", "AzureAppService", "{2D9974C2-3AB2-FBFD-5156-080508BB7449}"
Expand Down Expand Up @@ -3683,6 +3693,42 @@ Global
{6C4B55AD-5D98-452D-B71D-CAF628E822B0}.Release|x64.Build.0 = Release|Any CPU
{6C4B55AD-5D98-452D-B71D-CAF628E822B0}.Release|x86.ActiveCfg = Release|Any CPU
{6C4B55AD-5D98-452D-B71D-CAF628E822B0}.Release|x86.Build.0 = Release|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Debug|x64.ActiveCfg = Debug|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Debug|x64.Build.0 = Debug|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Debug|x86.ActiveCfg = Debug|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Debug|x86.Build.0 = Debug|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Release|Any CPU.Build.0 = Release|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Release|x64.ActiveCfg = Release|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Release|x64.Build.0 = Release|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Release|x86.ActiveCfg = Release|Any CPU
{05AC71CD-C263-4E0C-BF59-9B2537473DF6}.Release|x86.Build.0 = Release|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Debug|x64.ActiveCfg = Debug|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Debug|x64.Build.0 = Debug|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Debug|x86.ActiveCfg = Debug|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Debug|x86.Build.0 = Debug|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Release|Any CPU.Build.0 = Release|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Release|x64.ActiveCfg = Release|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Release|x64.Build.0 = Release|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Release|x86.ActiveCfg = Release|Any CPU
{94DF499C-E97D-4943-8FB7-FF96333D09A6}.Release|x86.Build.0 = Release|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Debug|x64.ActiveCfg = Debug|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Debug|x64.Build.0 = Debug|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Debug|x86.ActiveCfg = Debug|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Debug|x86.Build.0 = Debug|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Release|Any CPU.Build.0 = Release|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Release|x64.ActiveCfg = Release|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Release|x64.Build.0 = Release|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Release|x86.ActiveCfg = Release|Any CPU
{22724A46-2A09-82CF-75BB-B020CC77004B}.Release|x86.Build.0 = Release|Any CPU
{CA86754E-3AED-4937-BE7B-14EF9929E245}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA86754E-3AED-4937-BE7B-14EF9929E245}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA86754E-3AED-4937-BE7B-14EF9929E245}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -3899,6 +3945,18 @@ Global
{6CBA29C8-FF78-4ABC-BEFA-2A53CB4DB2A3}.Release|x64.Build.0 = Release|Any CPU
{6CBA29C8-FF78-4ABC-BEFA-2A53CB4DB2A3}.Release|x86.ActiveCfg = Release|Any CPU
{6CBA29C8-FF78-4ABC-BEFA-2A53CB4DB2A3}.Release|x86.Build.0 = Release|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Debug|x64.ActiveCfg = Debug|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Debug|x64.Build.0 = Debug|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Debug|x86.ActiveCfg = Debug|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Debug|x86.Build.0 = Debug|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Release|Any CPU.Build.0 = Release|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Release|x64.ActiveCfg = Release|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Release|x64.Build.0 = Release|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Release|x86.ActiveCfg = Release|Any CPU
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C}.Release|x86.Build.0 = Release|Any CPU
{5DDF8E89-FBBD-4A6F-BF32-7D2140724941}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5DDF8E89-FBBD-4A6F-BF32-7D2140724941}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5DDF8E89-FBBD-4A6F-BF32-7D2140724941}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -4233,6 +4291,10 @@ Global
{FD53B608-138D-8FB1-AA57-9B8CD42CF13E} = {27381127-6C45-4B4C-8F18-41FF48DFE4B2}
{223AF8EB-3A4E-E778-4EBD-6E4876C308B6} = {C424395C-1235-41A4-BF55-07880A04368C}
{6C4B55AD-5D98-452D-B71D-CAF628E822B0} = {CFDA7AC5-251C-43C7-B334-71AE8040A147}
{05AC71CD-C263-4E0C-BF59-9B2537473DF6} = {27381127-6C45-4B4C-8F18-41FF48DFE4B2}
{94DF499C-E97D-4943-8FB7-FF96333D09A6} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {D173887B-AF42-4576-B9C1-96B9E9B3D9C0}
{22724A46-2A09-82CF-75BB-B020CC77004B} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{CA86754E-3AED-4937-BE7B-14EF9929E245} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{F2B3404B-2BB3-4C75-9A3D-978A8562DCF7} = {B80354C7-BE58-43F6-8928-9F3A74AB7F47}
{D9083768-05BE-7877-D613-C96C7BC1044F} = {4981B3A5-4AFD-4191-BF7D-8692D9783D60}
Expand All @@ -4252,6 +4314,8 @@ Global
{192747A2-9338-DECF-5C8C-28EB8E13829B} = {27381127-6C45-4B4C-8F18-41FF48DFE4B2}
{8FCA0CFA-7823-6A2F-342A-107A994915B0} = {C424395C-1235-41A4-BF55-07880A04368C}
{30950CEB-2232-F9FC-04FF-ADDCB8AC30A7} = {C424395C-1235-41A4-BF55-07880A04368C}
{6CBA29C8-FF78-4ABC-BEFA-2A53CB4DB2A3} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{0F40DD16-CCB2-463E-BF0E-B75AD5D7166C} = {C424395C-1235-41A4-BF55-07880A04368C}
{6CBA29C8-FF78-4ABC-BEFA-2A53CB4DB2A3} = {77CFE74A-32EE-400C-8930-5025E8555256}
{5DDF8E89-FBBD-4A6F-BF32-7D2140724941} = {77CFE74A-32EE-400C-8930-5025E8555256}
{2D9974C2-3AB2-FBFD-5156-080508BB7449} = {D173887B-AF42-4576-B9C1-96B9E9B3D9C0}
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<ItemGroup>
<!-- Azure SDK for .NET dependencies -->
<PackageVersion Include="Azure.AI.OpenAI" Version="2.2.0-beta.4" />
<PackageVersion Include="Azure.AI.Projects" Version="1.0.0-beta.8" />
<PackageVersion Include="Azure.Data.Tables" Version="12.10.0" />
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.4.0" />
<PackageVersion Include="Azure.Messaging.EventHubs" Version="5.11.6" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>7de7a29c-41c3-4c7a-b757-97ca6f9e7e77</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\KnownResourceNames.cs" Link="KnownResourceNames.cs" />
</ItemGroup>

<ItemGroup>
<AspireProjectOrPackageReference Include="Aspire.Hosting.AppHost" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AIProjects.Web\AIProjects.Web.csproj" />
</ItemGroup>

</Project>
20 changes: 20 additions & 0 deletions playground/AzureAIProjects/AIProjects.AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

var builder = DistributedApplication.CreateBuilder(args);

var aiProjectsConnection = builder.AddConnectionString("aiprojects");

builder.AddProject<Projects.AIProjects_Web>("web")
.WithReference(aiProjectsConnection);

#if !SKIP_DASHBOARD_REFERENCE
// This project is only added in playground projects to support development/debugging
// of the dashboard. It is not required in end developer code. Comment out this code
// or build with `/p:SkipDashboardReference=true`, to test end developer
// dashboard launch experience, Refer to Directory.Build.props for the path to
// the dashboard binary (defaults to the Aspire.Dashboard bin output in the
// artifacts dir).
builder.AddProject<Projects.Aspire_Dashboard>(KnownResourceNames.AspireDashboard);
#endif
builder.Build().Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17216;http://localhost:15114",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21185",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22045"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15114",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19007",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20281"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}
14 changes: 14 additions & 0 deletions playground/AzureAIProjects/AIProjects.Web/AIProjects.Web.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<AspireProjectOrPackageReference Include="Aspire.Azure.AI.Projects" />
<ProjectReference Include="..\..\Playground.ServiceDefaults\Playground.ServiceDefaults.csproj" />
</ItemGroup>

</Project>
24 changes: 24 additions & 0 deletions playground/AzureAIProjects/AIProjects.Web/Components/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="AIProjects.Web.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet @rendermode="@renderMode" />
</head>

<body>
<Routes @rendermode="@renderMode" />
<script src="_framework/blazor.web.js"></script>
</body>

</html>

@code {
IComponentRenderMode renderMode = new InteractiveServerRenderMode(prerender: false);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@inherits LayoutComponentBase

<div class="page">
<div class="sidebar">
<NavMenu />
</div>

<main>
<div class="top-row px-4">
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
</div>

<article class="content px-4">
@Body
</article>
</main>
</div>

<div id="blazor-error-ui" data-nosnippet>
An unhandled error has occurred.
<a href="." class="reload">Reload</a>
<span class="dismiss">🗙</span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}

main {
flex: 1;
}

.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
}

.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}

.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}

.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}

@media (max-width: 640.98px) {
.top-row {
justify-content: space-between;
}

.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}

@media (min-width: 641px) {
.page {
flex-direction: row;
}

.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}

.top-row {
position: sticky;
top: 0;
z-index: 1;
}

.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}

.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}

#blazor-error-ui {
color-scheme: light only;
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
box-sizing: border-box;
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}

#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">AIProjects.Web</a>
</div>
</div>

<input type="checkbox" title="Navigation menu" class="navbar-toggler" />

<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
<nav class="nav flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
</NavLink>
</div>
</nav>
</div>

Loading
Loading