Unreal OpenAI API 1.0.0
CompletionTypes.h
1// OpenAI, Copyright LifeEXE. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Provider/Types/CommonTypes.h"
7#include "Provider/Types/Chat/ChatTypesHeader.h"
8#include "CompletionTypes.generated.h"
9
11// REQUEST TYPES
13
14USTRUCT(BlueprintType)
16{
17 GENERATED_BODY()
18
19
24 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Required")
25 FString Model;
26
34 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
35 FString Prompt;
36
40 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
41 FString Suffix;
42
47 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
48 int32 Max_Tokens{16};
49
55 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
56 float Temperature{1.0f};
57
64 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
65 float Top_P{1.0f};
66
73 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
74 int32 N{1};
75
81 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
82 bool Stream{false};
83
91 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
92 int32 Logprobs{0};
93
97 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
98 bool Echo{false};
99
108 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
109 float Presence_Penalty{0.0f};
110
119 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
120 float Frequency_Penalty{0.0f};
121
132 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
133 int32 Best_Of{1};
134
146 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
147 TMap<FString, int32> Logit_Bias;
148
152 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
153 FString User;
154
158 // UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
159 // TArray<FString> Stop;
160};
161
163// RESPONSE TYPES
165
166USTRUCT(BlueprintType)
168{
169 GENERATED_BODY()
170
171 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
172 TArray<int32> Text_Offset;
173
174 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
175 TArray<double> Token_Logprobs;
176
177 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
178 TArray<FString> Tokens;
179
180 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
181 FString Top_Logprobs{};
182};
183
184USTRUCT(BlueprintType)
186{
187 GENERATED_BODY()
188
189 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
190 FString Text{};
191
192 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
193 int32 Index{};
194};
195
196USTRUCT(BlueprintType)
197struct FChoice : public FBaseChoice
198{
199 GENERATED_BODY()
200
201 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
202 FCompletionLogProbs LogProbs;
203
210 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
211 FString Finish_Reason{};
212};
213
214USTRUCT(BlueprintType)
216{
217 GENERATED_BODY()
218
219
222 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
223 FString ID{};
224
228 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
229 TArray<FChoice> Choices;
230
234 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
235 int32 Created{};
236
240 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
241 FString Model{};
242
246 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
247 FString Object{};
248};
249
250USTRUCT(BlueprintType)
252{
253 GENERATED_BODY()
254
255
258 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
260};
261
262USTRUCT(BlueprintType)
264{
265 GENERATED_BODY()
266};
Definition: OpenAI.Build.cs:6
Definition: CompletionTypes.h:186
Definition: CompletionTypes.h:198
Definition: CompletionTypes.h:16
Definition: CompletionTypes.h:168
Definition: CompletionTypes.h:216
Definition: CompletionTypes.h:252
Definition: CompletionTypes.h:264
Definition: ChatCompletionTypes.h:86