The goal of this project is to provide an unofficial CFScript wrapper for the official OpenAI Java library. This library bridges the gap for CFScript developers by enabling seamless integration with the OpenAI API using a familiar syntax and framework. By leveraging the robustness of the Java library, this wrapper ensures reliability while making it accessible for CFScript-based applications.
The OpenAI Java SDK provides convenient access to the OpenAI REST API from applications written in Java.
The REST API documentation can be found on platform.openai.com. Javadocs are available on javadoc.io.
implementation("com.openai:openai-java:1.6.1")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>1.6.1</version>
</dependency>
This library requires Java 8 or later.
See the openai-java-example
directory for complete and runnable examples.
See INSTALL.md for step-by-step instructions. After installation you can run the samples in the examples/
directory.