Unreal OpenAI API 1.0.0
Delegates.h
1// OpenAI, Copyright LifeEXE. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Provider/Types/AllTypesHeader.h"
7
8// ============================ C++ delegates ============================
9// common
10DECLARE_MULTICAST_DELEGATE_TwoParams(FOnRequestCompleted, const FString& /* URL */, const FString& /* Response content */);
11DECLARE_MULTICAST_DELEGATE_TwoParams(FOnRequestProgresses, const FString& /* URL */, const FString& /* Response content */);
12DECLARE_MULTICAST_DELEGATE_TwoParams(FOnRequestError, const FString& /* URL */, const FString& /* Response content */);
13// models
14DECLARE_MULTICAST_DELEGATE_TwoParams(FOnListModelsCompleted, const FListModelsResponse&, const FOpenAIResponseMetadata&);
15DECLARE_MULTICAST_DELEGATE_TwoParams(FOnRetrieveModelCompleted, const FRetrieveModelResponse&, const FOpenAIResponseMetadata&);
16DECLARE_MULTICAST_DELEGATE_TwoParams(
17 FOnDeleteFineTunedModelCompleted, const FDeleteFineTunedModelResponse&, const FOpenAIResponseMetadata&);
18// chat
19DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateCompletionCompleted, const FCompletionResponse&, const FOpenAIResponseMetadata&);
20DECLARE_MULTICAST_DELEGATE_TwoParams(
21 FOnCreateCompletionStreamCompleted, const TArray<FCompletionStreamResponse>&, const FOpenAIResponseMetadata&);
22using FOnCreateCompletionStreamProgresses = FOnCreateCompletionStreamCompleted;
23DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateChatCompletionCompleted, const FChatCompletionResponse&, const FOpenAIResponseMetadata&);
24DECLARE_MULTICAST_DELEGATE_TwoParams(
25 FOnCreateChatCompletionStreamCompleted, const TArray<FChatCompletionStreamResponse>&, const FOpenAIResponseMetadata&);
26using FOnCreateChatCompletionStreamProgresses = FOnCreateChatCompletionStreamCompleted;
27// images
28DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateImageCompleted, const FImageResponse&, const FOpenAIResponseMetadata&);
29DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateImageEditCompleted, const FImageEditResponse&, const FOpenAIResponseMetadata&);
30DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateImageVariationCompleted, const FImageVariationResponse&, const FOpenAIResponseMetadata&);
31// embeddings
32DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateEmbeddingsCompleted, const FEmbeddingsResponse&, const FOpenAIResponseMetadata&);
33// audio + speech
34DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateSpeechCompleted, const FSpeechResponse&, const FOpenAIResponseMetadata&);
35DECLARE_MULTICAST_DELEGATE_TwoParams(
36 FOnCreateAudioTranscriptionCompleted, const FAudioTranscriptionResponse&, const FOpenAIResponseMetadata&);
37DECLARE_MULTICAST_DELEGATE_TwoParams(
38 FOnCreateAudioTranscriptionVerboseCompleted, const FAudioTranscriptionVerboseResponse&, const FOpenAIResponseMetadata&);
39DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateAudioTranslationCompleted, const FAudioTranslationResponse&, const FOpenAIResponseMetadata&);
40// files
41DECLARE_MULTICAST_DELEGATE_TwoParams(FOnListFilesCompleted, const FListFilesResponse&, const FOpenAIResponseMetadata&);
42DECLARE_MULTICAST_DELEGATE_TwoParams(FOnUploadFileCompleted, const FUploadFileResponse&, const FOpenAIResponseMetadata&);
43DECLARE_MULTICAST_DELEGATE_TwoParams(FOnDeleteFileCompleted, const FDeleteFileResponse&, const FOpenAIResponseMetadata&);
44DECLARE_MULTICAST_DELEGATE_TwoParams(FOnRetrieveFileCompleted, const FRetrieveFileResponse&, const FOpenAIResponseMetadata&);
45DECLARE_MULTICAST_DELEGATE_TwoParams(FOnRetrieveFileContentCompleted, const FRetrieveFileContentResponse&, const FOpenAIResponseMetadata&);
46// fine tunes
47DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateFineTuningJobCompleted, const FFineTuningJobObjectResponse&, const FOpenAIResponseMetadata&);
48DECLARE_MULTICAST_DELEGATE_TwoParams(FOnListFineTuningJobsCompleted, const FListFineTuningJobsResponse&, const FOpenAIResponseMetadata&);
49DECLARE_MULTICAST_DELEGATE_TwoParams(
50 FOnListFineTuningEventsCompleted, const FListFineTuningEventsResponse&, const FOpenAIResponseMetadata&);
51DECLARE_MULTICAST_DELEGATE_TwoParams(
52 FOnListFineTuningCheckpointsCompleted, const FListFineTuningCheckpointsResponse&, const FOpenAIResponseMetadata&);
53DECLARE_MULTICAST_DELEGATE_TwoParams(
54 FOnRetrieveFineTuningJobCompleted, const FFineTuningJobObjectResponse&, const FOpenAIResponseMetadata&);
55DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCancelFineTuningJobCompleted, const FFineTuningJobObjectResponse&, const FOpenAIResponseMetadata&);
56// moderations
57DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateModerationsCompleted, const FModerationsResponse&, const FOpenAIResponseMetadata&);
58// batches
59DECLARE_MULTICAST_DELEGATE_TwoParams(FOnListBatchCompleted, const FListBatchResponse&, const FOpenAIResponseMetadata&);
60DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateBatchCompleted, const FCreateBatchResponse&, const FOpenAIResponseMetadata&);
61DECLARE_MULTICAST_DELEGATE_TwoParams(FOnRetrieveBatchCompleted, const FRetrieveBatchResponse&, const FOpenAIResponseMetadata&);
62DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCancelBatchCompleted, const FCancelBatchResponse&, const FOpenAIResponseMetadata&);
63// uploads
64DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateUploadCompleted, const FUploadObjectResponse&, const FOpenAIResponseMetadata&);
65DECLARE_MULTICAST_DELEGATE_TwoParams(FOnAddUploadPartCompleted, const FUploadPartObjectResponse&, const FOpenAIResponseMetadata&);
66DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCompleteUploadCompleted, const FUploadObjectResponse&, const FOpenAIResponseMetadata&);
67DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCancelUploadCompleted, const FUploadObjectResponse&, const FOpenAIResponseMetadata&);
68// assistants
69DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCreateAssistantCompleted, const FAssistantObjectResponse&, const FOpenAIResponseMetadata&);
70DECLARE_MULTICAST_DELEGATE_TwoParams(FOnListAssistantsCompleted, const FListAssistantsResponse&, const FOpenAIResponseMetadata&);
71DECLARE_MULTICAST_DELEGATE_TwoParams(FOnRetrieveAssistantCompleted, const FAssistantObjectResponse&, const FOpenAIResponseMetadata&);
72DECLARE_MULTICAST_DELEGATE_TwoParams(FOnModifyAssistantCompleted, const FAssistantObjectResponse&, const FOpenAIResponseMetadata&);
73DECLARE_MULTICAST_DELEGATE_TwoParams(FOnDeleteAssistantCompleted, const FDeleteAssistantResponse&, const FOpenAIResponseMetadata&);
Definition: AssistantTypes.h:207
Definition: AudioTypes.h:177
Definition: AudioTypes.h:280
Definition: AudioTypes.h:316
Definition: BatchTypes.h:317
Definition: ChatCompletionTypes.h:104
Definition: CompletionTypes.h:252
Definition: BatchTypes.h:305
Definition: AssistantTypes.h:189
Definition: FileTypes.h:137
Definition: ModelTypes.h:146
Definition: EmbeddingTypes.h:105
Definition: FineTuneTypes.h:246
Definition: ImageTypes.h:273
Definition: ImageTypes.h:261
Definition: ImageTypes.h:279
Definition: AssistantTypes.h:300
Definition: BatchTypes.h:323
Definition: FileTypes.h:119
Definition: FineTuneTypes.h:491
Definition: FineTuneTypes.h:476
Definition: FineTuneTypes.h:461
Definition: ModelTypes.h:128
Definition: ModerationTypes.h:150
Definition: CommonTypes.h:49
Definition: BatchTypes.h:311
Definition: FileTypes.h:158
Definition: FileTypes.h:152
Definition: ModelTypes.h:140
Definition: AudioTypes.h:325
Definition: FileTypes.h:131
Definition: UploadTypes.h:96
Definition: UploadTypes.h:159