Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 293d7ab

Browse files
update
1 parent ff78a13 commit 293d7ab

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

‎Sources/openai-async-image-swiftui/net/OpenAIImageEndpoint.swift

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ public struct OpenAIImageEndpoint: IOpenAIImageEndpoint{
1616
/// Base url to OpenAPI image resource
1717
public static var urlString = "https://api.openai.com"
1818

19-
/// Http method
20-
public static var httpMethod = "POST"
21-
2219
/// Path to the point
2320
public static var path = "/v1/images/generations"
2421

@@ -27,7 +24,6 @@ public struct OpenAIImageEndpoint: IOpenAIImageEndpoint{
2724
static public func get(with apiKey: String) -> Self{
2825
.init(
2926
urlString: Self.urlString,
30-
httpMethod: Self.httpMethod,
3127
apiKey: apiKey,
3228
path: Self.path)
3329
}
@@ -37,14 +33,11 @@ public struct OpenAIImageEndpoint: IOpenAIImageEndpoint{
3733
/// Base url to OpenAPI image resource
3834
public let urlString: String
3935

40-
/// Http method
41-
public let httpMethod : String
36+
/// Path to the point
37+
public let path : String
4238

4339
/// Api key for access
4440
public let apiKey : String
45-
46-
/// Path to the point
47-
public let path : String
4841

4942
// MARK: - Life circle
5043

@@ -53,9 +46,8 @@ public struct OpenAIImageEndpoint: IOpenAIImageEndpoint{
5346
/// - httpMethod: Http method
5447
/// - apiKey: Api key for access
5548
/// - path: Path to the point
56-
public init(urlString: String, httpMethod:String,apiKey: String, path: String) {
49+
public init(urlString: String, apiKey: String, path: String) {
5750
self.urlString = urlString
58-
self.httpMethod = httpMethod
5951
self.apiKey = apiKey
6052
self.path = path
6153
}

‎Sources/openai-async-image-swiftui/protocol/IOpenAIImageEndpoint.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ public protocol IOpenAIImageEndpoint{
1414
/// Base url to OpenAPI image resource
1515
var urlString : String { get }
1616

17-
/// Http method
18-
var httpMethod : String { get }
17+
/// Path to the point
18+
var path : String { get }
1919

2020
/// Api key for access
2121
var apiKey : String { get }
2222

23-
/// Path to the point
24-
var path : String { get }
23+
2524
}

‎Sources/openai-async-image-swiftui/protocol/IOpenAILoader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import SwiftUI
99

1010
/// Loader for getting images
1111
@available(iOS 15.0, macOS 12.0, *)
12-
public protocol IOpenAILoader:ObservableObject{
12+
public protocol IOpenAILoader{
1313

1414
/// Load image by text
1515
/// - Parameters:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /