BotSharp/src/Infrastructure/BotSharp.Abstraction/Instructs/IInstructService.cs

31 lines
1.2 KiB
C#
Raw Normal View History

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>
2025-09-30 20:03:06 +00:00
/// <param name="agentId"></param>
/// <param name="message"></param>
/// <param name="instruction"></param>
2025-09-30 20:26:32 +00:00
/// <param name="templateName"></param>
2025-09-30 20:03:06 +00:00
/// <param name="files"></param>
/// <param name="codeOptions"></param>
2024-10-17 23:17:38 +00:00
/// <returns></returns>
2025-03-31 20:16:46 +00:00
Task<InstructResult> Execute(string agentId, RoleDialogModel message,
2025-09-30 20:26:32 +00:00
string? instruction = null, string? templateName = null,
2025-09-30 20:03:06 +00:00
IEnumerable<InstructFileModel>? files = null, CodeInstructOptions? codeOptions = 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
}