review and fix changelogs overview, uncomplete ...
This commit is contained in:
@@ -4,6 +4,7 @@ using xAiModels.Models.Dtos;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Collections.Generic;
|
||||
using xIdentityModels.Models;
|
||||
|
||||
namespace xAiApi.Interfaces
|
||||
{
|
||||
@@ -14,16 +15,21 @@ namespace xAiApi.Interfaces
|
||||
public interface IXAiRAGService
|
||||
{
|
||||
/// <summary>
|
||||
/// Ingest Files into Owner's Knowledge Base ...
|
||||
/// Ingest Files into Owner's Knowledge Base:
|
||||
/// Extract -> Chunk -> Embed -> Store (XAiVector) ...
|
||||
/// </summary>
|
||||
/// <param name="files"></param>
|
||||
/// <param name="ownerId"></param>
|
||||
/// <param name="replaceExisting">Remove Previously Stored Vectors of Same File before Store</param>
|
||||
/// <param name="knowledgeType"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="replaceExisting"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XAiKnowledgeIngestResult> IngestAsync(
|
||||
IFormFileCollection files,
|
||||
string ownerId,
|
||||
string knowledgeType = null,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null,
|
||||
bool replaceExisting = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
@@ -32,7 +38,7 @@ namespace xAiApi.Interfaces
|
||||
/// Embed Prompt and Retrieve Relevant Chunks from Owner's Knowledge Base ...
|
||||
/// </summary>
|
||||
/// <param name="prompt"></param>
|
||||
/// <param name="ownerId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="topK"></param>
|
||||
/// <param name="minScore"></param>
|
||||
/// <param name="fileName">Optional: Restrict to a Specific File</param>
|
||||
@@ -40,7 +46,7 @@ namespace xAiApi.Interfaces
|
||||
/// <returns></returns>
|
||||
Task<IList<XAiVectorSearchResult>> RetrieveAsync(
|
||||
string prompt,
|
||||
string ownerId,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
int? topK = null,
|
||||
float? minScore = null,
|
||||
string fileName = null,
|
||||
@@ -51,12 +57,12 @@ namespace xAiApi.Interfaces
|
||||
/// Ask a Question with RAG (Retrieve from DB then Generate) ...
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="ownerId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XAiDocumentAnswer> AskWithRAGAsync(
|
||||
XAiKnowledgeAskRequest request,
|
||||
string ownerId,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
@@ -65,12 +71,12 @@ namespace xAiApi.Interfaces
|
||||
/// First Item Carries Sources, Next Items Carry Text Deltas, Last Item has IsFinal = true ...
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="ownerId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
IAsyncEnumerable<XAiDocumentAnswerChunk> AskWithRAGAsEnumerable(
|
||||
XAiKnowledgeAskRequest request,
|
||||
string ownerId,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user