From 296159b7db7e0a510572270908ae101418e37805 Mon Sep 17 00:00:00 2001 From: James J Kalafus Date: Mon, 5 Feb 2024 14:08:59 -0500 Subject: [PATCH 1/2] make Demo buildable --- Demo/DemoChat/Sources/UI/DetailView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Demo/DemoChat/Sources/UI/DetailView.swift b/Demo/DemoChat/Sources/UI/DetailView.swift index 9e2a07e9..3cd119ea 100644 --- a/Demo/DemoChat/Sources/UI/DetailView.swift +++ b/Demo/DemoChat/Sources/UI/DetailView.swift @@ -19,7 +19,7 @@ struct DetailView: View { @State private var showsModelSelectionSheet = false @State private var selectedChatModel: Model = .gpt4_0613 - private let availableChatModels: [Model] = [.gpt3_5Turbo0613, .gpt4_0613] + private let availableChatModels: [Model] = [.gpt3_5Turbo, .gpt4_0613] let conversation: Conversation let error: Error? From 2bbb1d1eeb4474859571fe5a5ce09e87234fbc4c Mon Sep 17 00:00:00 2001 From: James J Kalafus Date: Mon, 5 Feb 2024 19:50:17 -0500 Subject: [PATCH 2/2] define audioCreateSpeech in +Combine --- .../OpenAI/Public/Protocols/OpenAIProtocol+Combine.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/OpenAI/Public/Protocols/OpenAIProtocol+Combine.swift b/Sources/OpenAI/Public/Protocols/OpenAIProtocol+Combine.swift index da8b7dfb..c5142044 100644 --- a/Sources/OpenAI/Public/Protocols/OpenAIProtocol+Combine.swift +++ b/Sources/OpenAI/Public/Protocols/OpenAIProtocol+Combine.swift @@ -113,6 +113,13 @@ public extension OpenAIProtocol { .eraseToAnyPublisher() } + func audioCreateSpeech(query: AudioSpeechQuery) -> AnyPublisher { + Future { + audioCreateSpeech(query: query, completion: $0) + } + .eraseToAnyPublisher() + } + func audioTranscriptions(query: AudioTranscriptionQuery) -> AnyPublisher { Future { audioTranscriptions(query: query, completion: $0)