Skip to content
Merged
Changes from all 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
3 changes: 2 additions & 1 deletion 0-Agents/AgentsWebUI/Components/Pages/Agent08.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@page "/agent08"
@inject IConfiguration Configuration
@inject IWebHostEnvironment WebHostEnvironment

<PageTitle>Agent 08 – Agent Using Image</PageTitle>

Expand Down Expand Up @@ -111,7 +112,7 @@
isLoading = true;
// Load image binary from local image file at wwwroot/image.jpg

var imageData = await File.ReadAllBytesAsync("wwwroot/image.jpg");
var imageData = await File.ReadAllBytesAsync(Path.Combine(WebHostEnvironment.WebRootPath, "image.jpg"));
var imageContent = new DataContent(imageData, "image/jpeg");

var chatMessage = new Microsoft.Extensions.AI.ChatMessage(ChatRole.User,
Expand Down