Move AI env var from main to scribe package
This commit is contained in:
@@ -77,10 +77,4 @@ class AppConfig {
|
||||
static bool get isCozyIntegrationEnabled => dotenv.get('COZY_INTEGRATION', fallback: 'false') == 'true';
|
||||
|
||||
static String get cozyExternalBridgeVersion => dotenv.get('COZY_EXTERNAL_BRIDGE_VERSION', fallback: '0.16.1');
|
||||
|
||||
static bool get isAiEnabled => dotenv.get('AI_ENABLED', fallback: 'false') == 'true';
|
||||
|
||||
static String get aiApiKey => dotenv.get('AI_API_KEY', fallback: '');
|
||||
|
||||
static String get aiApiUrl => dotenv.get('AI_API_URL', fallback: '');
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
|
||||
class AIConfig {
|
||||
const AIConfig._();
|
||||
|
||||
static bool get isAiEnabled => dotenv.get('AI_ENABLED', fallback: 'false') == 'true';
|
||||
|
||||
static String get aiApiKey => dotenv.get('AI_API_KEY', fallback: '');
|
||||
|
||||
static String get aiApiUrl => dotenv.get('AI_API_URL', fallback: '');
|
||||
}
|
||||
@@ -13,8 +13,8 @@ class AIDataSourceImpl implements AIDataSource {
|
||||
required Dio dio,
|
||||
}) : _aiApi = AIApi(
|
||||
dio: dio,
|
||||
apiKey: AppConfig.aiApiKey,
|
||||
baseUrl: AppConfig.aiApiUrl,
|
||||
apiKey: AIConfig.aiApiKey,
|
||||
baseUrl: AIConfig.aiApiUrl,
|
||||
);
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user