Index

A B C D E G H I L O R S U X 
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

cancelFineTune(String) - Method in interface xyz.felh.openai.OpenAiApi
Cancel fine-tune Immediately cancel a fine-tune job.
cancelFineTune(String) - Method in class xyz.felh.openai.OpenAiService
 
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
createEdit(CreateEditRequest) - Method in interface xyz.felh.openai.OpenAiApi
Create edit Creates a new edit for the provided input, instruction, and parameters.
createEdit(CreateEditRequest) - Method in class xyz.felh.openai.OpenAiService
text-davinci-edit-001, code-davinci-edit-001
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
createFineTune(CreateFineTuneRequest) - Method in interface xyz.felh.openai.OpenAiApi
Create fine-tune Creates a job that fine-tunes a specified model from a given dataset.
createFineTune(CreateFineTuneRequest) - Method in class xyz.felh.openai.OpenAiService
 
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
 
deleteFineTune(String) - Method in interface xyz.felh.openai.OpenAiApi
Delete fine-tune model Delete a fine-tuned model.
deleteFineTune(String, 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
 
listFineTuneEvents(String) - Method in interface xyz.felh.openai.OpenAiApi
List fine-tune events Get fine-grained status updates for a fine-tune job.
listFineTuneEvents(String) - Method in class xyz.felh.openai.OpenAiService
 
listFineTunes() - Method in interface xyz.felh.openai.OpenAiApi
List fine-tunes List your organization's fine-tuning jobs
listFineTunes() - Method in class xyz.felh.openai.OpenAiService
 
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
 
retrieveFineTune(String) - Method in interface xyz.felh.openai.OpenAiApi
Retrieve fine-tune Gets info about the fine-tune job.
retrieveFineTune(String) - Method in class xyz.felh.openai.OpenAiService
 

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(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
 
A B C D E G H I L O R S U X 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form