diff --git a/Sources/OpenAI/Public/Protocols/OpenAIProtocol+Combine.swift b/Sources/OpenAI/Public/Protocols/OpenAIProtocol+Combine.swift index c5142044..1999026c 100644 --- a/Sources/OpenAI/Public/Protocols/OpenAIProtocol+Combine.swift +++ b/Sources/OpenAI/Public/Protocols/OpenAIProtocol+Combine.swift @@ -8,6 +8,7 @@ #if canImport(Combine) import Combine +import Foundation @available(iOS 13.0, *) @available(tvOS 13.0, *) @@ -113,8 +114,8 @@ public extension OpenAIProtocol { .eraseToAnyPublisher() } - func audioCreateSpeech(query: AudioSpeechQuery) -> AnyPublisher { - Future { + func audioCreateSpeech(query: AudioSpeechQuery) -> AnyPublisher { + Future { audioCreateSpeech(query: query, completion: $0) } .eraseToAnyPublisher()