Fatal Crash on ChatOpenAI
Tobaibrahim opened this issue · 2 comments
Tobaibrahim commented
This line -
let buffer = try! await openAIClient.chats.stream(model: model, messages: [.user(content: text)], temperature: temperature)
is causing fatal crashes when awaiting a response specifically for me on slow internet. I would recommend not force unwrapping here.
Thread 15: Fatal error: 'try!' expression unexpectedly raised an error: HTTPClientError.deadlineExceeded
buhe commented
You're right, I've done this on pr, I'll merge it first, use 0.27.0, happy hack.
Tobaibrahim commented
Thank You!