Change RawRepresentation for AgentRunResponse/Update to ChatResponse/Update instead of RawRepresentation from that. (#278)

This commit is contained in:
westey
2025-07-30 11:12:04 +01:00
committed by GitHub
Unverified
parent 1ed89d4db8
commit 5f10bdaecd
4 changed files with 4 additions and 4 deletions
@@ -54,7 +54,7 @@ public class AgentRunResponse
this.AdditionalProperties = response.AdditionalProperties;
this.CreatedAt = response.CreatedAt;
this.Messages = response.Messages;
this.RawRepresentation = response.RawRepresentation;
this.RawRepresentation = response;
this.ResponseId = response.ResponseId;
this.Usage = response.Usage;
}
@@ -70,7 +70,7 @@ public class AgentRunResponseUpdate
this.Contents = chatResponseUpdate.Contents;
this.CreatedAt = chatResponseUpdate.CreatedAt;
this.MessageId = chatResponseUpdate.MessageId;
this.RawRepresentation = chatResponseUpdate.RawRepresentation;
this.RawRepresentation = chatResponseUpdate;
this.ResponseId = chatResponseUpdate.ResponseId;
this.Role = chatResponseUpdate.Role;
}
@@ -61,7 +61,7 @@ public class AgentRunResponseTests
Assert.Equal(chatResponse.CreatedAt, response.CreatedAt);
Assert.Same(chatResponse.Messages, response.Messages);
Assert.Equal(chatResponse.ResponseId, response.ResponseId);
Assert.Same(chatResponse.RawRepresentation, response.RawRepresentation);
Assert.Same(chatResponse, response.RawRepresentation as ChatResponse);
Assert.Same(chatResponse.Usage, response.Usage);
}
@@ -48,7 +48,7 @@ public class AgentRunResponseUpdateTests
Assert.Same(chatResponseUpdate.Contents, response.Contents);
Assert.Equal(chatResponseUpdate.CreatedAt, response.CreatedAt);
Assert.Equal(chatResponseUpdate.MessageId, response.MessageId);
Assert.Same(chatResponseUpdate.RawRepresentation, response.RawRepresentation);
Assert.Same(chatResponseUpdate, response.RawRepresentation as ChatResponseUpdate);
Assert.Equal(chatResponseUpdate.ResponseId, response.ResponseId);
Assert.Equal(chatResponseUpdate.Role, response.Role);
}