Unreal OpenAI API 1.0.0
FileSystemFuncLib.h
1// OpenAI Sample, Copyright LifeEXE. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Kismet/BlueprintFunctionLibrary.h"
7#include "Provider/Types/CommonTypes.h"
8#include "FileSystemFuncLib.generated.h"
9
10UENUM(BlueprintType)
11enum class EFileType : uint8
12{
13 Image,
14 Media
15};
16
17UCLASS()
18class OPENAI_API UFileSystemFuncLib : public UBlueprintFunctionLibrary
19{
20 GENERATED_BODY()
21
22public:
23 UFUNCTION(BlueprintCallable, Category = "FileSystem")
24 static bool OpenFile(const FString& FileExtensions, TArray<FString>& OutFileNames);
25
26 UFUNCTION(BlueprintCallable, Category = "FileSystem")
27 static bool SaveImageToFile(UTexture2D* Texture);
28
29 UFUNCTION(BlueprintPure, Category = "FileSystem")
30 static FString GetFileExtensions(EFileType FileType);
31
32 UFUNCTION(BlueprintPure, Category = "FileSystem")
33 static bool SaveChatHistoryToFile(const TArray<FMessage>& History, const FString& ModelName, const FString& FilePath);
34};
Definition: FileSystemFuncLib.h:19