Add sessionid to track users

This commit is contained in:
Nadine Ganz 2026-05-20 17:03:11 +02:00
parent 5e097278ce
commit 8a808b5482
6 changed files with 37 additions and 1 deletions

View File

@ -1 +1 @@
2026-05-05T11:47:25.7382830Z
2026-05-05T14:05:39.5205530Z

View File

@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class SessionGUID
{
public static string identifier;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6b63e9ca65aed434fbdb188cd20d61da
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -252,6 +252,7 @@ public class IntentRecognitionService : MonoBehaviour
IntentRecogntionTrackingItem newIntentRecogntionTrackingItem = new IntentRecogntionTrackingItem()
{
SessionID = vaim.SessionUID,
UserInput = pendingRequestDataModel.InputText,
Intent = reply
};

View File

@ -4,6 +4,7 @@ using UnityEngine;
public class IntentRecogntionTrackingItem
{
public string SessionID;
public string UserInput;
public string Intent;
}

View File

@ -66,6 +66,8 @@ public class ViaggioAIManager : MonoBehaviour
#endregion
public string SessionUID { get; private set; }
#region ViaggioAIState
private EViaggioAIState _viaggioAIState = EViaggioAIState.Idle;
@ -111,6 +113,19 @@ public class ViaggioAIManager : MonoBehaviour
return;
}
Instance = this;
// Check if SessionGUID is already set, if not generate a new one
if (string.IsNullOrEmpty(SessionGUID.identifier))
{
SessionGUID.identifier = System.Guid.NewGuid().ToString();
this.LogIfInDebugMode($"Session UID generated: {SessionGUID.identifier}");
}
else
{
this.LogIfInDebugMode($"Session UID already exists: {SessionGUID.identifier}");
}
this.SessionUID = SessionGUID.identifier;
}
void OnEnable()