You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
80
80
You can send a chat request to generate text based on a prompt using the `sendChatRequest` method. It takes the prompt, ChatGPT model, endpoint URL, and a completion block as parameters.
81
81
82
82
```swift
83
-
ChatGPTAPIManager.shared.sendChatRequest(prompt: "Your prompt", model: .gptThreePointFiveTurbo, endPoint: .chat) { result in
83
+
ChatGPTAPIManager.shared.sendChatRequest(prompt: "Your prompt", model: .gptThreePointFiveTurbo, endPoint: .chat) { result in
84
84
switch result {
85
85
case .success(let generatedChat):
86
86
// Handle the generated chat
@@ -94,7 +94,7 @@ You can send a chat request to generate text based on a prompt using the `sendCh
94
94
You can send a request to generate text based on a prompt using the `sendTextRequest` method. It takes the prompt, ChatGPT model, endpoint URL, and a completion block as parameters.
95
95
96
96
```swift
97
-
ChatGPTAPIManager.shared.sendTextRequest(prompt: "Your prompt", model: .textDavinci003, endPoint: .completion) { result in
97
+
ChatGPTAPIManager.shared.sendTextRequest(prompt: "Your prompt", model: .textDavinci003, endPoint: .completion) { result in
98
98
switch result {
99
99
case .success(let generatedText):
100
100
// Handle the generated text
@@ -108,7 +108,7 @@ You can send a request to generate text based on a prompt using the `sendTextReq
108
108
You can generate an image based on a prompt using the `generateImage` method. It takes the prompt, ChatGPT model, desired image size, endpoint URL, and a completion block as parameters.
109
109
110
110
```swift
111
-
ChatGPTAPIManager.shared.generateImage(prompt: "Your prompt", model: .engine, imageSize: .fiveTwelve, endPoint: .generateImage) { result in
111
+
ChatGPTAPIManager.shared.generateImage(prompt: "Your prompt", model: .engine, imageSize: .fiveTwelve, endPoint: .generateImage) { result in
0 commit comments