Coder Social home page Coder Social logo

openai-api-unreal's Introduction

OpenAI API Plugin

The OpenAIApi Plugin gives you access to the OpenAI API in Unreal Engine. It is compatible with 4.26, 4.27, 5.0, 5.1, 5.2, and 5.3

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

NOTE: This tutorial is out of date. Updating it soon to show how you can use this plugin to:
Generate images at runtime using DALL·E 2.
Transcribe speech in any language using Whisper v2-large.
Use the chat endpoint to power an NPC with GPT-4 and GPT-3.5-Turbo.

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 Completions

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

NOTE: Async nodes can only be called from a blueprint's Event Graph.

Make Completion 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.

stream will be supported soon

Break Completion

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

Usage

This example shows OpenAI's OpenAI's completions endpoint in blueprints. (GPT-3)

This example show you how to use OpenAI's chat endpoint in blueprints. (GPT-4 / GPT-3.5-Turbo)

This example shows you how to generate a 1024x1024 image using DALL·E 2 in blueprints.

This example shows you how to record and transcribe speech using Whisper v2-Large in blueprints.

References

Supported Platforms

Windows, Mac, Android

openai-api-unreal's People

Contributors

diamondkneeplate avatar kellaniopi avatar kellanm avatar modestgoblin avatar tobenot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openai-api-unreal's Issues

open AICall completion node is not working

So I created the open AICall completion node put in as a prompt something very simple which is "what is your name" . After the node I'm using a branch node that takes in the success pin from open AICall completion node and I print out the error message from the open AICall completion node if it is not successful. If it is successful then it continues on to print out the completion.

But here is where the problem lies:
The output for this is weird. First the branch node fails and outputs Prompt is empty as an error, but then somehow the same branch node succeeds without me even calling it, and it prints out something completely unrelated to the prompt that I gave.

This issue is with the unreal 5.1.1 version of the plugin and I downloaded it today (April 03, 2023) from the google drive. I was using an older version of the plugin before and it was working fine.

Edit: I am using the Finished output on the open AICall completion node to connect to the branch node

API packing to Hololens

Hello together, first of all thank you for your work.
As part of my master thesis I am trying to bring the API to the Hololens, but unfortunately the app crashes as soon as I execute "open aicall gpt3". I am very grateful for any help!

Getting very bad results compared to what I should be.

I love the plugin, very easy to use. But the results I get with it are no where near as good as what I get using the GPT playground or even python API requests with the EXACT same settings. I think this could just be that its not using the latest text-davinci-002.
How could I go about using text-davinci-002 with the plugin?
Thanks

API Error

Everytime I try to use the CallAI I get an API Error Message, no matter which of the Engines I'm using.

Can you update this plugin to UE 5.2 version?

Or give some tips to manually update the code to UE 5.2.

In my case, I installed folder OpenAIAPI at Plugins, then opened my project and met this error:

image

The point is incompatible version. I think just need a little work can fix it, have someone know solution?

text-davinci-001

Hello! Is it possible to get the new text davinci for unreal? I know it just came out by its seems quite good compared to the current davinci's. Right now im getting all these strange results from my openai in unreal. From printing hundreds of lines of the same thing to not even having context of the conversation and talking about random things.

no error message return

Hi

Thanks for your effort.
I got a issue that after I call open AICall Completions function, after a while got success false but not returning any Error Message.

Can you help me ?

request error even though VPN is set

LogHttp: Warning: 0000054C0AC96E00: invalid HTTP response code received. URL: https://api.openai.com/v1/engines/text-davinci-003/completions, HTTP code: 0, content length: 0, actual payload size: 0
LogHttp: Warning: 0000054C0AC96E00: request failed, libcurl error: 7 (Couldn't connect to server)
LogHttp: Warning: 0000054C0AC96E00: libcurl info message cache 0 (Hostname api.openai.com was found in DNS cache)
LogHttp: Warning: 0000054C0AC96E00: libcurl info message cache 1 ( Trying 108.160.169.185...)
LogHttp: Warning: 0000054C0AC96E00: libcurl info message cache 2 (TCP_NODELAY set)
LogHttp: Warning: 0000054C0AC96E00: libcurl info message cache 3 (connect to 108.160.169.185 port 443 failed: Timed out)
LogHttp: Warning: 0000054C0AC96E00: libcurl info message cache 4 (Failed to connect to api.openai.com port 443: Timed out)
LogHttp: Warning: 0000054C0AC96E00: libcurl info message cache 5 (Closing connection 10)

Getting Inject Restart Text at end of Completion

I am using the chat preset set up and have put the recommended values in the fields. But when I use it the output text includes the restart text at the end. In this case "Human:" is always at the end. Then I have to manually truncate the string to remove it.
image

package error

Hello, i successfully install and use plugin, but when i tried to package project, an error occurred.

Parsing headers for ue_project
UATHelper: Packaging (Windows): Running Internal UnrealHeaderTool E:\egor\github\language-model-dialog\ue_project\ue_project.uproject E:\egor\github\language-model-dialog\ue_project\Intermediate\Build\Win64\ue_project\DebugGame\ue_project.uhtmanifest -WarningsAsErrors -installed
UATHelper: Packaging (Windows): E:\egor\github\language-model-dialog\ue_project\Source\ue_project\Public\MainCharacter.h(12): Warning: The identifier 'GENERATED_BODY' was detected in a block being skipped. Was this intentional?
UATHelper: Packaging (Windows): Total of 0 written
UATHelper: Packaging (Windows): Took 6,2523746000000004s to run dotnet.exe, ExitCode=6
UATHelper: Packaging (Windows): UnrealBuildTool failed. See log for more details. (C:\Users\Professional\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+ue_5.11+UE_5.1\UBT-ue_project-Win64-DebugGame.txt)
PackagingResults: Warning: The identifier 'GENERATED_BODY' was detected in a block being skipped. Was this intentional?
UATHelper: Packaging (Windows): AutomationTool executed for 0h 0m 12s
UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Windows): BUILD FAILED
PackagingResults: Error: Unknown Error

UBT-ue_project-Win64-DebugGame.txt :
Parsing headers for ue_project
Running Internal UnrealHeaderTool E:\egor\github\language-model-dialog\ue_project\ue_project.uproject E:\egor\github\language-model-dialog\ue_project\Intermediate\Build\Win64\ue_project\DebugGame\ue_project.uhtmanifest -WarningsAsErrors -installed
Step - Read Manifest File
Step - Prepare Modules
Step - Prepare Headers
Step - Parse Headers
E:\egor\github\language-model-dialog\ue_project\Source\ue_project\Public\MainCharacter.h(12): Warning: The identifier 'GENERATED_BODY' was detected in a block being skipped. Was this intentional?
Total of 0 written
CompilationResultException: Error: OtherCompilationError
at UnrealBuildTool.ExternalExecution.ExecuteInternalHeaderToolIfNecessary(BuildConfiguration BuildConfiguration, FileReference ProjectFile, TargetMakefile Makefile, String TargetName, ISourceFileWorkingSet WorkingSet, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\ExternalExecution.cs:line 1421
at UnrealBuildTool.ExternalExecution.ExecuteHeaderToolIfNecessary(BuildConfiguration BuildConfiguration, FileReference ProjectFile, TargetMakefile Makefile, String TargetName, ISourceFileWorkingSet WorkingSet, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\ExternalExecution.cs:line 966
at UnrealBuildTool.UEBuildTarget.Build(BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, TargetDescriptor TargetDescriptor, ILogger Logger, Boolean bInitOnly) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 1930
at UnrealBuildTool.BuildMode.CreateMakefile(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, ISourceFileWorkingSet WorkingSet, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 757
at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile, ILogger Logger, Boolean bSkipPreBuildTargets) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 275
at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 242
at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 648
WriteFileIfChanged() wrote 0 changed files of 0 requested writes.
Timeline:

[ 0.000]
0.000
[ 6.065]
PLZ help, i write course work with this plugin

Error: Json Value of type 'Null' used as a 'Array' (or 'Object')

My blueprint is built like this and it's getting some errors. I don't know how to fix it, because I can't find which line they are reporting the error on.

image

Log
`
....
LogTemp: Warning: {"id":"----------------","object":"text_completion","created":1678339481,"model":"davinci","choices":[{"text":" I watched .\n","index":0,"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":31,"completion_tokens":6,"total_tokens":37}}

LogJson: Warning: Field logprobs is of the wrong type.

LogJson: Error: Json Value of type 'Null' used as a 'Object'.

LogJson: Warning: Field logprobs is of the wrong type.

LogJson: Error: Json Value of type 'Null' used as a 'Object'.

LogJson: Warning: Field tokens was not found.

LogJson: Error: Json Value of type 'Null' used as a 'Array'.

LogJson: Warning: Field token_logprobs was not found.

LogJson: Error: Json Value of type 'Null' used as a 'Array'.

LogJson: Warning: Field text_offset was not found.

LogJson: Error: Json Value of type 'Null' used as a 'Array'.

LogBlueprintUserMessages: [Char_C_0] I watched .

....
`

Whisper parameter

Hey. First of all very nice work on the new whisper feature. Unfortunately you can only input the audio file to the whisper api. But the api reference has several other very useful inputs, such as the language and the prompt inputs. Do you have any plans to add them in the future? The prompt feature is really useful to specify certain words like the spelling of unusual names or invented words. It can also be use as a way to specify the language the model is about to heard to correctly transcribe ( a problem that can occur when the speaker has an accent).
Anyway thank you again for your great work. BTW I'm still trying for that stream feature but I guess I'm not good enough in c++ for that 😅 (not giving up though)

Issue compiling plugin with 5.1.1

I'm having issues compiling the 5.1.1 binary in Visual Studio 2022 after adding a C++ class. The build fails with these errors:

\Plugins\OpenAIApi\Source\OpenAIAPI\Public\OpenAICallGPT.h(36): error : Unable to find 'class', 'delegate', 'enum', or 'struct' with name 'EOAEngineType'

\Plugins\OpenAIApi\Source\OpenAIAPI\Public\OpenAICallGPT.h(36): error : Unable to find 'class', 'delegate', 'enum', or 'struct' with name 'FGPT3Settings'

Thank you for the plugin, it works perfectly in blueprints. Would be great to get this sorted or any pointers on how to fix.

Packaging Error in 4.27

UATHelper: Packaging (Windows (64-bit)): ERROR: Missing precompiled manifest for 'OpenAIAPI'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in OpenAIAPI.build.cs to override.
UATHelper: Packaging (Windows (64-bit)): Took 0.9622388s to run UnrealBuildTool.exe, ExitCode=6
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool failed. See log for more details. (C:\Users\dougl\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Program+Files+(x86)+UE_4.27\UBT-HoloGPT-Win64-Development.txt)
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=6 (6)
PackagingResults: Error: Missing precompiled manifest for 'OpenAIAPI'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in OpenAIAPI.build.cs to override.
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

I am currently concluding a project where I implemented chat GPT into a metahuman with lip-syncing that is displayed on my looking glass portrait, however I keep reaching this error when packaging. Is there a resolution for this that has already been found, did I install the prerequisites wrong? Some help would be much appreciated. Thank you!

ChatGPT 4.0

Hello,

any chance you are updating to version 4.0?

How I can customize the content of the role to give him a background setting?

to give your NPC background information, manually add one element to your ChatLog array of type "system" and set the message to whatever you want the NPC to do. (i.e. you are a friendly NPC tasked with helping the player learn about x).

I'm sorry for this new issue,I don't know if you can still see it in the closed issue, so I open this new issue.

I tried to add it manually, but the AI ​​answer seems to be the default setting? Where did I go wrong?

image

image

Originally posted by @Sissidark in #31 (comment)

Any support For 5.2/.3 soon ?

i really want to test this with all the new features im alrerady testing on the current versions.
when do you think a version will be online ?

Stream Function and whisper

Hey, first of all just want to say this is an awesome plugin. I've implemented the plugin and works well. Well done on gpt4 and 3.5. Just wanted to ask if you ever plan to support the stream function in the api in the future?
And what about whisper ?
I'm already trying to implement it on my side but i'm having trouble with it. If I ever succeed, i'll make an update here.
Thank you anyway for this awesome plugin

Can't transcribe speech successfully!! ErrorMessage "failed to get 'text' field from json response"

I followed the instructions on the webpage and completed the blueprint as shown below.
I also made sure that the sound was successfully recorded.
However, after the file is recognized, it always goes in the false direction and prints out "failed to get 'text' field from json response" error message.
So I would like to ask you where I might not have set it correctly?

Thanks!!

PS. the version i use is 5.0.3

image

packaging for andriod causes errors packiging fails. please try to fix soon as we need our app working for our school project

UATHelper: Packaging (Android (ASTC)): C:/Users/julia/Documents/Unreal Projects/wellbeing_app/Plugins/OpenAI-Api-Unreal/Source/OpenAIAPI/Private/OpenAICallGPT.cpp(117,3): error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
UATHelper: Packaging (Android (ASTC)): _payloadObject->SetNumberField(TEXT("presence_penalty"), FMath::Clamp(settings.presencePenalty, 0.0f, 1.0f));
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): C:/Users/julia/Documents/Unreal Projects/wellbeing_app/Plugins/OpenAI-Api-Unreal/Source/OpenAIAPI/Private/OpenAICallGPT.cpp(115,2): note: previous statement is here
UATHelper: Packaging (Android (ASTC)): if (!(settings.logprobs == 0))
UATHelper: Packaging (Android (ASTC)): ^
UATHelper: Packaging (Android (ASTC)): 1 error generated.
UATHelper: Packaging (Android (ASTC)): Took 9.8692925s to run dotnet.exe, ExitCode=6
UATHelper: Packaging (Android (ASTC)): UnrealBuildTool failed. See log for more details. (C:\Users\julia\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.1\UBT-wellbeing_app-Android-Development.txt)
PackagingResults: Error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
UATHelper: Packaging (Android (ASTC)): AutomationTool executed for 0h 0m 13s
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Android (ASTC)): BUILD FAILED
PackagingResults: Error: Unknown Error

Filename path in OpenAICallTranscriptions.h

BPNode->fileName = fileName + ".wav";
FString relativePath = FPaths::ConvertRelativePathToFull(FPaths::ProjectSavedDir() + "BouncedWavFiles/" + fileName);

its forcing users to use folder ProjectSavedDir() + "BouncedWavFiles/"

would FString absolutePath = fileName; fix my issue?

Field logprobs ERROR

Hi! I try to put this GPT-3 plug work with Unreal 5.1. In my Output Log giving errors:
LogVoiceCapture: Warning: Resetting UncompressedAudioBuffer.
LogJson: Warning: Field logprobs is of the wrong type.
LogJson: Error: Json Value of type 'Null' used as a 'Object'.
LogJson: Warning: Field tokens was not found.
LogJson: Error: Json Value of type 'Null' used as a 'Array'.
LogJson: Warning: Field token_logprobs was not found.
LogJson: Error: Json Value of type 'Null' used as a 'Array'.
LogJson: Warning: Field text_offset was not found.
LogJson: Error: Json Value of type 'Null' used as a 'Array'.

I have an Array variable - where inside is inside Index 0 = Human:

Can someone tell me what I should fix?

iOS supported?

hi, thanks your great project.

could support for iOS?

Package project not opening

I package the project and it packaged successfully but when I try to open the .exe file then this error is coming. Do I need to include plugin file during package or anything else. Please any solution

Package

Cant Compile plugin with 4.27

Trying to compile the binaries of the 4.27 plugin with visual studio, getting a bunch of linker problems such as:

Error Unrecognized type 'EOAEngineType' - type must be a UCLASS, USTRUCT or UENUM OBT OpenAICallGPT.h 36

probably has to do with the redirs from DefaultOpenAIAPI.ini not working correctly.
The prebuilt 4.27 plugin doesnt not have the whisper functions exposed to BP's.
(Although, the plugin should preferably be able to compile from source)

Thanks for the plugin btw, only one out there that tries to combine all the OpenAI API's in one.

Packaging Errors

Hi, I left this comment on the YT video also, but packaging the openAI plugin is throwing errors:

This works great in unreal editor in 5, but when I come to package it as a windows build, it is throwing a series of errors. It also may not be relevant, but I note in your readme, you mention using an environment variable for API key, but I couldn't get this to work anyway. I am setting API key as a string variable which works fine for me.

Any idea why unreal would be throwing issues with your openAI BPs? I thought it might be due to variable names/structures, but changing variable names didn't fix the issue.

(I set this up clean in a new UE5 prject also and getting the same errors a second time)

UATHelper: Cooking (Windows): LogInit: Display: LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/BP_OpenAI.BP_OpenAI_C:Finished_4DC25A1040D51A1DC2008AAEC26436FA:completions.completions'. Unknown structure.
UATHelper: Cooking (Windows): LogInit: Display: LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/BP_OpenAI.BP_OpenAI_C:Finished_4DC25A1040D51A1DC2008AAEC26436FA:completionInfo'. Unknown structure.
UATHelper: Cooking (Windows): LogInit: Display: LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/BP_OpenAI.BP_OpenAI_C:ExecuteUbergraph_BP_OpenAI:K2Node_CustomEvent_completions.K2Node_CustomEvent_completions'. Unknown structure.
UATHelper: Cooking (Windows): LogInit: Display: LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/BP_OpenAI.BP_OpenAI_C:ExecuteUbergraph_BP_OpenAI:K2Node_CustomEvent_completionInfo'. Unknown structure.
UATHelper: Cooking (Windows): LogInit: Display: LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/BP_OpenAI.BP_OpenAI_C:ExecuteUbergraph_BP_OpenAI:Temp_struct_Variable'. Unknown structure.
UATHelper: Cooking (Windows): LogInit: Display: LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/BP_OpenAI.BP_OpenAI_C:ExecuteUbergraph_BP_OpenAI:Temp_struct_Variable_1.Temp_struct_Variable_1'. Unknown structure.
UATHelper: Cooking (Windows): LogInit: Display: LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/BP_OpenAI.BP_OpenAI_C:ExecuteUbergraph_BP_OpenAI:CallFunc_Array_Get_Item'. Unknown structure.
UATHelper: Cooking (Windows): LogInit: Display: LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/BP_OpenAI.BP_OpenAI_C:ExecuteUbergraph_BP_OpenAI:K2Node_MakeStruct_GPT3Settings'. Unknown structure.
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: ProxyFactoryClass null in K2Node_AsyncAction /Game/BP_OpenAI.BP_OpenAI:EventGraph.K2Node_AsyncAction_0. Was a class deleted or saved on a non promoted build?
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] BaseAsyncTask: Missing function OpenAICallGPT3 from class Unknown Class for async task Async Task: Missing Function from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] In use pin Completions no longer exists on node Async Task: Missing Function . Please refresh node or break links to remove pin. from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] In use pin Error Message no longer exists on node Async Task: Missing Function . Please refresh node or break links to remove pin. from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] In use pin Success no longer exists on node Async Task: Missing Function . Please refresh node or break links to remove pin. from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] In use pin Prompt no longer exists on node Async Task: Missing Function . Please refresh node or break links to remove pin. from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] In use pin Settings no longer exists on node Async Task: Missing Function . Please refresh node or break links to remove pin. from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] In use pin GPT3Settings no longer exists on node Make . Please refresh node or break links to remove pin. from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] In use pin Max Tokens no longer exists on node Make . Please refresh node or break links to remove pin. from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] In use pin Temperature no longer exists on node Make . Please refresh node or break links to remove pin. from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] No Struct in Make from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] In use pin no longer exists on node Set Open AIApi Key . Please refresh node or break links to remove pin. from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] Could not find a function named "setOpenAIApiKey" in 'BP_OpenAI'.
UATHelper: Cooking (Windows): Make sure 'BP_OpenAI' has been compiled for Set Open AIApi Key from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] Could not find a function named "OpenAICallGPT3" in 'BP_OpenAI'.
UATHelper: Cooking (Windows): Make sure 'BP_OpenAI' has been compiled for Async Task: Missing Function from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI.uasset: [Compiler] Unexpected node type K2Node_AsyncAction encountered at Async Task: Missing Function from Source: /Game/BP_OpenAI.BP_OpenAI
UATHelper: Cooking (Windows): LogInit: Display: LogBlueprint: Error: [AssetLog] E:\UnreaEngine5\OpenAI5Test\Content\BP_OpenAI

Asking questions in Chinese often fails.

Hello friend, I have a very strange problem. When I ask the question in English, it goes well. But when I ask the question in Chinese, it hardly returns results.

API_BUG_CHINA

API_BUG_ENG
](url)

Stop Sequences may not be functioning as desired

The Plugin seems to be failing to send stop sequences.

The completions seem to ignore them.

I have the impression that stop sequences are not working properly because the parameter is looking for up to 4 stop sequences in an array of strings, rather than a string.

stop = ["\n", "\n\n"]

and the plugin seems to be using a string in the settings

Plugin Could not be compiled.

Hi.
Thank you for your great work.

When I install the plug-in and try to run the project file again, I get the following message, how can I fix it?
UE version is 5.1.1. now

2023-04-11 10 38 23

2023-04-11 10 47 25

Compatible with azure openai api?

This plugin is really helpful, good work!
Just wondering, is it possible to add support for azure openai api support?
There are additional parameters to set before using it.
According to below doc, 'base', 'type', 'version' is new, and keyboard input would be allowed for model-name (deployment-name) ?
https://learn.microsoft.com/en-us/azure/ai-services/openai/quickstart?tabs=command-line&pivots=programming-language-python#create-a-new-python-application

Thanks a lot!

loading error on macOS

Hi! I’m trying to install your plugin (OPEN API AI ) on my Mac but I give some loading errors:

The following modules are missing or built with a different engine version.

or

Engine modules cannot be compiled at runtime. Please build through your IDE.

It works in general on macOS? I’m using the 4.26.2 version of UE.

Thx for your time!

Error: Json Value of type 'Null' used as a 'Number'

LogJson: Warning: Field index was not found.
LogJson: Error: Json Value of type 'Null' used as a 'Number'.

image
image
image

So what went wrong?
At the same time, if I want to set it as an npc in the game, I want to know how I can customize the content of the role to give him a background setting.

Missing gpt3 widget on Mac M1

Hi, im new on UE and i try to make a metahuman reply with metahumansdk and Openai, on Mac M1, i installed the plugin in the project plugin folder, as a tutorial from Metahumansdk, they also send me the map, but even if the plugin is loaded, i don't have the option to create the gp3 widget, any help? thank you!

4.27 error

i downloaded the 4.27 from drive but when i open the project this happen "the 'OpenAIAPI' plugin was designed for build 4.26 load it any way?"

Missing Function and node

Hi there ! I was following the tutorial by MetaHumanSDK for integrating Chat GPT to a metahuman.
For some reason I'm missing the "Open AICall GPT3" function and nodes. I tried reinstalling the plugin, created new project (5.1.1).. still missing them. Everything shows up as it should except these functions and nodes. Can you assist with that please?

Also what I'm trying to do is not text to speech as the tutorial shows, but whisper/audio to speech. Basically talking to the metahuman and he talking back to me. Possible to get any help on that too ? I will strongly appreciate it.
I'm just playing around with these new technologies.
Thanks.

request error ( unreal console print message )

LogHttp: Warning: 0000084D47A5FA00: invalid HTTP response code received. URL: https://api.openai.com/v1/engines/text-davinci-003/completions, HTTP code: 0, content length: 0, actual payload size: 0
LogHttp: Warning: 0000084D47A5FA00: request failed, libcurl error: 28 (Timeout was reached)
LogHttp: Warning: 0000084D47A5FA00: libcurl info message cache 0 ( Trying 199.59.150.39:443...)
LogHttp: Warning: 0000084D47A5FA00: libcurl info message cache 1 (connect to 199.59.150.39 port 443 failed: Timed out)
LogHttp: Warning: 0000084D47A5FA00: libcurl info message cache 2 (Failed to connect to api.openai.com port 443 after 21043 ms: Timed out)
LogHttp: Warning: 0000084D47A5FA00: libcurl info message cache 3 (Closing connection 24)
LogTemp: Warning: Error processing request.

New feature of the API

Hi! Thanks for developing this great plugin!
There are some useful features in GPT-3.5-Turbo, like chat conversation. Will these methods be added to this plugin? Thank you in advance for the answer!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.