brilliantlabsAR / noa-for-ios

You AI companion. ChatGPT and translation for Monocle AR
ISC License
73 stars 15 forks source link

Implement longer responses in the app #16

Closed siliconwitch closed 1 year ago

siliconwitch commented 1 year ago

I've enabled the ability to print longer responses than a single MTU allows. To do so, simply send multiple res: commands back to back:

'res:The quick...fox'
'res:jumped over...lazy'
'res:dog.'
siliconwitch commented 1 year ago

My mistake! This already works :)

siliconwitch commented 1 year ago

Actually sorry, not sure if it is.

I see that _bluetooth.sendData(text: "res:" + message) splits up the message, but does it append res: to each payload? Or does it do:

'res:The quick...fox'
'jumped over...lazy'
'dog.'
trzy commented 1 year ago

Done. res: and err: payloads are split up to be maxWriteLength-4 bytes, and then either err: or res: is prepended to each. However, no end signal is sent. Let me know if you need it.