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 244c13a

Browse files
Update README.md
1 parent bf2757b commit 244c13a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

‎README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@ You just type in any your idea and AI will give you an art solution
2222

2323
### 2. Override the default loader at Environment with you apiKey
2424
```swift
25-
@Environment(\.openAIDefaultLoader) var loader : OpenAIDefaultLoader
26-
27-
let apiKey = "*******************"
28-
let endpoint = OpenAIImageEndpoint.get(with: apiKey)
29-
let loader = OpenAIDefaultLoader(endpoint: endpoint)
30-
31-
ContentView()
32-
.environment(\.openAIDefaultLoader, loader)
25+
let apiKey = "your API KEY"
26+
let endpoint = OpenAIImageEndpoint.get(with: apiKey)
27+
let loader = OpenAIDefaultLoader(endpoint: endpoint)
28+
OpenAIDefaultLoaderKey.defaultValue = loader
3329
```
3430

3531
### 3. Add **OpenAIAsyncImage** to your code

0 commit comments

Comments
(0)

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