Unreal OpenAI API 1.0.0
AudioTranscriptionVerboseAction.h
1// OpenAI, Copyright LifeEXE. All Rights Reserved.
2
3#pragma once
4
5#include "Kismet/BlueprintAsyncActionBase.h"
6#include "Provider/Types/AudioTypes.h"
7#include "Provider/Types/CommonTypes.h"
8#include "AudioTranscriptionVerboseAction.generated.h"
9
10DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnAudioTranscriptionVerbose, const FAudioTranscriptionVerboseResponse&, Response,
11 const FOpenAIResponseMetadata&, ResponseMetadata, const FOpenAIError&, RawError);
12
13class UOpenAIProvider;
14
15UCLASS()
16class UAudioTranscriptionVerboseAction : public UBlueprintAsyncActionBase
17{
18 GENERATED_BODY()
19
20public:
21 UPROPERTY(BlueprintAssignable)
22 FOnAudioTranscriptionVerbose OnCompleted;
23
24 virtual void Activate() override;
25
26private:
31 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "OpenAI | Audio")
32 static UAudioTranscriptionVerboseAction* CreateAudioTranscriptionVerbose(
33 const FAudioTranscription& AudioTranscription, const FOpenAIAuth& Auth, const FString& URLOverride);
34
35 void TryToOverrideURL();
36
37 void OnCreateAudioTranscriptionVerboseCompleted(
38 const FAudioTranscriptionVerboseResponse& Response, const FOpenAIResponseMetadata& ResponseMetadata);
39 void OnRequestError(const FString& URL, const FString& Content);
40
41private:
42 UPROPERTY()
43 TObjectPtr<UOpenAIProvider> Provider;
44
45 FAudioTranscription AudioTranscription;
46 FOpenAIAuth Auth;
47 FString URLOverride{};
48};
Definition: AudioTranscriptionVerboseAction.h:17
Definition: OpenAIProvider.h:45
Definition: AudioTypes.h:103
Definition: AudioTypes.h:280
Definition: CommonTypes.h:11
Definition: CommonTypes.h:28
Definition: CommonTypes.h:49