< Summary

Information
Class: Elsa.AI.Host.Options.AIAgentOptions
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: 5
Uncovered lines: 0
Coverable lines: 5
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_Name()100%11100%
get_DisplayName()100%11100%
get_Description()100%11100%
get_ProviderName()100%11100%
get_Permissions()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{
 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{
 15250    public string Name { get; set; } = "";
 14651    public string DisplayName { get; set; } = "";
 14652    public string Description { get; set; } = "";
 253    public string? ProviderName { get; set; }
 7154    public ICollection<string> Permissions { get; set; } = [];
 55}