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