34 virtual ~IAPI() =
default;
35 virtual FString BaseURL()
const = 0;
37 virtual FString Models()
const = 0;
38 virtual FString Completion()
const = 0;
39 virtual FString ChatCompletion()
const = 0;
40 virtual FString ImageGenerations()
const = 0;
41 virtual FString ImageEdits()
const = 0;
42 virtual FString ImageVariations()
const = 0;
43 virtual FString Embeddings()
const = 0;
44 virtual FString Speech()
const = 0;
45 virtual FString AudioTranscriptions()
const = 0;
46 virtual FString AudioTranslations()
const = 0;
47 virtual FString Files()
const = 0;
48 virtual FString FineTuningJobs()
const = 0;
49 virtual FString Moderations()
const = 0;
50 virtual FString Batches()
const = 0;
51 virtual FString Uploads()
const = 0;
52 virtual FString Assistants()
const = 0;
60 OpenAIAPI(
const FString& BaseURL =
"https://api.openai.com") : API_URL(BaseURL) {}
61 virtual FString BaseURL()
const override {
return API_URL; }
63 virtual FString Models()
const override {
return API_URL +
"/v1/models"; }
64 virtual FString Completion()
const override {
return API_URL +
"/v1/completions"; }
65 virtual FString ChatCompletion()
const override {
return API_URL +
"/v1/chat/completions"; }
66 virtual FString ImageGenerations()
const override {
return API_URL +
"/v1/images/generations"; }
67 virtual FString ImageEdits()
const override {
return API_URL +
"/v1/images/edits"; }
68 virtual FString ImageVariations()
const override {
return API_URL +
"/v1/images/variations"; }
69 virtual FString Embeddings()
const override {
return API_URL +
"/v1/embeddings"; }
70 virtual FString Speech()
const override {
return API_URL +
"/v1/audio/speech"; }
71 virtual FString AudioTranscriptions()
const override {
return API_URL +
"/v1/audio/transcriptions"; }
72 virtual FString AudioTranslations()
const override {
return API_URL +
"/v1/audio/translations"; }
73 virtual FString Files()
const override {
return API_URL +
"/v1/files"; }
74 virtual FString FineTuningJobs()
const override {
return API_URL +
"/v1/fine_tuning/jobs"; }
75 virtual FString Moderations()
const override {
return API_URL +
"/v1/moderations"; }
76 virtual FString Batches()
const override {
return API_URL +
"/v1/batches"; }
77 virtual FString Uploads()
const override {
return API_URL +
"/v1/uploads"; }
78 virtual FString Assistants()
const override {
return API_URL +
"/v1/assistants"; }
81 const FString API_URL;
89 FString ChatCompletions;
90 FString ImageGenerations;
92 FString ImageVariations;
95 FString AudioTranscriptions;
96 FString AudioTranslations;
98 FString FineTuningJobs;
110 virtual FString Models()
const override {
return OpenAIEndpoints.Models; }
111 virtual FString Completion()
const override {
return OpenAIEndpoints.Completions; }
112 virtual FString ChatCompletion()
const override {
return OpenAIEndpoints.ChatCompletions; }
113 virtual FString ImageGenerations()
const override {
return OpenAIEndpoints.ImageGenerations; }
114 virtual FString ImageEdits()
const override {
return OpenAIEndpoints.ImageEdits; }
115 virtual FString ImageVariations()
const override {
return OpenAIEndpoints.ImageVariations; }
116 virtual FString Embeddings()
const override {
return OpenAIEndpoints.Embeddings; }
117 virtual FString Speech()
const override {
return OpenAIEndpoints.Speech; }
118 virtual FString AudioTranscriptions()
const override {
return OpenAIEndpoints.AudioTranscriptions; }
119 virtual FString AudioTranslations()
const override {
return OpenAIEndpoints.AudioTranslations; }
120 virtual FString Files()
const override {
return OpenAIEndpoints.Files; }
121 virtual FString FineTuningJobs()
const override {
return OpenAIEndpoints.FineTuningJobs; }
122 virtual FString Moderations()
const override {
return OpenAIEndpoints.Moderations; }
123 virtual FString Batches()
const override {
return OpenAIEndpoints.Batches; }
124 virtual FString Uploads()
const override {
return OpenAIEndpoints.Uploads; }
125 virtual FString Assistants()
const override {
return OpenAIEndpoints.Assistants; }
129 const FString API_URL;
131 virtual FString BaseURL()
const override {
return {}; }
Definition: OpenAI.Build.cs:6