Avatar
Consider using asynchronous alternative functioncompletionHandler じゃなくて、asyncメソッドとして呼んだら消えないですかね let error = await self.chat.predictTokens(for: prompt, tokenHandler: { token in continuation.yield(token) }) continuation.finish(throwing: error) (edited)