Unreal OpenAI API 1.0.0
EmbeddingTypes.h
1// OpenAI, Copyright LifeEXE. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Provider/OpenAIOptional.h"
7#include "EmbeddingTypes.generated.h"
8
9UENUM(BlueprintType)
10enum class EEmbeddingsEncodingFormat : uint8
11{
12 Float,
13 Base64
14};
15
17// REQUEST TYPES
19
20USTRUCT(BlueprintType)
22{
23 GENERATED_BODY()
24
25
32 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Required")
33 TArray<FString> Input;
34
39 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Required")
40 FString Model;
41
45 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
46 FString Encoding_Format{"float"};
47
52 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
53 FOptionalInt Dimensions;
54
58 UPROPERTY(BlueprintReadWrite, Category = "OpenAI | Optional")
60};
61
63// RESPONSE TYPES
65
66USTRUCT(BlueprintType)
68{
69 GENERATED_BODY()
70
71 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
72 int32 Prompt_Tokens{};
73
74 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
75 int32 Total_Tokens{};
76};
77
78USTRUCT(BlueprintType)
80{
81 GENERATED_BODY()
82
83
86 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
87 int32 Index{};
88
93 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
94 TArray<float> Embedding;
95
99 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
100 FString Object;
101};
102
103USTRUCT(BlueprintType)
105{
106 GENERATED_BODY()
107
108 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
109 FString Object;
110
111 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
112 TArray<FEmbeddingsData> Data;
113
114 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
115 FString Model;
116
117 UPROPERTY(BlueprintReadOnly, Category = "OpenAI")
118 FEmbeddingsUsage Usage;
119};
Definition: OpenAI.Build.cs:6
Definition: EmbeddingTypes.h:80
Definition: EmbeddingTypes.h:22
Definition: EmbeddingTypes.h:105
Definition: EmbeddingTypes.h:68
Definition: OpenAIOptional.h:34
Definition: OpenAIOptional.h:10