mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 10:40:20 +00:00 
			
		
		
		
	Added JSON options to the agent base class
This commit is contained in:
		
							parent
							
								
									213074885e
								
							
						
					
					
						commit
						1ccf0872bb
					
				@ -1,3 +1,5 @@
 | 
			
		||||
using System.Text.Json;
 | 
			
		||||
 | 
			
		||||
using AIStudio.Chat;
 | 
			
		||||
using AIStudio.Provider;
 | 
			
		||||
using AIStudio.Settings;
 | 
			
		||||
@ -9,6 +11,11 @@ namespace AIStudio.Agents;
 | 
			
		||||
 | 
			
		||||
public abstract class AgentBase(ILogger<AgentBase> logger, SettingsManager settingsManager, DataSourceService dataSourceService, ThreadSafeRandom rng) : IAgent
 | 
			
		||||
{
 | 
			
		||||
    protected static readonly JsonSerializerOptions JSON_SERIALIZER_OPTIONS = new()
 | 
			
		||||
    {
 | 
			
		||||
        PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower,
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    protected DataSourceService DataSourceService { get; init; } = dataSourceService;
 | 
			
		||||
    
 | 
			
		||||
    protected SettingsManager SettingsManager { get; init; } = settingsManager;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user