45 writes to AuthorName
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
634AuthorName = message.AuthorName,
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\ChatResponse.cs (1)
150AuthorName = message.AuthorName,
ChatCompletion\ChatResponseUpdate.cs (1)
72AuthorName = AuthorName,
Microsoft.Extensions.AI.Abstractions.Tests (36)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (31)
33new(ChatRole.Assistant, ", ") { AuthorName = "Someone", AdditionalProperties = new() { ["a"] = "b" } }, 134new(ChatRole.Assistant, "Hello ") { AuthorName = "Alice" }, 135new(null, "from ") { AuthorName = "Alice" }, 139new(null, "Hi ") { AuthorName = "Bob" }, 140new(null, "from ") { AuthorName = "Bob" }, 144new(ChatRole.Assistant, "Greetings ") { AuthorName = "Charlie" }, 145new(null, "from Charlie!") { AuthorName = "Charlie" }, 148new(null, "Alice again!") { AuthorName = "Alice" }, 151new(null, " Still Alice.") { AuthorName = "" }, 187new(ChatRole.Assistant, "A") { MessageId = "1", AuthorName = "Alice" }, 188new(null, "B") { MessageId = "1", AuthorName = "Alice" }, 191new(null, "C") { MessageId = "1", AuthorName = "Bob" }, 194new(null, "D") { MessageId = "2", AuthorName = "Bob" }, 195new(null, "E") { MessageId = "2", AuthorName = "Bob" }, 198new(ChatRole.User, "F") { MessageId = "2", AuthorName = "Bob" }, 201new(ChatRole.Tool, "G") { MessageId = "3", AuthorName = "Charlie" }, 202new(null, "H") { MessageId = "3", AuthorName = "Charlie" }, 246new(ChatRole.Assistant, "Hello") { AuthorName = "Assistant" }, 249new(null, " world") { AuthorName = "" }, 255new(null, " How") { AuthorName = "" }, 256new(null, " are") { AuthorName = "" }, 259new(null, " you?") { AuthorName = null }, 285new(null, " I'm Bob") { MessageId = "1", AuthorName = "Bob" }, 286new(null, " speaking") { MessageId = "1", AuthorName = "Bob" }, 289new(null, "Now Alice") { MessageId = "1", AuthorName = "Alice" }, 457new(null, "Hi! ") { CreatedAt = new DateTimeOffset(2023, 1, 1, 10, 0, 0, TimeSpan.Zero), AuthorName = "Assistant" }, 458new(ChatRole.Assistant, "Hello") { MessageId = "msg1", CreatedAt = new DateTimeOffset(2024, 1, 1, 10, 0, 0, TimeSpan.Zero), AuthorName = "Assistant" }, 460new(null, " AI") { MessageId = "msg1", AuthorName = "Assistant" }, // Keep same AuthorName to avoid creating new message 463new(null, "More text") { MessageId = "msg2", CreatedAt = new DateTimeOffset(2024, 1, 1, 10, 2, 0, TimeSpan.Zero), AuthorName = "Assistant" }, 466new(ChatRole.User, "How") { MessageId = "msg3", CreatedAt = new DateTimeOffset(2024, 1, 1, 11, 0, 0, TimeSpan.Zero), AuthorName = "User" }, 468new(null, " you?") { MessageId = "msg3", AuthorName = "User" }, // Keep same AuthorName
ChatCompletion\ChatResponseUpdateTests.cs (5)
36update.AuthorName = "author"; 117AuthorName = "author", 183AuthorName = "author", 275AuthorName = "original_author", 283clone.AuthorName = "modified_author";
Microsoft.Extensions.AI.OpenAI (5)
OpenAIAssistantsChatClient.cs (5)
166AuthorName = _assistantId, 211AuthorName = _assistantId, 242AuthorName = _assistantId, 254AuthorName = _assistantId, 303AuthorName = _assistantId,
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\DistributedCachingChatClientTest.cs (1)
395AuthorName = "Someone",
17 references to AuthorName
Aspire.Dashboard (1)
Model\Assistant\AIHelpers.cs (1)
512AuthorName = update.AuthorName,
Microsoft.Extensions.AI.Abstractions (5)
ChatCompletion\ChatResponseExtensions.cs (4)
92AuthorName = update.AuthorName, 494NotEmptyOrEqual(update.AuthorName, lastMessage.AuthorName) || 516if (update.AuthorName is not null) 518message.AuthorName = update.AuthorName;
ChatCompletion\ChatResponseUpdate.cs (1)
72AuthorName = AuthorName,
Microsoft.Extensions.AI.Abstractions.Tests (10)
ChatCompletion\ChatResponseUpdateTests.cs (10)
17Assert.Null(update.AuthorName); 35Assert.Null(update.AuthorName); 37Assert.Equal("author", update.AuthorName); 157Assert.Equal("author", result.AuthorName); 202Assert.Equal(original.AuthorName, clone.AuthorName); 235Assert.Null(clone.AuthorName); 256Assert.Null(clone.AuthorName); 289Assert.Equal("original_author", original.AuthorName); 295Assert.Equal("modified_author", clone.AuthorName);
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\DistributedCachingChatClientTest.cs (1)
421Assert.Equal("Someone", item.AuthorName);