adding user id to igc request

pull/1384/head
William Jordan-Cooley 1 year ago committed by ggurdin
parent cace965456
commit 381769a6e4
No known key found for this signature in database
GPG Key ID: A01CB41737CBB478

@ -41,6 +41,7 @@ class IgcController {
final IGCRequestBody reqBody = IGCRequestBody( final IGCRequestBody reqBody = IGCRequestBody(
fullText: choreographer.currentText, fullText: choreographer.currentText,
userId: choreographer.pangeaController.userController.userId!,
userL1: choreographer.l1LangCode!, userL1: choreographer.l1LangCode!,
userL2: choreographer.l2LangCode!, userL2: choreographer.l2LangCode!,
enableIGC: choreographer.igcEnabled && !onlyTokensAndLanguageDetection, enableIGC: choreographer.igcEnabled && !onlyTokensAndLanguageDetection,

@ -129,6 +129,7 @@ class IGCRequestBody {
String userL2; String userL2;
bool enableIT; bool enableIT;
bool enableIGC; bool enableIGC;
String userId;
List<PreviousMessage> prevMessages; List<PreviousMessage> prevMessages;
IGCRequestBody({ IGCRequestBody({
@ -137,6 +138,7 @@ class IGCRequestBody {
required this.userL2, required this.userL2,
required this.enableIGC, required this.enableIGC,
required this.enableIT, required this.enableIT,
required this.userId,
required this.prevMessages, required this.prevMessages,
}); });
@ -146,6 +148,7 @@ class IGCRequestBody {
ModelKey.userL2: userL2, ModelKey.userL2: userL2,
"enable_it": enableIT, "enable_it": enableIT,
"enable_igc": enableIGC, "enable_igc": enableIGC,
ModelKey.userId: userId,
ModelKey.prevMessages: ModelKey.prevMessages:
jsonEncode(prevMessages.map((x) => x.toJson()).toList()), jsonEncode(prevMessages.map((x) => x.toJson()).toList()),
}; };

Loading…
Cancel
Save