Unreal OpenAI API 1.0.0
CreateFineTuningJobAction.h
1// OpenAI, Copyright LifeEXE. All Rights Reserved.
2
3#pragma once
4
5#include "Kismet/BlueprintAsyncActionBase.h"
6#include "Provider/Types/FineTuneTypes.h"
7#include "Provider/Types/CommonTypes.h"
8#include "CreateFineTuningJobAction.generated.h"
9
10DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnCreateFineTuningJob, const FFineTuningJobObjectResponse&, Response,
11 const FOpenAIResponseMetadata&, ResponseMetadata, const FOpenAIError&, RawError);
12
13class UOpenAIProvider;
14
15UCLASS()
16class UCreateFineTuningJobAction : public UBlueprintAsyncActionBase
17{
18 GENERATED_BODY()
19
20public:
21 UPROPERTY(BlueprintAssignable)
22 FOnCreateFineTuningJob OnCompleted;
23
24 virtual void Activate() override;
25
26private:
31 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "OpenAI | FineTunes")
33 const FFineTuningJob& FineTuningJob, const FOpenAIAuth& Auth, const FString& URLOverride);
34
35 void TryToOverrideURL(UOpenAIProvider* Provider);
36
37 void OnCreateFineTuningJobCompleted(const FFineTuningJobObjectResponse& Response, const FOpenAIResponseMetadata& ResponseMetadata);
38 void OnRequestError(const FString& URL, const FString& Content);
39
40private:
41 FFineTuningJob FineTuningJob;
42 FOpenAIAuth Auth;
43 FString URLOverride{};
44};
Definition: CreateFineTuningJobAction.h:17
Definition: OpenAIProvider.h:45
void CreateFineTuningJob(const FFineTuningJob &FineTuningJob, const FOpenAIAuth &Auth)
Definition: OpenAIProvider.cpp:276
Definition: FineTuneTypes.h:103
Definition: FineTuneTypes.h:246
Definition: CommonTypes.h:11
Definition: CommonTypes.h:28
Definition: CommonTypes.h:49