mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
7967983755
* Remove Actor-based runtime * Fix formatting * Remove cosmos db vestigials --------- Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com>
20 lines
791 B
C#
20 lines
791 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using AgentWebChat.AppHost;
|
|
|
|
var builder = DistributedApplication.CreateBuilder(args);
|
|
|
|
var azOpenAiResource = builder.AddParameterFromConfiguration("AzureOpenAIName", "AzureOpenAI:Name");
|
|
var azOpenAiResourceGroup = builder.AddParameterFromConfiguration("AzureOpenAIResourceGroup", "AzureOpenAI:ResourceGroup");
|
|
var chatModel = builder.AddAIModel("chat-model").AsAzureOpenAI("gpt-4o", o => o.AsExisting(azOpenAiResource, azOpenAiResourceGroup));
|
|
|
|
var agentHost = builder.AddProject<Projects.AgentWebChat_AgentHost>("agenthost")
|
|
.WithReference(chatModel);
|
|
|
|
builder.AddProject<Projects.AgentWebChat_Web>("webfrontend")
|
|
.WithExternalHttpEndpoints()
|
|
.WithReference(agentHost)
|
|
.WaitFor(agentHost);
|
|
|
|
builder.Build().Run();
|