Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
swiftuiux committed Mar 1, 2023
1 parent bf2757b commit 244c13a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ You just type in any your idea and AI will give you an art solution

### 2. Override the default loader at Environment with you apiKey
```swift
@Environment(\.openAIDefaultLoader) var loader : OpenAIDefaultLoader

let apiKey = "*******************"
let endpoint = OpenAIImageEndpoint.get(with: apiKey)
let loader = OpenAIDefaultLoader(endpoint: endpoint)

ContentView()
.environment(\.openAIDefaultLoader, loader)
let apiKey = "your API KEY"
let endpoint = OpenAIImageEndpoint.get(with: apiKey)
let loader = OpenAIDefaultLoader(endpoint: endpoint)
OpenAIDefaultLoaderKey.defaultValue = loader
```

### 3. Add **OpenAIAsyncImage** to your code
Expand Down

0 comments on commit 244c13a

Please sign in to comment.