Files
managing-apps/src/Managing.Domain/Users/User.cs
cryptooda 6f55566db3 Implement LLM provider configuration and update user settings
- Added functionality to update the default LLM provider for users via a new endpoint in UserController.
- Introduced LlmProvider enum to manage available LLM options: Auto, Gemini, OpenAI, and Claude.
- Updated User and UserEntity models to include DefaultLlmProvider property.
- Enhanced database context and migrations to support the new LLM provider configuration.
- Integrated LLM services into the application bootstrap for dependency injection.
- Updated TypeScript API client to include methods for managing LLM providers and chat requests.
2026-01-03 21:55:55 +07:00

46 lines
1.7 KiB
C#

using Managing.Domain.Accounts;
using Orleans;
using static Managing.Common.Enums;
namespace Managing.Domain.Users;
[GenerateSerializer]
public class User
{
[Id(0)] public int Id { get; set; }
[Id(1)] public string Name { get; set; }
[Id(2)] public List<Account> Accounts { get; set; }
[Id(3)] public string AgentName { get; set; } = string.Empty;
[Id(4)] public string AvatarUrl { get; set; } = string.Empty;
[Id(5)] public string TelegramChannel { get; set; } = string.Empty;
[Id(6)] public string OwnerWalletAddress { get; set; } = string.Empty;
[Id(7)] public bool IsAdmin { get; set; } = false;
[Id(8)] public DateTimeOffset? LastConnectionDate { get; set; }
// User Settings - Trading Configuration
[Id(9)] public decimal? LowEthAmountAlert { get; set; }
[Id(10)] public bool EnableAutoswap { get; set; } = false;
[Id(11)] public decimal? AutoswapAmount { get; set; }
[Id(12)] public int? MaxWaitingTimeForPositionToGetFilledSeconds { get; set; }
[Id(13)] public decimal? MaxTxnGasFeePerPosition { get; set; }
[Id(14)] public bool IsGmxEnabled { get; set; } = false;
[Id(20)] public decimal? GmxSlippage { get; set; }
// User Settings - Indicator Combo Configuration
[Id(15)] public Confidence? MinimumConfidence { get; set; }
[Id(16)] public decimal? TrendStrongAgreementThreshold { get; set; }
[Id(17)] public decimal? SignalAgreementThreshold { get; set; }
[Id(18)] public bool? AllowSignalTrendOverride { get; set; }
[Id(19)] public TradingExchanges? DefaultExchange { get; set; }
// User Settings - LLM Configuration
[Id(21)] public LlmProvider? DefaultLlmProvider { get; set; } = LlmProvider.Auto; // Default LLM provider
}