Skip to content
Merged
Show file tree
Hide file tree
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
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions BloggerAgent.Application/Dtos/TaskRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static object SendTaskRequest()
{
Id = "0195c514-2292-71e2-9378-21d11be2ad8c",
SessionId = "0195c514-2292-71e2-9378-21d11be2ad8c",
Message = new Message
Message = new TaskMessage
{
Role = "user",
Parts = new List<MessagePart>
Expand Down Expand Up @@ -53,14 +53,14 @@ public class SendTaskParams
{
public string Id { get; set; } // task id
public string SessionId { get; set; } // session id (same as id here)
public Message Message { get; set; }
public TaskMessage Message { get; set; }
public List<string>? AcceptedOutputModes { get; set; } // can be null
public bool? PushNotification { get; set; }
public int? HistoryLength { get; set; }
public Dictionary<string, object>? Metadata { get; set; }
}

public class Message
public class TaskMessage
{
public string Role { get; set; } // e.g., "user"
public List<MessagePart> Parts { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions BloggerAgent.Application/Dtos/TaskResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static object SendTaskResponse()
Status = new Status
{
State = "completed",
Message = new Message
Message = new TaskMessage
{
Role = "agent",
Parts = new List<MessagePart>
Expand Down Expand Up @@ -95,14 +95,14 @@ public class Result
public string SessionId { get; set; }
public Status Status { get; set; }
public List<Artifact> Artifacts { get; set; }
public List<Message>? History { get; set; }
public List<TaskMessage>? History { get; set; }
public Dictionary<string, object>? Metadata { get; set; }
}

public class Status
{
public string State { get; set; } // e.g., "completed"
public Message Message { get; set; }
public TaskMessage Message { get; set; }
public DateTime Timestamp { get; set; }
}

Expand Down
24 changes: 16 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,29 @@ EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["TelexBloggerAgent/TelexBloggerAgent.csproj", "TelexBloggerAgent/"]
RUN dotnet restore "./TelexBloggerAgent/TelexBloggerAgent.csproj"

# Copy csproj files and restore dependencies
COPY ["BloggerAgent.Api/BloggerAgent.Api.csproj", "BloggerAgent.Api/"]
COPY ["BloggerAgent.Domain/BloggerAgent.Domain.csproj", "BloggerAgent.Domain/"]
COPY ["BloggerAgent.Application/BloggerAgent.Application.csproj", "BloggerAgent.Application/"]
COPY ["BloggerAgent.Infrastructure/BloggerAgent.Infrastructure.csproj", "BloggerAgent.Infrastructure/"]
RUN dotnet restore "BloggerAgent.Api/BloggerAgent.Api.csproj"

# Copy the rest of the project files
COPY . .
WORKDIR "/src/TelexBloggerAgent"
RUN dotnet build "./TelexBloggerAgent.csproj" -c $BUILD_CONFIGURATION -o /app/build

# Build the project
WORKDIR "/src/BloggerAgent.Api"
RUN dotnet build "./BloggerAgent.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build

# This stage is used to publish the service project to be copied to the final stage
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./TelexBloggerAgent.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet publish "./BloggerAgent.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
# <-- Added this line to copy the JSON file
COPY TelexBloggerAgent/Integration.json /app/
ENTRYPOINT ["dotnet", "TelexBloggerAgent.dll"]

ENTRYPOINT ["dotnet", "BloggerAgent.Api.dll"]
2 changes: 1 addition & 1 deletion TelexBloggerAgent.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35707.178
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BloggerAgent.Api", "TelexBloggerAgent\BloggerAgent.Api.csproj", "{DFD6AB28-E242-4A52-979A-03874E9CAB05}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BloggerAgent.Api", "BloggerAgent.Api\BloggerAgent.Api.csproj", "{DFD6AB28-E242-4A52-979A-03874E9CAB05}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{464104A8-DB23-45DC-99C4-191841B756B7}"
ProjectSection(SolutionItems) = preProject
Expand Down
Loading