< Summary

Information
Class: Elsa.AI.Host.Options.AIProviderOptions
Assembly: Elsa.AI.Host
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.AI.Host/Options/AIHostOptions.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 35
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Name()100%11100%
get_Provider()100%11100%
get_Model()100%11100%
get_ApiKeySecretName()100%11100%
get_Endpoint()100%11100%
get_Enabled()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.AI.Host/Options/AIHostOptions.cs

#LineLine coverage
 1namespace Elsa.AI.Host.Options;
 2
 3public class AIHostOptions
 4{
 5    public bool StreamingEnabled { get; set; } = true;
 6    public bool ConversationPersistenceEnabled { get; set; } = true;
 7    public bool ProposalReviewEnabled { get; set; } = true;
 8    public TimeSpan ConversationRetention { get; set; } = TimeSpan.FromDays(30);
 9    public TimeSpan ReconnectGrace { get; set; } = TimeSpan.FromMinutes(5);
 10    public int MaxToolResultBytes { get; set; } = 64 * 1024;
 11    public int MaxResolvedContextBytes { get; set; } = 128 * 1024;
 12    public string? DefaultProviderName { get; set; }
 13    public ICollection<AIProviderOptions> Providers { get; set; } = [];
 14    public ICollection<string> SupportedAttachmentKinds { get; set; } = ["WorkflowDefinition", "WorkflowInstance"];
 15    public ICollection<AIAgentOptions> Agents { get; set; } = [new() { Name = "workflow-author", DisplayName = "Workflow
 16}
 17
 18public class AIProviderOptions
 19{
 820    public string Name { get; set; } = "";
 721    public string Provider { get; set; } = "";
 222    public string? Model { get; set; }
 223    public string? ApiKeySecretName { get; set; }
 224    public string? Endpoint { get; set; }
 725    public bool Enabled { get; set; } = true;
 26}
 27
 28public class AIAgentOptions
 29{
 30    public string Name { get; set; } = "";
 31    public string DisplayName { get; set; } = "";
 32    public string Description { get; set; } = "";
 33    public string? ProviderName { get; set; }
 34    public ICollection<string> Permissions { get; set; } = [];
 35}