Feature: Add configurable LLM model name
This commit is contained in:
@@ -34,6 +34,7 @@ class AdminController {
|
||||
$clientId = $this->config->getAppValue('google_client_id', 'analyticshub', '');
|
||||
$apiKey = $this->config->getAppValue('anthropic_api_key', 'analyticshub', '');
|
||||
$llmEndpoint = $this->config->getAppValue('llm_api_endpoint', 'analyticshub', '');
|
||||
$llmModel = $this->config->getAppValue('llm_model', 'analyticshub', '');
|
||||
$refreshToken = $this->config->getAppValue('google_refresh_token', 'analyticshub', '');
|
||||
|
||||
// Check if configured
|
||||
@@ -56,6 +57,7 @@ class AdminController {
|
||||
'google_client_id' => $clientId,
|
||||
'google_refresh_token' => $maskedRefreshToken,
|
||||
'llm_api_endpoint' => $llmEndpoint,
|
||||
'llm_model' => $llmModel,
|
||||
'anthropic_api_key' => $maskedApiKey,
|
||||
'is_configured' => $isConfigured,
|
||||
],
|
||||
@@ -80,6 +82,7 @@ class AdminController {
|
||||
$refreshToken = $data['google_refresh_token'] ?? '';
|
||||
$apiKey = $data['anthropic_api_key'] ?? '';
|
||||
$llmEndpoint = $data['llm_api_endpoint'] ?? '';
|
||||
$llmModel = $data['llm_model'] ?? '';
|
||||
|
||||
if (empty($clientId) || empty($clientSecret) || empty($apiKey)) {
|
||||
return new JSONResponse([
|
||||
@@ -100,6 +103,10 @@ class AdminController {
|
||||
$this->config->setAppValue('llm_api_endpoint', 'analyticshub', $llmEndpoint);
|
||||
}
|
||||
|
||||
if (!empty($llmModel)) {
|
||||
$this->config->setAppValue('llm_model', 'analyticshub', $llmModel);
|
||||
}
|
||||
|
||||
$this->config->setAppValue('anthropic_api_key', 'analyticshub', $apiKey);
|
||||
|
||||
// Check if fully configured
|
||||
|
||||
Reference in New Issue
Block a user