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.
This commit is contained in:
@@ -105,6 +105,9 @@ public class ManagingDbContext : DbContext
|
||||
.HasConversion<string>(); // Store enum as string
|
||||
entity.Property(e => e.DefaultExchange)
|
||||
.HasConversion<string>(); // Store enum as string
|
||||
entity.Property(e => e.DefaultLlmProvider)
|
||||
.HasConversion<string>() // Store enum as string
|
||||
.HasDefaultValueSql("'Auto'"); // Default LLM provider
|
||||
|
||||
// Create indexes for performance
|
||||
entity.HasIndex(e => e.Name).IsUnique();
|
||||
|
||||
Reference in New Issue
Block a user