diff --git a/Frontend/lib/mih_env/env.dart b/Frontend/lib/mih_env/env.dart index 49b4161b..6c386f7e 100644 --- a/Frontend/lib/mih_env/env.dart +++ b/Frontend/lib/mih_env/env.dart @@ -3,6 +3,7 @@ enum Enviroment { dev, prod } // abstract class AppEnviroment { static late String baseApiUrl; + static late String baseAiUrl; static late String baseFileUrl; static late String whatsappAccessToken; static late String fingerPrintPluginKey; @@ -13,9 +14,14 @@ abstract class AppEnviroment { switch (env) { case Enviroment.dev: { - baseApiUrl = "http://10.0.2.2:8080"; //Android - // baseApiUrl = "http://localhost:8080"; //Web - baseFileUrl = "http://10.0.2.2:9000"; //"http://localhost:9000"; + //================= Android Dev Urls ================= + baseApiUrl = "http://10.0.2.2:8080"; + baseFileUrl = "http://10.0.2.2:9000"; + baseAiUrl = "http://10.0.2.2:11434"; + //================= Web Dev Urls ================= + // baseApiUrl = "http://localhost:8080"; + // baseFileUrl = "http://localhost:9000"; + // baseAiUrl = "http://localhost:11434"; whatsappAccessToken = "EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD"; //fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX'; diff --git a/Frontend/lib/mih_packages/mih_home/mih_home.dart b/Frontend/lib/mih_packages/mih_home/mih_home.dart index 12a3c7b5..431678f1 100644 --- a/Frontend/lib/mih_packages/mih_home/mih_home.dart +++ b/Frontend/lib/mih_packages/mih_home/mih_home.dart @@ -223,29 +223,29 @@ class _MIHHomeState extends State { s: getSec(), )); } - // tileList.add(MIHTile( - // videoID: "NUDdoWrbXNc", - // onTap: () { - // Navigator.of(context).pushNamed('/patient-profile', - // arguments: PatientViewArguments( - // widget.signedInUser, null, null, null, "personal")); - // }, - // tileName: "Patient Profile", - // tileIcon: Center( - // child: FaIcon( - // FontAwesomeIcons.bookMedical, - // color: getSec(), - // size: 200, - // ), - // ), - // // Icon( - // // Icons.medication, - // // color: getSec(), - // // size: 200, - // // ), - // p: getPrim(), - // s: getSec(), - // )); + tileList.add(MIHTile( + videoID: "", + onTap: () { + Navigator.of(context).pushNamed( + '/mzansi-ai', + ); + }, + tileName: "Mzansi AI", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.robot, + color: getSec(), + size: 180, + ), + ), + // Icon( + // Icons.medication, + // color: getSec(), + // size: 200, + // ), + p: getPrim(), + s: getSec(), + )); tileList.add(MIHTile( onTap: () { Navigator.of(context).pushNamed( @@ -269,29 +269,6 @@ class _MIHHomeState extends State { p: getPrim(), s: getSec(), )); - tileList.add(MIHTile( - onTap: () { - Navigator.of(context).pushNamed( - '/access-review', - arguments: widget.signedInUser, - ); - }, - tileName: "Access", - tileIcon: Center( - child: FaIcon( - FontAwesomeIcons.userCheck, - color: getSec(), - size: 170, - ), - ), - // Icon( - // Icons.check_box_outlined, - // color: getSec(), - // size: 200, - // ), - p: getPrim(), - s: getSec(), - )); tileList.add(MIHTile( videoID: "", @@ -318,6 +295,30 @@ class _MIHHomeState extends State { s: getSec(), )); + tileList.add(MIHTile( + onTap: () { + Navigator.of(context).pushNamed( + '/access-review', + arguments: widget.signedInUser, + ); + }, + tileName: "Access", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.userCheck, + color: getSec(), + size: 170, + ), + ), + // Icon( + // Icons.check_box_outlined, + // color: getSec(), + // size: 200, + // ), + p: getPrim(), + s: getSec(), + )); + tileList.add(MIHTile( videoID: "hbKhlmY_56U", onTap: () { diff --git a/Frontend/lib/mih_router/routeGenerator.dart b/Frontend/lib/mih_router/routeGenerator.dart index fa9f183b..755d9f18 100644 --- a/Frontend/lib/mih_router/routeGenerator.dart +++ b/Frontend/lib/mih_router/routeGenerator.dart @@ -294,6 +294,13 @@ class RouteGenerator { //=============================================================== //Calculator + + // case '/mzansi-ai': + // return MaterialPageRoute( + // settings: settings, + // builder: (_) => const MzansiAi(), + // ); + case '/package-dev': return MaterialPageRoute( settings: settings, diff --git a/Frontend/pubspec.lock b/Frontend/pubspec.lock index 3d5aca9e..75606494 100644 --- a/Frontend/pubspec.lock +++ b/Frontend/pubspec.lock @@ -321,6 +321,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + fetch_api: + dependency: transitive + description: + name: fetch_api + sha256: "97f46c25b480aad74f7cc2ad7ccba2c5c6f08d008e68f95c1077286ce243d0e6" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + fetch_client: + dependency: transitive + description: + name: fetch_client + sha256: "9666ee14536778474072245ed5cba07db81ae8eb5de3b7bf4a2d1e2c49696092" + url: "https://pub.dev" + source: hosted + version: "1.1.2" ffi: dependency: transitive description: @@ -448,6 +464,14 @@ packages: url: "https://pub.dev" source: hosted version: "10.8.0" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" frontend_server_client: dependency: transitive description: @@ -760,6 +784,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + ollama_dart: + dependency: "direct main" + description: + name: ollama_dart + sha256: "4e40bc499b6fe46ba54a004d2da601c40bd73d66e3f18cf7b03225ccf3d481a6" + url: "https://pub.dev" + source: hosted + version: "0.2.2+1" package_config: dependency: transitive description: diff --git a/Frontend/pubspec.yaml b/Frontend/pubspec.yaml index 1e2a532a..71f0d8ea 100644 --- a/Frontend/pubspec.yaml +++ b/Frontend/pubspec.yaml @@ -69,6 +69,7 @@ dependencies: fl_downloader: ^2.0.2 local_auth: ^2.3.0 math_expressions: ^2.6.0 + ollama_dart: ^0.2.2+1 dev_dependencies: flutter_test: diff --git a/Mzansi_AI/.gitignore b/Mzansi_AI/.gitignore new file mode 100644 index 00000000..57115811 --- /dev/null +++ b/Mzansi_AI/.gitignore @@ -0,0 +1 @@ +ollama/ollama diff --git a/docker-compose.yml b/docker-compose.yml index a749eae7..eaa59dd2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -147,6 +147,23 @@ services: restart: unless-stopped networks: - MIH-network + #============== Minio File Storage ==================================================================== + ollama: + container_name: MIH-AI + image: ollama/ollama:latest + ports: + - 11434:11434 + volumes: + # - ./Mzansi_AI:/code + - ./Mzansi_AI/ollama/ollama:/root/.ollama + pull_policy: always + tty: true + restart: always + environment: + - OLLAMA_KEEP_ALIVE=24h + - OLLAMA_HOST=0.0.0.0 + networks: + - MIH-network #============== Firebaase ==================================================================== # firebase: # container_name: MIH-firebase-emulator