File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments