forked from Blendman974/faceclaw
Hermes integration survives restarts, fix error hadling, increase turn length limit
This commit is contained in:
1 parent
825559aa82
commit
de653f0fbb
6 files changed
+100
-9
No files matched your search
@@ -57,8 +57,9 @@ internal object IosStreamingHttp : StreamingHttp {
|
||||
}
|
||||
val request = buildRequest(target, "POST", body, listOf("Content-Type" to "application/json; charset=utf-8", "Accept" to "text/event-stream") + headers)
|
||||
val configuration = NSURLSessionConfiguration.ephemeralSessionConfiguration
|
||||
// An idle limit only, like Android's OkHttp read timeout: callers cap a stream's
|
||||
// total time, and a Hermes agent turn can stream for many minutes.
|
||||
configuration.timeoutIntervalForRequest = 180.0
|
||||
configuration.timeoutIntervalForResource = 180.0
|
||||
val delegate = StreamingDelegate(sink)
|
||||
val session = NSURLSession.sessionWithConfiguration(configuration, delegate, delegateQueue = null)
|
||||
val task = session.dataTaskWithRequest(request)
|
||||
|
||||
Reference in new issue
Block a user