Skip to content

Blueprint Section - Get Started

blueprint

Get Started

Below, let's take OpenAI as an example to introduce the basic usage of blueprints.

Text chat

Using OpenAI for text chatting.

Create a node in the blueprint by right-clicking, named Send OpenAI Chat Request In World.

guide bludprint

Create an Options node, and set Stream=true, Api Key="your API key from OpenAI".

guide bludprint

Create Messages, add a System Message and a User Message respectively.

guide bludprint

Create a Delegate to receive the output information from the model and print it on the screen.

guide bludprint

guide bludprint

The complete blueprint looks like this, run the blueprint, and you will see the game screen displaying the message returned by printing the large model.

guide bludprint

guide bludprint

Generate image from text.

Create an image using OpenAI.

In the blueprint, right-click to create a node named "Send OpenAI Image Request", and set "In Prompt" to "a beautiful butterfly".

guide bludprint

Create an Options node, and set Api Key="your API key from OpenAI".

guide bludprint

Bind the "On Images" event and save the images to the local hard drive.

guide bludprint

The complete blueprint looks like this, run the blueprint, and you will see the image saved in the specified location.

guide bludprint

guide bludprint

Generate text from image.

Use OpenAI Vision to analyze images.

Create a node called Send OpenAI Image Request by right-clicking on the blueprint.

guide bludprint

Create an Options node and set Api Key="your API key from OpenAI", then set the model to gpt-4o-mini.

guide bludprint

Create Messages. Create a node "Import File as Texture 2D" first, and read an image from the file system. Convert the image into a format that the plugin can utilize through the node "Create AIChatPlus Texture From Texture2D". Connect the image to the "Images" field of the "AIChatPlus_ChatRequestMessage" node using the "Make Array" node. Set the "Content" field content to "describe this image".

As shown in the figure:

guide bludprint

The complete blueprint looks like this, run the blueprint, and you will see the results displayed on the screen.

guide bludprint

Original: https://wiki.disenone.site/en

This post is protected by CC BY-NC-SA 4.0 agreement, should be reproduced with attribution.

This post was translated using ChatGPT, please provide feedback in FeedbackPoint out any omissions.