Skip to content

Commit

Permalink
add imageGen example
Browse files Browse the repository at this point in the history
  • Loading branch information
wick3dr0se committed Oct 4, 2023
1 parent e9dc41a commit e095506
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ import ./openai

Start an asynchronous OpenAI client
```nim
var ai = newAIClient(getEnv("AI_TOKEN")
var ai = newAIClient(getEnv("AI_KEY")
```

Text chat with openai
Text chat with OpenAI
```nim
echo waitFor ai.chat("Say 'test'")
```

Generate an image with DALL-E
```nim
echo waitFor ai.imageGen("Puppy")
```

0 comments on commit e095506

Please sign in to comment.