Add sessionid to track users
This commit is contained in:
parent
5e097278ce
commit
8a808b5482
@ -1 +1 @@
|
||||
2026-05-05T11:47:25.7382830Z
|
||||
2026-05-05T14:05:39.5205530Z
|
||||
8
Viagg-io/Assets/Scripts/SessionGUID.cs
Normal file
8
Viagg-io/Assets/Scripts/SessionGUID.cs
Normal file
@ -0,0 +1,8 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public static class SessionGUID
|
||||
{
|
||||
public static string identifier;
|
||||
}
|
||||
11
Viagg-io/Assets/Scripts/SessionGUID.cs.meta
Normal file
11
Viagg-io/Assets/Scripts/SessionGUID.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b63e9ca65aed434fbdb188cd20d61da
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -252,6 +252,7 @@ public class IntentRecognitionService : MonoBehaviour
|
||||
|
||||
IntentRecogntionTrackingItem newIntentRecogntionTrackingItem = new IntentRecogntionTrackingItem()
|
||||
{
|
||||
SessionID = vaim.SessionUID,
|
||||
UserInput = pendingRequestDataModel.InputText,
|
||||
Intent = reply
|
||||
};
|
||||
|
||||
@ -4,6 +4,7 @@ using UnityEngine;
|
||||
|
||||
public class IntentRecogntionTrackingItem
|
||||
{
|
||||
public string SessionID;
|
||||
public string UserInput;
|
||||
public string Intent;
|
||||
}
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user