last ...
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using xAiApi.Models;
|
||||
using xAiModels.Models.Dtos;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace xAiApi.Interfaces
|
||||
{
|
||||
public interface IXInMemoryVectorStore
|
||||
{
|
||||
int Count { get; }
|
||||
int RemoveExpired();
|
||||
Guid CreateSession(
|
||||
string ownerId = null,
|
||||
TimeSpan? ttl = null
|
||||
);
|
||||
Guid CreateSession(
|
||||
IEnumerable<XAiVectorDto> vectors,
|
||||
string ownerId = null,
|
||||
TimeSpan? ttl = null
|
||||
);
|
||||
bool Replace(
|
||||
Guid sessionId,
|
||||
IEnumerable<XAiVectorDto> vectors,
|
||||
string ownerId = null
|
||||
);
|
||||
bool Add(
|
||||
Guid sessionId,
|
||||
IEnumerable<XAiVectorDto> vectors,
|
||||
string ownerId = null
|
||||
);
|
||||
IList<XAiVectorSearchResult> Search(
|
||||
Guid sessionId,
|
||||
ReadOnlyMemory<float> queryEmbedding,
|
||||
int topK = 5,
|
||||
float minScore = 0f,
|
||||
string ownerId = null
|
||||
);
|
||||
bool TryGet(
|
||||
Guid sessionId,
|
||||
out XAiDocumentSession session,
|
||||
string ownerId = null
|
||||
);
|
||||
bool Remove(
|
||||
Guid sessionId,
|
||||
string ownerId = null
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user