|
13 | 13 | builder.Services.AddRazorComponents()
|
14 | 14 | .AddInteractiveServerComponents();
|
15 | 15 |
|
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"; |
19 | 22 |
|
20 | 23 | var azureClient = new AzureOpenAIClient(
|
21 | 24 | new Uri(azureOpenAIEndpoint),
|
22 | 25 | new ApiKeyCredential(azureOpenAIKey));
|
23 | 26 |
|
24 | 27 | builder.Services.AddDevExpressBlazor();
|
25 |
| -builder.Services.AddChatClient(config => |
| 28 | +builder.Services.AddChatClient(config => |
26 | 29 | config.Use(azureClient.AsChatClient(deploymentName))
|
27 | 30 | );
|
28 | 31 | builder.Services.AddDevExpressServerSideBlazorReportViewer();
|
29 | 32 | builder.Services.AddDevExpressAI((config) => {
|
30 |
| - config.RegisterOpenAIAssistants(azureClient, deploymentName); |
| 33 | + config.RegisterOpenAIAssistants(azureClient, deploymentName); |
31 | 34 | });
|
32 | 35 | builder.Services.AddSingleton<IDemoReportSource, DemoReportSource>();
|
33 | 36 | builder.Services.AddDbContextFactory<IssuesContext>(opt => {
|
|
38 | 41 | var app = builder.Build();
|
39 | 42 |
|
40 | 43 | // Configure the HTTP request pipeline.
|
41 |
| -if(!app.Environment.IsDevelopment()) { |
| 44 | +if (!app.Environment.IsDevelopment()) { |
42 | 45 | app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
43 | 46 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
44 | 47 | app.UseHsts();
|
|
0 commit comments