< Summary

Information
Class: Elsa.AI.Host.Options.AIGroundingOptions
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: 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_MaxItems()100%11100%
get_MaxResultBytes()100%11100%
get_ActivityGroundingEnabled()100%11100%
get_WorkflowGroundingEnabled()100%11100%
get_ProposalGroundingEnabled()100%11100%
get_RuntimeGroundingEnabled()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{
 7    public bool StreamingEnabled { get; set; } = true;
 8    public bool ConversationPersistenceEnabled { get; set; } = true;
 9    public bool ProposalReviewEnabled { get; set; } = true;
 10    public TimeSpan ConversationRetention { get; set; } = TimeSpan.FromDays(30);
 11    public TimeSpan ReconnectGrace { get; set; } = TimeSpan.FromMinutes(5);
 12    public int MaxToolResultBytes { get; set; } = 64 * 1024;
 13    public int MaxResolvedContextBytes { get; set; } = 128 * 1024;
 14    public AIGroundingOptions Grounding { get; set; } = new();
 15    public string? DefaultProviderName { get; set; }
 16    public ICollection<AIProviderOptions> Providers { get; set; } = [];
 17    public ICollection<string> SupportedAttachmentKinds { get; set; } =
 18    [
 19        AIContextAttachmentKinds.WorkflowDefinition,
 20        AIContextAttachmentKinds.WorkflowInstance,
 21        AIContextAttachmentKinds.Activity,
 22        AIContextAttachmentKinds.DiagnosticsScope,
 23        AIContextAttachmentKinds.TimeRange
 24    ];
 25    public ICollection<AIAgentOptions> Agents { get; set; } = [new() { Name = "workflow-author", DisplayName = "Workflow
 26}
 27
 28public class AIGroundingOptions
 29{
 7930    public int MaxItems { get; set; } = 25;
 7931    public int MaxResultBytes { get; set; } = 64 * 1024;
 8732    public bool ActivityGroundingEnabled { get; set; } = true;
 8633    public bool WorkflowGroundingEnabled { get; set; } = true;
 8634    public bool ProposalGroundingEnabled { get; set; } = true;
 8635    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}