2023-06-19 18:32:49 +00:00
|
|
|
namespace BotSharp.Abstraction.MLTasks;
|
|
|
|
|
|
|
|
|
|
public interface IChatCompletion
|
|
|
|
|
{
|
2023-09-19 16:29:25 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// The LLM provider like Microsoft Azure, OpenAI, ClaudAI
|
|
|
|
|
/// </summary>
|
2023-09-18 08:35:02 +00:00
|
|
|
string Provider { get; }
|
2023-09-19 16:29:25 +00:00
|
|
|
|
2025-03-05 23:22:46 +00:00
|
|
|
string Model { get; }
|
|
|
|
|
|
2023-09-19 16:29:25 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Set model name, one provider can consume different model or version(s)
|
|
|
|
|
/// </summary>
|
2024-02-22 12:22:26 +00:00
|
|
|
/// <param name="model">deployment name</param>
|
2023-09-19 16:29:25 +00:00
|
|
|
void SetModelName(string model);
|
|
|
|
|
|
2024-01-14 04:48:26 +00:00
|
|
|
Task<RoleDialogModel> GetChatCompletions(Agent agent,
|
2023-09-27 12:51:15 +00:00
|
|
|
List<RoleDialogModel> conversations);
|
|
|
|
|
|
2023-08-18 04:27:07 +00:00
|
|
|
Task<bool> GetChatCompletionsAsync(Agent agent,
|
|
|
|
|
List<RoleDialogModel> conversations,
|
|
|
|
|
Func<RoleDialogModel, Task> onMessageReceived,
|
|
|
|
|
Func<RoleDialogModel, Task> onFunctionExecuting);
|
|
|
|
|
|
2025-06-24 02:43:25 +00:00
|
|
|
Task<RoleDialogModel> GetChatCompletionsStreamingAsync(Agent agent,
|
|
|
|
|
List<RoleDialogModel> conversations) => Task.FromResult(new RoleDialogModel(AgentRole.Assistant, string.Empty));
|
2023-06-19 18:32:49 +00:00
|
|
|
}
|