From 381769a6e43743bcdcd349bac10b1338503307fb Mon Sep 17 00:00:00 2001 From: William Jordan-Cooley Date: Tue, 27 Aug 2024 13:59:13 -0400 Subject: [PATCH] adding user id to igc request --- lib/pangea/choreographer/controllers/igc_controller.dart | 1 + lib/pangea/repo/igc_repo.dart | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/pangea/choreographer/controllers/igc_controller.dart b/lib/pangea/choreographer/controllers/igc_controller.dart index 237697b40..aae7104d4 100644 --- a/lib/pangea/choreographer/controllers/igc_controller.dart +++ b/lib/pangea/choreographer/controllers/igc_controller.dart @@ -41,6 +41,7 @@ class IgcController { final IGCRequestBody reqBody = IGCRequestBody( fullText: choreographer.currentText, + userId: choreographer.pangeaController.userController.userId!, userL1: choreographer.l1LangCode!, userL2: choreographer.l2LangCode!, enableIGC: choreographer.igcEnabled && !onlyTokensAndLanguageDetection, diff --git a/lib/pangea/repo/igc_repo.dart b/lib/pangea/repo/igc_repo.dart index 33abb4deb..bb5c27062 100644 --- a/lib/pangea/repo/igc_repo.dart +++ b/lib/pangea/repo/igc_repo.dart @@ -129,6 +129,7 @@ class IGCRequestBody { String userL2; bool enableIT; bool enableIGC; + String userId; List prevMessages; IGCRequestBody({ @@ -137,6 +138,7 @@ class IGCRequestBody { required this.userL2, required this.enableIGC, required this.enableIT, + required this.userId, required this.prevMessages, }); @@ -146,6 +148,7 @@ class IGCRequestBody { ModelKey.userL2: userL2, "enable_it": enableIT, "enable_igc": enableIGC, + ModelKey.userId: userId, ModelKey.prevMessages: jsonEncode(prevMessages.map((x) => x.toJson()).toList()), };