Skip to content

Files

Latest commit

 

History

History
39 lines (33 loc) · 601 Bytes

README.md

File metadata and controls

39 lines (33 loc) · 601 Bytes

OpenAI-Nim

OpenAI API for Nim

Acquisition

Install with Nimble

nimble install https://github.com/wick3dr0se/openai-nim@#head

Install from source

git clone https://github.com/wick3dr0se/openai-nim; cd openai-nim

Getting Started

Import openai module

# from nimble
import openai
# or from source
import ./openai

Start an asynchronous OpenAI client

var ai = newAIClient(getEnv("AI_KEY")

Text chat with OpenAI

ai.chat("Say 'test'")

Generate an image with DALL-E

ai.imageGen("Puppy")