last ...
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using xAiModels.Models.Dtos;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace xAiApi.Models
|
||||
{
|
||||
public class XAiDocumentSession
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public TimeSpan Ttl { get; set; }
|
||||
public string OwnerId { get; set; }
|
||||
public DateTime CreatedAtUtc { get; set; }
|
||||
public DateTime LastAccessAtUtc { get; set; }
|
||||
internal object SyncRoot { get; } = new object();
|
||||
public IList<XAiVectorDto> Vectors { get; set; } = new List<XAiVectorDto>();
|
||||
public bool IsExpired(DateTime utcNow) { return utcNow - LastAccessAtUtc >= Ttl; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user