last ...
This commit is contained in:
@@ -50,11 +50,38 @@ namespace xAiApi.Interfaces
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Ask a Question using Provided Context Chunks (RAG) without Persisting ...
|
||||
/// </summary>
|
||||
/// <param name="prompt"></param>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> AskWithContextAsync(
|
||||
string prompt,
|
||||
IEnumerable<XAiVectorSearchResult> context,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Ask a Question using Provided Context Chunks (RAG) and Stream Response ...
|
||||
/// </summary>
|
||||
/// <param name="prompt"></param>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
IAsyncEnumerable<string> AskWithContextAsEnumerable(
|
||||
string prompt,
|
||||
IEnumerable<XAiVectorSearchResult> context,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Ask a Question as Prompt and Retrieve Response ...
|
||||
/// </summary>
|
||||
/// <param name="prompt"></param>
|
||||
/// <param name="ownerId"></param>
|
||||
/// <param name="topK"></param>
|
||||
/// <param name="minScore"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="conversationId"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
@@ -64,9 +91,10 @@ namespace xAiApi.Interfaces
|
||||
/// <returns></returns>
|
||||
Task<XAiMessageDto> AskAsync(
|
||||
string prompt,
|
||||
string ownerId,
|
||||
Guid? projectId,
|
||||
Guid? conversationId,
|
||||
int? topK = null,
|
||||
float? minScore = null,
|
||||
Guid? projectId = null,
|
||||
Guid? conversationId = null,
|
||||
string connectionId = null,
|
||||
IFormFileCollection files = null,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
@@ -77,20 +105,24 @@ namespace xAiApi.Interfaces
|
||||
/// Ask a Question as Prompt and Retrieve Response as Async Enumerable ...
|
||||
/// </summary>
|
||||
/// <param name="prompt"></param>
|
||||
/// <param name="ownerId"></param>
|
||||
/// <param name="topK"></param>
|
||||
/// <param name="minScore"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="conversationId"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="files"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
IAsyncEnumerable<XAiResonseMessage> AskAsEnumerable(
|
||||
string prompt,
|
||||
string ownerId,
|
||||
Guid projectId,
|
||||
Guid conversationId,
|
||||
int? topK = null,
|
||||
float? minScore = null,
|
||||
Guid? projectId = null,
|
||||
Guid? conversationId = null,
|
||||
string connectionId = null,
|
||||
IFormFileCollection files = null,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user