< Summary

Information
Class: Elsa.AI.Host.Options.AIHostOptions
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: 19
Uncovered lines: 0
Coverable lines: 19
Total lines: 55
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_StreamingEnabled()100%11100%
get_ConversationPersistenceEnabled()100%11100%
get_ProposalReviewEnabled()100%11100%
get_ConversationRetention()100%11100%
get_ReconnectGrace()100%11100%
get_MaxToolResultBytes()100%11100%
get_MaxResolvedContextBytes()100%11100%
get_Grounding()100%11100%
get_DefaultProviderName()100%11100%
get_Providers()100%11100%
get_SupportedAttachmentKinds()100%11100%
.ctor()100%11100%
get_Agents()100%11100%

File(s)

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

#LineLine coverage
 1using Elsa.AI.Abstractions.Models;
 2
 3namespace Elsa.AI.Host.Options;
 4
 5public class AIHostOptions
 6{
 777    public bool StreamingEnabled { get; set; } = true;
 2068    public bool ConversationPersistenceEnabled { get; set; } = true;
 769    public bool ProposalReviewEnabled { get; set; } = true;
 14810    public TimeSpan ConversationRetention { get; set; } = TimeSpan.FromDays(30);
 7011    public TimeSpan ReconnectGrace { get; set; } = TimeSpan.FromMinutes(5);
 7512    public int MaxToolResultBytes { get; set; } = 64 * 1024;
 11213    public int MaxResolvedContextBytes { get; set; } = 128 * 1024;
 9314    public AIGroundingOptions Grounding { get; set; } = new();
 4815    public string? DefaultProviderName { get; set; }
 12116    public ICollection<AIProviderOptions> Providers { get; set; } = [];
 817    public ICollection<string> SupportedAttachmentKinds { get; set; } =
 6818    [
 6819        AIContextAttachmentKinds.WorkflowDefinition,
 6820        AIContextAttachmentKinds.WorkflowInstance,
 6821        AIContextAttachmentKinds.Activity,
 6822        AIContextAttachmentKinds.DiagnosticsScope,
 6823        AIContextAttachmentKinds.TimeRange
 6824    ];
 8125    public ICollection<AIAgentOptions> Agents { get; set; } = [new() { Name = "workflow-author", DisplayName = "Workflow
 26}
 27
 28public class AIGroundingOptions
 29{
 30    public int MaxItems { get; set; } = 25;
 31    public int MaxResultBytes { get; set; } = 64 * 1024;
 32    public bool ActivityGroundingEnabled { get; set; } = true;
 33    public bool WorkflowGroundingEnabled { get; set; } = true;
 34    public bool ProposalGroundingEnabled { get; set; } = true;
 35    public bool RuntimeGroundingEnabled { get; set; } = true;
 36}
 37
 38public class AIProviderOptions
 39{
 40    public string Name { get; set; } = "";
 41    public string Provider { get; set; } = "";
 42    public string? Model { get; set; }
 43    public string? ApiKeySecretName { get; set; }
 44    public string? Endpoint { get; set; }
 45    public bool Enabled { get; set; } = true;
 46}
 47
 48public class AIAgentOptions
 49{
 50    public string Name { get; set; } = "";
 51    public string DisplayName { get; set; } = "";
 52    public string Description { get; set; } = "";
 53    public string? ProviderName { get; set; }
 54    public ICollection<string> Permissions { get; set; } = [];
 55}