Skip to content

A simple, fast and robust Clojure client library for accessing the OpenAI API.

License

Notifications You must be signed in to change notification settings

ygorsimoes/openai-clj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openai-clj Clojars Project

A simple, fast and robust Clojure client library for accessing the OpenAI API.

This library is unofficial, meaning it is community-maintained.

Documentation

Authentication

Set your environment variables to: OPENAI_API_KEY and/or OPENAI_ORGANIZATION to authenticate with the OpenAI API.

For another alternative to access your api key and organization, access the authentication documentation.

Quickstart

Demonstration of a simple library use case. For more specific demonstrations, access the usage documentation.

Add namespace in your project:

(:require [openai-clj.completion :as completion])

Creates a completion:

(completion/create-completion {:model  "gpt-3.5-turbo-instruct"
                               :prompt "Say this is a test"})

Contributing

Contributions are welcome! Please feel free to open new issues and submit pull requests.

Acknowledgements

This library was inspired by wkok/openai-clojure, which served as a base and learning experience for me to delve even deeper into the Clojure language.

License

openai-clj is made with ❤️ by Ygor Simões and it's released under the MIT license.

About

A simple, fast and robust Clojure client library for accessing the OpenAI API.

Resources

License

Stars

Watchers

Forks