Skip to content

Integration for the OpenAI Api in Unreal Engine

License

Notifications You must be signed in to change notification settings

milieu-us/OpenAI-Api-Unreal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI API Plugin

The OpenAIApi Plugin gives you access to the OpenAI API in Unreal Engine. It is compatible with 4.25, 4.26, 4.27, and 5.00EA

This is a community Plugin. No affiliation with OpenAI

Installation

The recommended way to install the plugin is to use pre-built binaries.

  • Download the Plugin here
  • Create a Plugins folder under your project folder
  • Copy the plugin to it, so you have YourProject/Plugins/OpenAIAPI

Quick Start

See Video

Types of Authentication

There are two ways to set the Api Key

  • Assign the Api key directly in blueprints.

  • Set the Api Key as an environment variable

ADVICE: Pay attention to security and encrypt your assets before packaging.

ADVICE: Create the environment variable OPENAI_API_KEY and use your Api key as the value.

Blueprint Nodes

OpenAI Call GPT3

  • This async node sends an HTTP request using your engine, prompt, and settings.

NOTE: This node can only be called from a blueprint's Event Graph.

Make Settings

  • This node allows you to set the Request body parameters.

NOTE: The extra parameter Start Sequence injects text at the beginning of your prompt.

log_probs and stream will be supported soon

Break Completion

  • This node is used to access the values included in a completion or choice

NOTE: log_probs is currently unsupported.

Usage

This example shows OpenAI's chat example implemented in blueprints.

References

Supported Platforms

Windows, Mac, Android

About

Integration for the OpenAI Api in Unreal Engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 94.8%
  • C# 5.2%