KellanM / OpenAI-Api-Unreal

Integration for the OpenAI Api in Unreal Engine
MIT License
672 stars 150 forks source link

Stop Sequences may not be functioning as desired #2

Closed eduardohulshof closed 3 years ago

eduardohulshof commented 3 years ago

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 https://github.com/KellanM/OpenAI-Api-Unreal/blob/6b82ac6bbfe9daee9db1e9fd9adb19e459d6f226/Source/OpenAIAPI/Public/OpenAIDefinitions.h#L62

KellanM commented 3 years ago

Good catch! I solved this issue with the latest commit. You can now include up to four stop sequences and it will work as intended.