45 writes to AuthorName
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
631AuthorName = 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)
32new(ChatRole.Assistant, ", ") { AuthorName = "Someone", AdditionalProperties = new() { ["a"] = "b" } }, 133new(ChatRole.Assistant, "Hello ") { AuthorName = "Alice" }, 134new(null, "from ") { AuthorName = "Alice" }, 138new(null, "Hi ") { AuthorName = "Bob" }, 139new(null, "from ") { AuthorName = "Bob" }, 143new(ChatRole.Assistant, "Greetings ") { AuthorName = "Charlie" }, 144new(null, "from Charlie!") { AuthorName = "Charlie" }, 147new(null, "Alice again!") { AuthorName = "Alice" }, 150new(null, " Still Alice.") { AuthorName = "" }, 186new(ChatRole.Assistant, "A") { MessageId = "1", AuthorName = "Alice" }, 187new(null, "B") { MessageId = "1", AuthorName = "Alice" }, 190new(null, "C") { MessageId = "1", AuthorName = "Bob" }, 193new(null, "D") { MessageId = "2", AuthorName = "Bob" }, 194new(null, "E") { MessageId = "2", AuthorName = "Bob" }, 197new(ChatRole.User, "F") { MessageId = "2", AuthorName = "Bob" }, 200new(ChatRole.Tool, "G") { MessageId = "3", AuthorName = "Charlie" }, 201new(null, "H") { MessageId = "3", AuthorName = "Charlie" }, 245new(ChatRole.Assistant, "Hello") { AuthorName = "Assistant" }, 248new(null, " world") { AuthorName = "" }, 254new(null, " How") { AuthorName = "" }, 255new(null, " are") { AuthorName = "" }, 258new(null, " you?") { AuthorName = null }, 284new(null, " I'm Bob") { MessageId = "1", AuthorName = "Bob" }, 285new(null, " speaking") { MessageId = "1", AuthorName = "Bob" }, 288new(null, "Now Alice") { MessageId = "1", AuthorName = "Alice" }, 456new(null, "Hi! ") { CreatedAt = new DateTimeOffset(2023, 1, 1, 10, 0, 0, TimeSpan.Zero), AuthorName = "Assistant" }, 457new(ChatRole.Assistant, "Hello") { MessageId = "msg1", CreatedAt = new DateTimeOffset(2024, 1, 1, 10, 0, 0, TimeSpan.Zero), AuthorName = "Assistant" }, 459new(null, " AI") { MessageId = "msg1", AuthorName = "Assistant" }, // Keep same AuthorName to avoid creating new message 462new(null, "More text") { MessageId = "msg2", CreatedAt = new DateTimeOffset(2024, 1, 1, 10, 2, 0, TimeSpan.Zero), AuthorName = "Assistant" }, 465new(ChatRole.User, "How") { MessageId = "msg3", CreatedAt = new DateTimeOffset(2024, 1, 1, 11, 0, 0, TimeSpan.Zero), AuthorName = "User" }, 467new(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)
394AuthorName = "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)
420Assert.Equal("Someone", item.AuthorName);