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