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 31f9205

Browse files
Update README.md
1 parent 61bcc83 commit 31f9205

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

‎README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,21 @@ DALL-E and DALL-E 2 are deep learning models developed by OpenAI to generate dig
3535
### 3. Add **OpenAIAsyncImage** to your code
3636

3737
```swift
38-
OpenAIAsyncImage(prompt: .constant("sun"))
39-
.frame(width: 125, height: 125)
38+
OpenAIAsyncImage(prompt: .constant("sun"))
4039
```
4140
or with custom **ViewBuilder**
4241

4342
```swift
44-
OpenAIAsyncImage(prompt: $imageText, size: .dpi1024){ state in
45-
switch state{
46-
case .loaded(let image) :
47-
image
48-
.resizable()
49-
.scaledToFill()
50-
case .loadError(let error) : Text(error.localizedDescription)
51-
case .loading : ProgressView()
43+
OpenAIAsyncImage(prompt: $imageText, size: .dpi1024){ state in
44+
switch state{
45+
case .loaded(let image) :
46+
image
47+
.resizable()
48+
.scaledToFill()
49+
case .loadError(let error) : Text(error.localizedDescription)
50+
case .loading : ProgressView()
51+
}
5252
}
53-
}
5453
```
5554

5655
| Param | Description |
@@ -71,4 +70,4 @@ OpenAIAsyncImage(prompt: $imageText, size: .dpi1024){ state in
7170
[OpenAI AsyncImage SwiftUI example](https://github.com/The-Igor/openai-async-image-swiftui-example)
7271

7372

74-
![OpenAI AsyncImage SwiftUI](https://github.com/The-Igor/openai-async-image-swiftui/blob/main/image/sun_11.png)
73+
![OpenAI AsyncImage SwiftUI](https://github.com/The-Igor/openai-async-image-swiftui/blob/main/image/sun_11.png)

0 commit comments

Comments
(0)

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