I have a more important question than the other one i posted. In Unreal Engine 5.7.4 with the newest version of the SDK when being “idle” for 450 seconds the server disconnects automatically. Is there anything i can do about that? The really bad thing is that it never reconnects, so maybe this is what i would prefer to solve, but even requests for interactions like typing messages or recording the voice with push to talk dont lead to reconnection.
Hello,
Yes, you can handle this by using the Start Session function on the Chatbot component.
There is also a Connection State event that you can bind to. This event will fire when the server disconnects, and you can use it to call Start Session again to reconnect the character.
Thank you for the suggestion
I tried around a bit and either i am just too stupid to get this working or it isn’t that straightforward. I made a custom version of the Chatbot blueprint. And attached some logic. Basically im going from the “Begin Play” event into binding to “On Attendee Connection State Chnaged” then i check if the connection state that is passed equals “Disconnected” for the “True” branch i then do some logging and go into a “do once” → “start session” and reset the do once after a delay of 30 seconds, because i wanted to test the idea first before figuring out how to handle this more cleanly.
This leads to my app definitely trying to reconnect but then issues arise.
The relevant logs look like this:
LogEOSSDK: LogEOS: Updating Product SDK Config, Time: 15999.830078
LogEOSSDK: LogEOS: SDK Config Product Update Request Completed - No Change
LogEOSSDK: LogEOS: ScheduleNextSDKConfigDataUpdate - Time: 16000.497070, Update Interval: 305.183868
ConvaiSubsystemLog: Attendee ID: convai-bot, Data: {“data”:{“message”:“You’ve been idle. You will be disconnected in 450 seconds.”,“remaining_seconds”:450,“type”:“user-idle-warning”},“label”:“rtvi-ai”,“type”:“server-message”}
ConvaiSubsystemLog: Attendee ID: convai-bot, Data: {“data”:{“message”:“You’ve been idle. You will be disconnected in 300 seconds.”,“remaining_seconds”:300,“type”:“user-idle-warning”},“label”:“rtvi-ai”,“type”:“server-message”}
ConvaiSubsystemLog: Attendee ID: convai-bot, Data: {“data”:{“message”:“You’ve been idle. You will be disconnected in 150 seconds.”,“remaining_seconds”:150,“type”:“user-idle-warning”},“label”:“rtvi-ai”,“type”:“server-message”}
LogEOSSDK: LogEOS: Updating Product SDK Config, Time: 16342.865234
LogEOSSDK: LogEOS: SDK Config Product Update Request Completed - No Change
LogEOSSDK: LogEOS: ScheduleNextSDKConfigDataUpdate - Time: 16343.532227, Update Interval: 350.917694
ConvaiSubsystemLog: Attendee ID: convai-bot, Data: {“type”:“bot-turn-completed”,“was_interrupted”:true}
ConvaiSubsystemLog: Warning: OnDataPacketReceived: Unknown packet type ‘bot-turn-completed’.
ConvaiSubsystemLog:
Attendee disconnected: convai-bot
LogBlueprintUserMessages: [BP_ConvaiChatbotCustom] Disconnection recognized. Reconnection initilaized.
LogBlueprintUserMessages: [BP_ConvaiChatbotCustom] Disconnection recognized. Reconnection initilaized.
ConvaiFaceSyncLog: ConvaiStopLipSync: Stopping lipsync - bIsPlaying: false, bIsPaused: false, TotalFrames: 0, FramesRemaining: 0, TotalDuration: 0.000, TimePlayed: 0.000, TimeRemaining: 0.000, TotalPausedDuration: 0.000
ConvaiConnectionManagerLog: Character [58b225b2-4eae-11f1-92ad-42010a7be02e]: Connection released — TTL is 0, disconnecting immediately
ConvaiSubsystemLog: Disconnecting character session
ConvaiChatbotComponentLog: Session stopped for character ID: 58b225b2-4eae-11f1-92ad-42010a7be02e
ConvaiReferenceAudioThread: Stopped recording reference audio
ConvaiReferenceAudioThread: Reference audio capture stopped
ConvaiReferenceAudioThread: Warning: Reference audio capture not active
ConvaiReferenceAudioThread: ConvaiReferenceAudioThread stop requested
ConvaiReferenceAudioThread: ConvaiReferenceAudioThread stopped running
ConvaiReferenceAudioThread: ConvaiReferenceAudioThread exiting
ConvaiReferenceAudioThread: Warning: Reference audio capture not active
ConvaiReferenceAudioThread: ConvaiReferenceAudioThread stop requested
ConvaiReferenceAudioThread: ConvaiReferenceAudioThread destroyed
ConvaiSubsystemLog: Stopped and cleaned up reference audio capture thread
ConvaiSubsystemLog: ConvaiClient Version: 0.1.8
ConvaiDefinitionsLog: End User ID not provided, using Device ID: 77c5fdfc-0986-4d63-abdc-80dffb90abb1
ConvaiPlayerLog: Server connection state changed: 1
ConvaiConnectionManagerLog: Character [58b225b2-4eae-11f1-92ad-42010a7be02e]: Establishing new connection
ConvaiChatbotComponentLog: Session started for character ID: 58b225b2-4eae-11f1-92ad-42010a7be02e
ConvaiSubsystemLog: Connecting to Convai service with parameters:
ConvaiSubsystemLog: StreamURL: https://realtime-api.convai.com/connect
ConvaiSubsystemLog: CharacterID: 58b225b2-4eae-11f1-92ad-42010a7be02e
ConvaiSubsystemLog: ConnectionType: audio
ConvaiSubsystemLog: LLMProvider: dynamic
ConvaiSubsystemLog: BlendshapeProvider: neurosync
ConvaiSubsystemLog: BlendshapeFormat: mha
ConvaiSubsystemLog: EmotionProvider: nrclex
ConvaiSubsystemLog: EndUserID: 77c5fdfc-0986-4d63-abdc-80dffb90abb1
ConvaiSubsystemLog: EndUserMetadata:
ConvaiSubsystemLog: ChunkSize: 10
ConvaiSubsystemLog: OutputFPS: 90
ConvaiSubsystemLog: FramesBufferDuration: 0.500000
ConvaiSubsystemLog: InvocationMetadata - ClientVersion: PIE_20260528_112152 | ExtraMetadata: {
“convai_plugin_version”: “4.0.0-beta.19”,
“platform”: “Windows”,
“ue_version”: “5.7.4-51494982+++UE5+Release-5.7”,
“app_name”: “AI_Avatar_Base”,
“convai_client_version”: “0.1.8”
}
ConvaiSubsystemLog: Error: Disconnected from Server
ConvaiPlayerLog: Server connection state changed: 0
ConvaiFaceSyncLog: ConvaiStopLipSync: Stopping lipsync - bIsPlaying: false, bIsPaused: false, TotalFrames: 0, FramesRemaining: 0, TotalDuration: 0.000, TimePlayed: 0.000, TimeRemaining: 0.000, TotalPausedDuration: 0.000
LogBlueprintUserMessages: [BP_ConvaiChatbotCustom] Disconnection recognized. Reconnection initilaized.
LogHttp: Warning: HTTP request timed out after 3.00 seconds URL=https://www.google.com/generate_204
ConvaiSubsystemLog: Warning: DisconnectSession: Character session is not the current active session
LogEOSSDK: LogEOS: Updating Product SDK Config, Time: 16751.277344
LogEOSSDK: LogEOS: SDK Config Product Update Request Completed - No Change
LogEOSSDK: LogEOS: ScheduleNextSDKConfigDataUpdate - Time: 16751.941406, Update Interval: 355.519287
LogViewport: Display: Viewport MouseLockMode Changed, LockOnCapture → LockAlways
LogViewport: Display: Viewport HideCursorDuringCapture Changed, False → True
LogViewport: Display: Viewport MouseCaptureMode Changed, CapturePermanently_IncludingInitialMouseDown → CaptureDuringMouseDown
Cmd: DebugManager.CycleToPreviousColumn
Cmd: DebugManager.CycleToPreviousColumn
Any help would be greatly appreciated ![]()
I will try to dig through the blueprint some more and see if i can find out something myself in the meantime.
After fiddling around a bit, i managed to get the general idea to work with adding a small timeout before reconnecting, however i don’t like this solution and maybe if you have beter options available you can explain to me the proper way to handle this ![]()
Thank you in advance!
Hi c.simon, to improve the reconnection success it would be better to update to the latest plugin availble on github (currently beta.21), additionally, it would be better to also add a simple context update event every few minutes, you can learn all about dynamic context from this link
Thank you for pointing me in this direction. I will try dynamic context instead, how important is the SDK update in your opinion at this point? I am worried i will have to rebuild larger portions of my blueprints, so if i can keep the beta 19 version i am currently using, i would prefer this.
We strongly encourage updating to the latest version. At this stage of the plugin, we are making significant improvements and new features with every release, and many of the issues you may be experiencing have likely already been addressed in the Beta 21 update.
We also do our best to maintain backward compatibility across releases. That said, it’s always a good practice to back up both your plugin and project before updating. This is a simple, no-regret step for any upgrade.
Thank you, i updated the SDK to the latest version and used the dynamic context functionality, however sending a context update deosn’t reset the timer. I think only if i force the context update to invoke speech it does.