Description
from CosmosChatHistoryProvider.cs
/// <summary>
/// Gets or sets the Time-To-Live (TTL) in seconds for messages.
/// Default is 86400 seconds (24 hours). Set to null to disable TTL.
/// </summary>
public int? MessageTtlSeconds { get; set; } = 86400;
"Set to null to disable TTL." - does not work - ttl = null not allowed
Cosmos db exception -
The input ttl 'null' is invalid. Ensure to provide a nonzero positive integer less than or equal to '2147483647', or '-1' which means never expire."
https://learn.microsoft.com/en-us/cosmos-db/time-to-live
I think your fogot
[JsonProperty ( NullValueHandling = NullValueHandling.Ignore )]
for
[Newtonsoft.Json.JsonProperty("ttl")]
public int? Ttl { get; set; }
Code Sample
Error Messages / Stack Traces
Package Versions
"Microsoft.Agents.AI.CosmosNoSql" Version="1.13.0-preview.260703.1"
.NET Version
NET 8.0
Additional Context
No response
Description
from CosmosChatHistoryProvider.cs
"Set to null to disable TTL." - does not work - ttl = null not allowed
Cosmos db exception -
The input ttl 'null' is invalid. Ensure to provide a nonzero positive integer less than or equal to '2147483647', or '-1' which means never expire."
https://learn.microsoft.com/en-us/cosmos-db/time-to-live
I think your fogot
[JsonProperty ( NullValueHandling = NullValueHandling.Ignore )]
for
[Newtonsoft.Json.JsonProperty("ttl")]
public int? Ttl { get; set; }
Code Sample
Error Messages / Stack Traces
Package Versions
"Microsoft.Agents.AI.CosmosNoSql" Version="1.13.0-preview.260703.1"
.NET Version
NET 8.0
Additional Context
No response