| | | 1 | | using Elsa.AI.Abstractions.Models; |
| | | 2 | | |
| | | 3 | | namespace Elsa.AI.Host.Options; |
| | | 4 | | |
| | | 5 | | public 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 | | |
| | | 28 | | public class AIGroundingOptions |
| | | 29 | | { |
| | 79 | 30 | | public int MaxItems { get; set; } = 25; |
| | 79 | 31 | | public int MaxResultBytes { get; set; } = 64 * 1024; |
| | 87 | 32 | | public bool ActivityGroundingEnabled { get; set; } = true; |
| | 86 | 33 | | public bool WorkflowGroundingEnabled { get; set; } = true; |
| | 86 | 34 | | public bool ProposalGroundingEnabled { get; set; } = true; |
| | 86 | 35 | | public bool RuntimeGroundingEnabled { get; set; } = true; |
| | | 36 | | } |
| | | 37 | | |
| | | 38 | | public 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 | | |
| | | 48 | | public 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 | | } |