You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throwNSError(domain:"TransformationError", code:-1, userInfo:[NSLocalizedDescriptionKey:"AI transformation is not available. Please enable AI backend in preferences."])
425
+
}
426
+
400
427
letapiKey=Config.OpenAiApiKey().value
401
-
guard !apiKey.isEmpty else{
402
-
awaitMainActor.run{
403
-
self.segmentsManager.appendDebugMessage("getTransformationPreview: No OpenAI API key configured")
428
+
if backend ==.openAI {
429
+
guard !apiKey.isEmpty else{
430
+
awaitMainActor.run{
431
+
self.segmentsManager.appendDebugMessage("getTransformationPreview: No OpenAI API key configured")
432
+
}
433
+
throwNSError(domain:"TransformationError", code:-2, userInfo:[NSLocalizedDescriptionKey:"OpenAI API key is missing. Please configure your API key in preferences."])
404
434
}
405
-
throwNSError(domain:"TransformationError", code:-2, userInfo:[NSLocalizedDescriptionKey:"OpenAI API key is missing. Please configure your API key in preferences."])
406
435
}
407
436
408
437
awaitMainActor.run{
409
-
self.segmentsManager.appendDebugMessage("getTransformationPreview: Sending preview request to API")
0 commit comments