Skip to content

Commit 2e8a2f0

Browse files
committed
update readme
1 parent f442fef commit 2e8a2f0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

CS/DevExpress.AI.Samples.Blazor/Program.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,24 @@
1313
builder.Services.AddRazorComponents()
1414
.AddInteractiveServerComponents();
1515

16-
string azureOpenAIEndpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT");
17-
string azureOpenAIKey = Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY");
18-
string deploymentName = "gpt4o-big";
16+
//string azureOpenAIEndpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT");
17+
//string azureOpenAIKey = Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY");
18+
//string deploymentName = "gpt4o-big";
19+
string azureOpenAIEndpoint = "https://dtestopenaiinstance1.openai.azure.com/";
20+
string azureOpenAIKey = "95ce23eba9e34d3fb535e54fd2561dfa";
21+
string deploymentName = "gpt4o";
1922

2023
var azureClient = new AzureOpenAIClient(
2124
new Uri(azureOpenAIEndpoint),
2225
new ApiKeyCredential(azureOpenAIKey));
2326

2427
builder.Services.AddDevExpressBlazor();
25-
builder.Services.AddChatClient(config =>
28+
builder.Services.AddChatClient(config =>
2629
config.Use(azureClient.AsChatClient(deploymentName))
2730
);
2831
builder.Services.AddDevExpressServerSideBlazorReportViewer();
2932
builder.Services.AddDevExpressAI((config) => {
30-
config.RegisterOpenAIAssistants(azureClient, deploymentName);
33+
config.RegisterOpenAIAssistants(azureClient, deploymentName);
3134
});
3235
builder.Services.AddSingleton<IDemoReportSource, DemoReportSource>();
3336
builder.Services.AddDbContextFactory<IssuesContext>(opt => {
@@ -38,7 +41,7 @@
3841
var app = builder.Build();
3942

4043
// Configure the HTTP request pipeline.
41-
if(!app.Environment.IsDevelopment()) {
44+
if (!app.Environment.IsDevelopment()) {
4245
app.UseExceptionHandler("/Error", createScopeForErrors: true);
4346
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
4447
app.UseHsts();

0 commit comments

Comments
 (0)