53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
namespace Admin.NET.Core.Ai.Option;
|
|
|
|
/// <summary>
|
|
/// LLM配置选项
|
|
/// 基于于Microsoft Semantic Kernel实现,也是本应用的默认实现
|
|
/// </summary>
|
|
public class LLMOptions : IConfigurableOptions
|
|
{
|
|
public string ModelProvider { get; set; }
|
|
public string InitSystemChatMessage { get; set; }
|
|
public bool UserCanSwitchLLM { get; set; }
|
|
public int TargetCount { get; set; }
|
|
public int ThresholdCount { get; set; }
|
|
public bool IsUserProxy { get; set; }
|
|
public string ProxyUrl { get; set; }
|
|
public bool LogEnabled { get; set; }
|
|
public List<ProviderOptions> Providers { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// LLM提供者选项
|
|
/// </summary>
|
|
public class ProviderOptions
|
|
{
|
|
public string ProductName { get; set; }
|
|
public string LLMType { get; set; }
|
|
public string ApiKey { get; set; }
|
|
public string ApiEndpoint { get; set; }
|
|
public string ApiSecret { get; set; }
|
|
public string Region { get; set; }
|
|
public ChatCompletionOptions ChatCompletion { get; set; }
|
|
public EmbeddingOptions Embedding { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 聊天完成选项
|
|
/// </summary>
|
|
public class ChatCompletionOptions
|
|
{
|
|
public string ModelId { get; set; }
|
|
public List<string> SupportModelIds { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 嵌入选项
|
|
/// </summary>
|
|
public class EmbeddingOptions
|
|
{
|
|
public string ModelId { get; set; }
|
|
public List<string> SupportModelIds { get; set; }
|
|
}
|
|
|