Przebudowanie aplikacji, usprawnione AI, dodanie combo buildera
Some checks failed
Build Linux App / build (push) Failing after 1m18s
Some checks failed
Build Linux App / build (push) Failing after 1m18s
This commit is contained in:
@@ -53,10 +53,7 @@ class KnowledgeBaseController extends _$KnowledgeBaseController {
|
||||
successMessage: 'Saved! Knowledge base now has $count chunks.',
|
||||
);
|
||||
} catch (e) {
|
||||
state = state.copyWith(
|
||||
isLoading: false,
|
||||
errorMessage: _friendlyError(e),
|
||||
);
|
||||
state = state.copyWith(isLoading: false, errorMessage: _friendlyError(e));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,10 +75,7 @@ class KnowledgeBaseController extends _$KnowledgeBaseController {
|
||||
successMessage: 'Knowledge base cleared.',
|
||||
);
|
||||
} catch (e) {
|
||||
state = state.copyWith(
|
||||
isLoading: false,
|
||||
errorMessage: _friendlyError(e),
|
||||
);
|
||||
state = state.copyWith(isLoading: false, errorMessage: _friendlyError(e));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,8 +85,7 @@ class KnowledgeBaseController extends _$KnowledgeBaseController {
|
||||
|
||||
String _friendlyError(Object e) {
|
||||
final msg = e.toString();
|
||||
if (msg.contains('Connection refused') ||
|
||||
msg.contains('SocketException')) {
|
||||
if (msg.contains('Connection refused') || msg.contains('SocketException')) {
|
||||
return 'Cannot reach the embedding server. '
|
||||
'Make sure AI models are downloaded and the app has had time to '
|
||||
'start the inference servers.';
|
||||
|
||||
Reference in New Issue
Block a user