Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- AuthenticationInterceptor - Class in xyz.felh.openai
-
OkHttp Interceptor that adds an authorization token header
- AuthenticationInterceptor(String, String) - Constructor for class xyz.felh.openai.AuthenticationInterceptor
-
Constructor
B
- buildApi(String, Duration) - Static method in class xyz.felh.openai.OpenAiService
C
- cancelFineTuningJob(String) - Method in interface xyz.felh.openai.OpenAiApi
-
Immediately cancel a fine-tune job.
- cancelFineTuningJob(String) - Method in class xyz.felh.openai.OpenAiService
-
Immediately cancel a fine-tune job.
- close() - Method in class xyz.felh.openai.StreamChatCompletionListener
-
cancel eventSource
- createAudioTranscription(RequestBody) - Method in interface xyz.felh.openai.OpenAiApi
-
Create transcriptionBeta Transcribes audio into the input language.
- createAudioTranscription(CreateAudioTranscriptionRequest) - Method in class xyz.felh.openai.OpenAiService
-
whisper-1
- createAudioTranslation(RequestBody) - Method in interface xyz.felh.openai.OpenAiApi
-
Create translationBeta Translates audio into English.
- createAudioTranslation(CreateAudioTranslationRequest) - Method in class xyz.felh.openai.OpenAiService
-
whisper-1
- createChatCompletion(CreateChatCompletionRequest) - Method in interface xyz.felh.openai.OpenAiApi
-
Create chat completionBeta Creates a completion for the chat message
- createChatCompletion(CreateChatCompletionRequest) - Method in class xyz.felh.openai.OpenAiService
-
gpt-4, gpt-4-0314, gpt-4-32k, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-0301
- createCompletion(CreateCompletionRequest) - Method in interface xyz.felh.openai.OpenAiApi
-
Create completion Creates a completion for the provided prompt and parameters
- createCompletion(CreateCompletionRequest) - Method in class xyz.felh.openai.OpenAiService
-
text-davinci-003, text-davinci-002, text-curie-001, text-babbage-001, text-ada-001, davinci, curie, babbage, ada
- createEmbedding(CreateEmbeddingRequest) - Method in interface xyz.felh.openai.OpenAiApi
-
Create embeddings Creates an embedding vector representing the input text.
- createEmbeddings(CreateEmbeddingRequest) - Method in class xyz.felh.openai.OpenAiService
-
text-embedding-ada-002, text-search-ada-doc-001
- createFineTuningJob(CreateFineTuningJobRequest) - Method in interface xyz.felh.openai.OpenAiApi
-
Creates a job that fine-tunes a specified model from a given dataset.
- createFineTuningJob(CreateFineTuningJobRequest) - Method in class xyz.felh.openai.OpenAiService
-
Creates a job that fine-tunes a specified model from a given dataset.
- createImage(CreateImageRequest) - Method in interface xyz.felh.openai.OpenAiApi
-
Create image Beta Creates an image given a prompt.
- createImage(CreateImageRequest) - Method in class xyz.felh.openai.OpenAiService
- createImageEdit(RequestBody) - Method in interface xyz.felh.openai.OpenAiApi
-
Create image editBeta Creates an edited or extended image given an original image and a prompt.
- createImageEdit(CreateImageEditRequest) - Method in class xyz.felh.openai.OpenAiService
- createImageVariation(RequestBody) - Method in interface xyz.felh.openai.OpenAiApi
-
Create image variationBeta Creates a variation of a given image.
- createImageVariation(CreateImageVariationRequest) - Method in class xyz.felh.openai.OpenAiService
- createModeration(CreateModerationRequest) - Method in interface xyz.felh.openai.OpenAiApi
-
Create moderation Classifies if text violates OpenAI's Content Policy
- createModeration(CreateModerationRequest) - Method in class xyz.felh.openai.OpenAiService
-
text-moderation-stable, text-moderation-latest
- createSteamChatCompletion(String, CreateChatCompletionRequest, StreamChatCompletionListener) - Method in class xyz.felh.openai.OpenAiService
-
create chat completion by stream
D
- defaultClient(String, String, Duration) - Static method in class xyz.felh.openai.OpenAiService
- defaultClient(String, Duration) - Static method in class xyz.felh.openai.OpenAiService
- defaultObjectMapper() - Static method in class xyz.felh.openai.OpenAiService
- defaultRetrofit(OkHttpClient, ObjectMapper) - Static method in class xyz.felh.openai.OpenAiService
- deleteFile(String) - Method in interface xyz.felh.openai.OpenAiApi
-
Delete file Delete a file.
- deleteFile(String) - Method in class xyz.felh.openai.OpenAiService
E
- execute(Single<T>) - Static method in class xyz.felh.openai.OpenAiService
-
Calls the Open AI api, returns the response, and parses error messages if the request fails
- ExtractHeaderInterceptor - Class in xyz.felh.openai.interceptor
-
interceptor to get headers from response
- ExtractHeaderInterceptor(Consumer<ResponseHeaders>) - Constructor for class xyz.felh.openai.interceptor.ExtractHeaderInterceptor
G
- getModel(String) - Method in interface xyz.felh.openai.OpenAiApi
-
Retrieve model
- getModel(String) - Method in class xyz.felh.openai.OpenAiService
H
- HEADER_OPENAI_MODEL - Static variable in interface xyz.felh.openai.OpenAiConstants
-
headers' name from response
- HEADER_OPENAI_ORGANIZATION - Static variable in interface xyz.felh.openai.OpenAiConstants
- HEADER_OPENAI_PROCESSING_MS - Static variable in interface xyz.felh.openai.OpenAiConstants
- HEADER_OPENAI_VERSION - Static variable in interface xyz.felh.openai.OpenAiConstants
- HEADER_X_RATELIMIT_LIMIT_REQUESTS - Static variable in interface xyz.felh.openai.OpenAiConstants
-
The maximum number of requests that are permitted before exhausting the rate limit.
- HEADER_X_RATELIMIT_LIMIT_TOKENS - Static variable in interface xyz.felh.openai.OpenAiConstants
-
The maximum number of tokens that are permitted before exhausting the rate limit.
- HEADER_X_RATELIMIT_REMAINING_REQUESTS - Static variable in interface xyz.felh.openai.OpenAiConstants
-
The remaining number of requests that are permitted before exhausting the rate limit.
- HEADER_X_RATELIMIT_REMAINING_TOKENS - Static variable in interface xyz.felh.openai.OpenAiConstants
-
The remaining number of tokens that are permitted before exhausting the rate limit.
- HEADER_X_RATELIMIT_RESET_REQUESTS - Static variable in interface xyz.felh.openai.OpenAiConstants
-
The time until the rate limit (based on requests) resets to its initial state.
- HEADER_X_RATELIMIT_RESET_TOKENS - Static variable in interface xyz.felh.openai.OpenAiConstants
-
The time until the rate limit (based on tokens) resets to its initial state.
- HEADER_X_REQUEST_ID - Static variable in interface xyz.felh.openai.OpenAiConstants
I
- intercept(Interceptor.Chain) - Method in class xyz.felh.openai.AuthenticationInterceptor
- intercept(Interceptor.Chain) - Method in class xyz.felh.openai.interceptor.ExtractHeaderInterceptor
L
- listFiles() - Method in interface xyz.felh.openai.OpenAiApi
-
List files Returns a list of files that belong to the user's organization.
- listFiles() - Method in class xyz.felh.openai.OpenAiService
- listFineTuningEvents(String, String, Integer) - Method in interface xyz.felh.openai.OpenAiApi
-
Get status updates for a fine-tuning job.
- listFineTuningEvents(String, String, Integer) - Method in class xyz.felh.openai.OpenAiService
-
Get status updates for a fine-tuning job.
- listModels() - Method in interface xyz.felh.openai.OpenAiApi
-
List models
- listModels() - Method in class xyz.felh.openai.OpenAiService
O
- onClosed(String) - Method in class xyz.felh.openai.StreamChatCompletionListener
-
No further calls to this listener will be made.
- onEvent(String, ChatCompletion) - Method in class xyz.felh.openai.StreamChatCompletionListener
-
event line
- onEventDone(String) - Method in class xyz.felh.openai.StreamChatCompletionListener
-
event message finished
- onFailure(String, Throwable, Response) - Method in class xyz.felh.openai.StreamChatCompletionListener
-
Invoked when an event source has been closed due to an error reading from or writing to the network.
- onOpen(String, Response) - Method in class xyz.felh.openai.StreamChatCompletionListener
-
Invoked when an event source has been accepted by the remote peer and may begin transmitting events.
- OpenAiApi - Interface in xyz.felh.openai
-
Retrofit2 API interface
- OpenAiConstants - Interface in xyz.felh.openai
-
OpenAI constants
- OpenAiService - Class in xyz.felh.openai
-
OpenAi Service Class
- OpenAiService(String) - Constructor for class xyz.felh.openai.OpenAiService
-
Creates a new OpenAiService that wraps OpenAiApi
- OpenAiService(String, Duration) - Constructor for class xyz.felh.openai.OpenAiService
-
Creates a new OpenAiService that wraps OpenAiApi
- OpenAiService(OpenAiApi, OkHttpClient) - Constructor for class xyz.felh.openai.OpenAiService
-
Creates a new OpenAiService that wraps OpenAiApi.
R
- ResponseHeaders - Class in xyz.felh.openai.bean
- ResponseHeaders() - Constructor for class xyz.felh.openai.bean.ResponseHeaders
- retrieveFile(String) - Method in interface xyz.felh.openai.OpenAiApi
-
Retrieve file
- retrieveFile(String) - Method in class xyz.felh.openai.OpenAiService
- retrieveFileContent(String) - Method in interface xyz.felh.openai.OpenAiApi
-
Retrieve file content
- retrieveFileContent(String) - Method in class xyz.felh.openai.OpenAiService
- retrieveFineTuningJob(String) - Method in interface xyz.felh.openai.OpenAiApi
-
Get info about a fine-tuning job.
- retrieveFineTuningJob(String) - Method in class xyz.felh.openai.OpenAiService
-
Get info about a fine-tuning job.
S
- setEventSource(EventSource) - Method in class xyz.felh.openai.StreamChatCompletionListener
- StreamChatCompletionListener - Class in xyz.felh.openai
- StreamChatCompletionListener() - Constructor for class xyz.felh.openai.StreamChatCompletionListener
U
- uploadFile(File, String) - Method in class xyz.felh.openai.OpenAiService
- uploadFile(String, String) - Method in class xyz.felh.openai.OpenAiService
- uploadFile(MultipartBody.Part, RequestBody) - Method in interface xyz.felh.openai.OpenAiApi
-
Upload file Upload a file that contains document(s) to be used across various endpoints/features.
X
- xyz.felh.openai - package xyz.felh.openai
- xyz.felh.openai.bean - package xyz.felh.openai.bean
- xyz.felh.openai.interceptor - package xyz.felh.openai.interceptor
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form