From 70fb77447f2a8c742d2399a40ee8c68ec667e048 Mon Sep 17 00:00:00 2001 From: James J Kalafus Date: Wed, 14 Feb 2024 17:06:36 -0500 Subject: [PATCH] type fix: ChatResult > ChatStreamResult, typo: performSteamingRequest > performStreamingRequest --- Sources/OpenAI/OpenAI.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/OpenAI/OpenAI.swift b/Sources/OpenAI/OpenAI.swift index 182fced1..c241a4ce 100644 --- a/Sources/OpenAI/OpenAI.swift +++ b/Sources/OpenAI/OpenAI.swift @@ -61,7 +61,7 @@ final public class OpenAI: OpenAIProtocol { } public func completionsStream(query: CompletionsQuery, onResult: @escaping (Result) -> Void, completion: ((Error?) -> Void)?) { - performSteamingRequest(request: JSONRequest(body: query.makeStreamable(), url: buildURL(path: .completions)), onResult: onResult, completion: completion) + performStreamingRequest(request: JSONRequest(body: query.makeStreamable(), url: buildURL(path: .completions)), onResult: onResult, completion: completion) } public func images(query: ImagesQuery, completion: @escaping (Result) -> Void) { @@ -85,7 +85,7 @@ final public class OpenAI: OpenAIProtocol { } public func chatsStream(query: ChatQuery, onResult: @escaping (Result) -> Void, completion: ((Error?) -> Void)?) { - performSteamingRequest(request: JSONRequest(body: query.makeStreamable(), url: buildURL(path: .chats)), onResult: onResult, completion: completion) + performStreamingRequest(request: JSONRequest(body: query.makeStreamable(), url: buildURL(path: .chats)), onResult: onResult, completion: completion) } public func edits(query: EditsQuery, completion: @escaping (Result) -> Void) { @@ -145,7 +145,7 @@ extension OpenAI { } } - func performSteamingRequest(request: any URLRequestBuildable, onResult: @escaping (Result) -> Void, completion: ((Error?) -> Void)?) { + func performStreamingRequest(request: any URLRequestBuildable, onResult: @escaping (Result) -> Void, completion: ((Error?) -> Void)?) { do { let request = try request.build(token: configuration.token, organizationIdentifier: configuration.organizationIdentifier,