mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-10 16:47:22 +00:00
34 lines
1.5 KiB
C#
34 lines
1.5 KiB
C#
using AIStudio.Chat;
|
|
using AIStudio.Provider;
|
|
|
|
namespace AIStudio.Tools.RAG;
|
|
|
|
public interface IAugmentationProcess
|
|
{
|
|
/// <summary>
|
|
/// How is the augmentation process called?
|
|
/// </summary>
|
|
public string TechnicalName { get; }
|
|
|
|
/// <summary>
|
|
/// How is the augmentation process called in the UI?
|
|
/// </summary>
|
|
public string UIName { get; }
|
|
|
|
/// <summary>
|
|
/// How works the augmentation process?
|
|
/// </summary>
|
|
public string Description { get; }
|
|
|
|
/// <summary>
|
|
/// Starts the augmentation process.
|
|
/// </summary>
|
|
/// <param name="provider">The LLM provider. Gets used, e.g., for automatic retrieval context validation.</param>
|
|
/// <param name="chatModel">The model which answers. Its context window decides how much room the retrieval contexts get.</param>
|
|
/// <param name="lastUserPrompt">The last user prompt that was issued by the user.</param>
|
|
/// <param name="chatThread">The chat thread.</param>
|
|
/// <param name="retrievalContextsByDataSource">The retrieval contexts that were issued by the retrieval process, per data source, each in the order of their rank.</param>
|
|
/// <param name="token">The cancellation token.</param>
|
|
/// <returns>The altered chat thread, together with the retrieval contexts handed to the AI.</returns>
|
|
public Task<AugmentationResult> ProcessAsync(IProvider provider, Model chatModel, IContent lastUserPrompt, ChatThread chatThread, IReadOnlyList<IReadOnlyList<IRetrievalContext>> retrievalContextsByDataSource, CancellationToken token = default);
|
|
} |