2023-09-08 17:03:49 +00:00
|
|
|
using BotSharp.Abstraction.Instructs.Models;
|
|
|
|
|
|
2023-09-01 22:26:25 +00:00
|
|
|
namespace BotSharp.Abstraction.Instructs;
|
|
|
|
|
|
|
|
|
|
public interface IInstructService
|
|
|
|
|
{
|
2024-10-17 23:17:38 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Execute completion by using specified instruction or template
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="agentId">Agent (static agent)</param>
|
|
|
|
|
/// <param name="message">Additional message provided by user</param>
|
|
|
|
|
/// <param name="templateName">Template name</param>
|
|
|
|
|
/// <param name="instruction">System prompt</param>
|
|
|
|
|
/// <returns></returns>
|
2025-03-31 20:16:46 +00:00
|
|
|
Task<InstructResult> Execute(string agentId, RoleDialogModel message,
|
|
|
|
|
string? templateName = null, string? instruction = null, IEnumerable<InstructFileModel>? files = null);
|
2024-10-17 23:17:38 +00:00
|
|
|
|
2024-10-17 23:19:15 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// A generic way to execute completion by using specified instruction or template
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="T"></typeparam>
|
2024-10-18 15:00:05 +00:00
|
|
|
/// <param name="instruction">Prompt</param>
|
|
|
|
|
/// <param name="agentId">Agent id</param>
|
|
|
|
|
/// <param name="options">Llm Provider, model, message, prompt data</param>
|
2024-10-17 23:19:15 +00:00
|
|
|
/// <returns></returns>
|
2025-03-31 20:16:46 +00:00
|
|
|
Task<T?> Instruct<T>(string text, InstructOptions? options = null) where T : class;
|
2023-09-01 22:26:25 +00:00
|
|
|
}
|