Fix CreateMessageRule.Role to be of type Role (#264)

This commit is contained in:
Stephen Toub 2025-04-10 10:51:41 -04:00 • committed by GitHub
commit 45dcfe07ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 13 deletions

View file

@ -219,7 +219,7 @@ public class SseServerIntegrationTests : LoggedTest, IClassFixture<SseServerInte
return new CreateMessageResult
{
Model = "test-model",
Role = "assistant",
Role = Role.Assistant,
Content = new Content
{
Type = "text",

View file

@ -72,7 +72,7 @@ public class TestServerTransport : ITransport
await WriteMessageAsync(new JsonRpcResponse
{
Id = request.Id,
Result = JsonSerializer.SerializeToNode(new CreateMessageResult { Content = new(), Model = "model", Role = "role" }),
Result = JsonSerializer.SerializeToNode(new CreateMessageResult { Content = new(), Model = "model", Role = Role.Assistant }),
}, cancellationToken);
}