Unreal OpenAI API 1.0.0
FineTuneTypes.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/OpenAIOptional.h"
8#include "FineTuneTypes.generated.h"
9
11// REQUEST TYPES
13
14USTRUCT(BlueprintType)
16{
17 GENERATED_BODY()
18
19
24 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
25 FString Batch_Size{"auto"};
26
31 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
32 FString Learning_Rate_Multiplier{"auto"};
33
38 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
39 FString N_Epochs{"auto"};
40};
41
42USTRUCT(BlueprintType)
43struct FWandb
44{
45 GENERATED_BODY()
46
47
50 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Required")
51 FString Project;
52
57 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
58 FString Name;
59
66 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
67 FString Entity;
68
75 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
76 TArray<FString> Tags;
77};
78
79USTRUCT(BlueprintType)
81{
82 GENERATED_BODY()
83
84
87 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Required")
88 FString Type{"wandb"};
89
97 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Required")
98 FWandb Wandb;
99};
100
101USTRUCT(BlueprintType)
103{
104 GENERATED_BODY()
105
106
110 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Required")
111 FString Model;
112
122 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Required")
123 FString Training_File;
124
128 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
130
136 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
138
147 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
148 FOptionalString Validation_File;
149
153 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
154 TArray<FIntegration> Integrations;
155
162 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
164};
165
166USTRUCT(BlueprintType)
168{
169 GENERATED_BODY()
170
171
174 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
176
180 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
182
183 FString ToQuery() const
184 {
185 FString Query{"?"};
186 if (After.IsSet)
187 {
188 Query.Append("after=").Append(After.Value).Append("&");
189 }
190
191 if (Limit.IsSet)
192 {
193 Query.Append("limit=").Append(FString::FromInt(Limit.Value)).Append("&");
194 }
195
196 return Query.LeftChop(1);
197 }
198};
199
201// RESPONSE TYPES
203
204USTRUCT(BlueprintType)
206{
207 GENERATED_BODY()
208
209
212 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
213 FString Code;
214
218 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
219 FString Message;
220
225 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
226 FString Param;
227};
228
229USTRUCT(BlueprintType)
231{
232 GENERATED_BODY()
233
234
240 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
241 FString N_Epochs;
242};
243
244USTRUCT(BlueprintType)
246{
247 GENERATED_BODY()
248
249
252 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
253 FString ID;
254
258 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
259 int32 Created_At{};
260
264 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
266
270 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
271 FString Fine_Tuned_Model;
272
277 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
278 int32 Finished_At{};
279
285 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
287
291 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
292 FString Model;
293
297 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
298 FString Object;
299
303 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
304 FString Organization_ID;
305
311 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
312 TArray<FString> Result_Files;
313
318 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
319 FString Status;
320
325 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
326 int32 Trained_Tokens{};
327
332 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
333 FString Training_File;
334
339 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
340 FString Validation_File;
341
345 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
346 TArray<FIntegration> Integrations;
347
351 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
352 int32 Seed{};
353
358 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
359 int32 Estimated_Finish{};
360};
361
362USTRUCT(BlueprintType)
364{
365 GENERATED_BODY()
366
367 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
368 FString ID;
369
370 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
371 int32 Created_At{};
372
373 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
374 FString Level;
375
376 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
377 FString Message;
378
379 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
380 FString Object;
381};
382
383USTRUCT(BlueprintType)
385{
386 GENERATED_BODY()
387
388 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
389 int32 Step{};
390
391 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
392 double Train_Loss{};
393
394 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
395 double Train_Mean_Token_Accuracy{};
396
397 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
398 double Valid_Loss{};
399
400 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
401 double Valid_Mean_Token_Accuracy{};
402
403 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
404 double Full_Valid_Loss{};
405
406 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
407 double Full_Valid_Mean_Token_Accuracy{};
408};
409
410USTRUCT(BlueprintType)
412{
413 GENERATED_BODY()
414
415
418 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
419 FString ID;
420
424 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
425 int32 Created_At{};
426
430 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
431 FString Fine_Tuned_Model_Checkpoint;
432
436 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
437 int32 Step_Number{};
438
442 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
443 FMetrics Metrics;
444
448 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
449 FString Fine_Tuning_Job_Id;
450
454 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
455 FString Object;
456};
457
458//===================
459USTRUCT(BlueprintType)
461{
462 GENERATED_BODY()
463
464 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
465 FString Object;
466
467 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
468 TArray<FFineTuningJobObjectResponse> Data;
469
470 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
471 bool Has_More{false};
472};
473
474USTRUCT(BlueprintType)
476{
477 GENERATED_BODY()
478
479 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
480 FString Object;
481
482 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
483 TArray<FFineTuningJobEventResponse> Data;
484
485 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
486 bool Has_More{false};
487};
488
489USTRUCT(BlueprintType)
491{
492 GENERATED_BODY()
493
494 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
495 FString Object;
496
497 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
498 TArray<FFineTuningJobCheckpointResponse> Data;
499
500 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
501 FString First_Id;
502
503 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
504 FString Last_id;
505
506 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
507 bool Has_More{false};
508};
Definition: OpenAI.Build.cs:6
Definition: FineTuneTypes.h:412
Definition: FineTuneTypes.h:206
Definition: FineTuneTypes.h:364
Definition: FineTuneTypes.h:103
Definition: FineTuneTypes.h:16
Definition: FineTuneTypes.h:231
Definition: FineTuneTypes.h:246
Definition: FineTuneTypes.h:168
Definition: FineTuneTypes.h:81
Definition: FineTuneTypes.h:491
Definition: FineTuneTypes.h:476
Definition: FineTuneTypes.h:461
Definition: FineTuneTypes.h:385
Definition: OpenAIOptional.h:34
Definition: OpenAIOptional.h:10
Definition: FineTuneTypes.h:44