Skip to content

Commit

Permalink
Mark generateHeaders() private to limit visibility, since it should o…
Browse files Browse the repository at this point in the history
…nly be used by the OpenAI class.
  • Loading branch information
benvolioT committed Jul 30, 2023
1 parent b882637 commit 2334b8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/OpenAI/OpenAI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final public class OpenAI: OpenAIProtocol {
self.token = token
self.organizationIdentifier = organizationIdentifier
self.host = host
self.timeoutInterval = timeoutInterval
self.timeoutInterval = timeoutInterval
self.additionalHeaders = additionalHeaders ?? [:]
}
}
Expand Down Expand Up @@ -110,7 +110,7 @@ final public class OpenAI: OpenAIProtocol {
}

extension OpenAI {
func generateHeaders() -> [String: String] {
private func generateHeaders() -> [String: String] {
var headers = configuration.additionalHeaders
headers["Authorization"] = "Bearer \(configuration.token)"
if let organizationIdentifier = configuration.organizationIdentifier {
Expand Down

0 comments on commit 2334b8c

Please sign in to comment.