-
Notifications
You must be signed in to change notification settings - Fork 850
Open
Labels
Description
ChatResponseUpdate[] updates =
[
new()
{
Role = ChatRole.Assistant,
Contents = [new TextContent("Hi")],
CreatedAt = DateTimeOffset.UtcNow,
},
new()
{
Role = ChatRole.Assistant,
Contents = [new UsageContent { Details = new UsageDetails { TotalTokenCount = 1 } }],
CreatedAt = DateTimeOffset.UtcNow + TimeSpan.FromMinutes(11),
},
];
Console.WriteLine(updates.ToChatResponse().Messages[0].CreatedAt);In this example Messages[0].CreatedAt will get the value of the second update. I think it would make more sense to get the value of the first update as the second update is not really part of the message.
In the mistral API, I noticed significant delay between the usage update and the last text update so I would like it to be reflected in the ChatResponse.