Index

A B C D E F G H I J L M N O P R S T U V 
All Classes and Interfaces|All Packages|Serialized Form

A

ASSISTANT - Enum constant in enum class com.hw.openai.entity.chat.ChatMessageRole
Assistant role.
AZURE - Enum constant in enum class com.hw.openai.common.OpenaiApiType
azure.
AZURE_AD - Enum constant in enum class com.hw.openai.common.OpenaiApiType
azure_ad.

B

BASE64_JSON - Enum constant in enum class com.hw.openai.entity.image.ImageRespFormat
 

C

ChatChoice - Class in com.hw.openai.entity.chat
ChatChoice
ChatChoice() - Constructor for class com.hw.openai.entity.chat.ChatChoice
 
chatCompletion(ChatCompletion) - Method in class com.hw.openai.OpenAiClient
Creates a model response for the given chat conversation.
ChatCompletion - Class in com.hw.openai.entity.chat
Chat conversation.
ChatCompletion() - Constructor for class com.hw.openai.entity.chat.ChatCompletion
 
ChatCompletionChunk - Class in com.hw.openai.entity.chat
 
ChatCompletionChunk() - Constructor for class com.hw.openai.entity.chat.ChatCompletionChunk
 
ChatCompletionResp - Class in com.hw.openai.entity.chat
CompletionResp
ChatCompletionResp() - Constructor for class com.hw.openai.entity.chat.ChatCompletionResp
 
ChatFunction - Class in com.hw.openai.entity.chat
 
ChatFunction() - Constructor for class com.hw.openai.entity.chat.ChatFunction
 
ChatFunction.ChatParameter - Class in com.hw.openai.entity.chat
 
ChatMessage - Class in com.hw.openai.entity.chat
Message
ChatMessage(ChatMessage) - Constructor for class com.hw.openai.entity.chat.ChatMessage
 
ChatMessage(ChatMessageRole, String) - Constructor for class com.hw.openai.entity.chat.ChatMessage
 
ChatMessage(ChatMessageRole, String, String) - Constructor for class com.hw.openai.entity.chat.ChatMessage
 
ChatMessage(String) - Constructor for class com.hw.openai.entity.chat.ChatMessage
 
ChatMessageRole - Enum Class in com.hw.openai.entity.chat
Role
ChatParameter() - Constructor for class com.hw.openai.entity.chat.ChatFunction.ChatParameter
 
ChatParameterUtils - Class in com.hw.openai.utils
Utility class to generate a structured ChatParameter object based on a given Java class.
ChatParameterUtils() - Constructor for class com.hw.openai.utils.ChatParameterUtils
 
Choice - Class in com.hw.openai.entity.completions
Choice
Choice() - Constructor for class com.hw.openai.entity.completions.Choice
 
close() - Method in class com.hw.openai.OpenAiClient
Closes the HttpClient connection pool.
code - Variable in exception com.hw.openai.exception.OpenAiException
OpenAI error code, for example "invalid_api_key"
com.hw.openai - package com.hw.openai
 
com.hw.openai.common - package com.hw.openai.common
 
com.hw.openai.entity.chat - package com.hw.openai.entity.chat
 
com.hw.openai.entity.completions - package com.hw.openai.entity.completions
 
com.hw.openai.entity.embeddings - package com.hw.openai.entity.embeddings
 
com.hw.openai.entity.image - package com.hw.openai.entity.image
 
com.hw.openai.entity.models - package com.hw.openai.entity.models
 
com.hw.openai.exception - package com.hw.openai.exception
 
com.hw.openai.function - package com.hw.openai.function
 
com.hw.openai.service - package com.hw.openai.service
 
com.hw.openai.stream - package com.hw.openai.stream
 
com.hw.openai.utils - package com.hw.openai.utils
 
completion(Completion) - Method in class com.hw.openai.OpenAiClient
Creates a completion for the provided prompt and parameters.
Completion - Class in com.hw.openai.entity.completions
Completion() - Constructor for class com.hw.openai.entity.completions.Completion
 
CompletionChunk - Class in com.hw.openai.entity.completions
 
CompletionChunk() - Constructor for class com.hw.openai.entity.completions.CompletionChunk
 
CompletionResp - Class in com.hw.openai.entity.completions
CompletionResp
CompletionResp() - Constructor for class com.hw.openai.entity.completions.CompletionResp
 
convertFromJsonStr(String, Class<T>) - Static method in class com.hw.openai.utils.JsonUtils
 
createChatCompletion(ChatCompletion) - Method in class com.hw.openai.OpenAiClient
Creates a model response for the given chat conversation.
createChatCompletion(ChatCompletion) - Method in interface com.hw.openai.service.OpenAiService
Creates a response for the given chat conversation.
createChatCompletion(String, String, ChatCompletion) - Method in interface com.hw.openai.service.OpenAiService
Creates a model response for the given chat conversation, using azure openai.
createCompletion(Completion) - Method in class com.hw.openai.OpenAiClient
Creates a completion for the provided prompt and parameters.
createCompletion(Completion) - Method in interface com.hw.openai.service.OpenAiService
Creates a completion for the provided prompt and parameters.
createCompletion(String, String, Completion) - Method in interface com.hw.openai.service.OpenAiService
Creates a completion for the provided prompt and parameters, using azure openai.
createEmbedding(Embedding) - Method in class com.hw.openai.OpenAiClient
Creates an embedding vector representing the input text.
createEmbedding(Embedding) - Method in interface com.hw.openai.service.OpenAiService
Creates an embedding vector representing the input text.
createEmbedding(String, String, Embedding) - Method in interface com.hw.openai.service.OpenAiService
Creates an embedding vector representing the input text, using azure openai.
createImage(CreateImageReq) - Method in class com.hw.openai.OpenAiClient
Creates an image given a prompt.
createImage(CreateImageReq) - Method in interface com.hw.openai.service.OpenAiService
Creates an image given a prompt.
CreateImageReq - Class in com.hw.openai.entity.image
 
CreateImageReq() - Constructor for class com.hw.openai.entity.image.CreateImageReq
 

D

data() - Method in record class com.hw.openai.stream.SSE
Returns the value of the data record component.
defaultObjectMapper() - Static method in class com.hw.openai.OpenAiClient
 

E

Embedding - Class in com.hw.openai.entity.embeddings
 
Embedding() - Constructor for class com.hw.openai.entity.embeddings.Embedding
 
EmbeddingData - Class in com.hw.openai.entity.embeddings
 
EmbeddingData() - Constructor for class com.hw.openai.entity.embeddings.EmbeddingData
 
EmbeddingResp - Class in com.hw.openai.entity.embeddings
EmbeddingResp
EmbeddingResp() - Constructor for class com.hw.openai.entity.embeddings.EmbeddingResp
 
equals(Object) - Method in record class com.hw.openai.stream.SSE
Indicates whether some other object is "equal to" this one.
execute(Single<T>) - Method in class com.hw.openai.OpenAiClient
Calls the Open AI api, returns the response, and parses error messages if the request fails
execute(String, Class<T>, String) - Static method in class com.hw.openai.function.FunctionExecutor
 

F

fromValue(String) - Static method in enum class com.hw.openai.entity.chat.ChatMessageRole
 
fromValue(String) - Static method in enum class com.hw.openai.entity.image.ImageRespFormat
 
fromValue(String) - Static method in enum class com.hw.openai.entity.image.ImageStyle
 
FUNCTION - Enum constant in enum class com.hw.openai.entity.chat.ChatMessageRole
Function role.
FunctionCall - Class in com.hw.openai.entity.chat
 
FunctionCall() - Constructor for class com.hw.openai.entity.chat.FunctionCall
 
FunctionExecutor - Class in com.hw.openai.function
 
FunctionExecutor() - Constructor for class com.hw.openai.function.FunctionExecutor
 

G

generate(Class<?>) - Static method in class com.hw.openai.utils.ChatParameterUtils
Generates a ChatFunction.ChatParameter instance that represents the given class schema in the form of a ChatParameter object.
getValue() - Method in enum class com.hw.openai.entity.chat.ChatMessageRole
 
getValue() - Method in enum class com.hw.openai.entity.image.ImageRespFormat
 
getValue() - Method in enum class com.hw.openai.entity.image.ImageStyle
 

H

hashCode() - Method in record class com.hw.openai.stream.SSE
Returns a hash code value for this object.
http(String, String, String) - Static method in class com.hw.openai.utils.ProxyUtils
Creates an HTTP proxy object based on the provided address.

I

Image - Class in com.hw.openai.entity.image
 
Image() - Constructor for class com.hw.openai.entity.image.Image
 
ImageResp - Class in com.hw.openai.entity.image
 
ImageResp() - Constructor for class com.hw.openai.entity.image.ImageResp
 
ImageRespFormat - Enum Class in com.hw.openai.entity.image
 
ImageStyle - Enum Class in com.hw.openai.entity.image
 
init() - Method in class com.hw.openai.OpenAiClient
Initializes the OpenAiClient instance.
isDone() - Method in record class com.hw.openai.stream.SSE
 

J

JsonUtils - Class in com.hw.openai.utils
 

L

listModels() - Method in class com.hw.openai.OpenAiClient
Lists the currently available models, and provides basic information about each one such as the owner and availability.
listModels() - Method in interface com.hw.openai.service.OpenAiService
Lists the currently available models, and provides basic information about each one such as the owner and availability.
LogProbs - Class in com.hw.openai.entity.completions
 
LogProbs() - Constructor for class com.hw.openai.entity.completions.LogProbs
 

M

Model - Class in com.hw.openai.entity.models
Model
Model() - Constructor for class com.hw.openai.entity.models.Model
 
ModelResp - Class in com.hw.openai.entity.models
ModelResp
ModelResp() - Constructor for class com.hw.openai.entity.models.ModelResp
 

N

NATURAL - Enum constant in enum class com.hw.openai.entity.image.ImageStyle
 

O

of(String) - Static method in class com.hw.openai.entity.chat.ChatMessage
 
of(String, String) - Static method in class com.hw.openai.entity.chat.ChatMessage
 
ofAssistant(String) - Static method in class com.hw.openai.entity.chat.ChatMessage
 
ofFunction(String, String) - Static method in class com.hw.openai.entity.chat.ChatMessage
 
ofSystem(String) - Static method in class com.hw.openai.entity.chat.ChatMessage
 
onFailure(Call<ResponseBody>, Throwable) - Method in class com.hw.openai.stream.ResponseBodyCallback
 
onResponse(Call<ResponseBody>, Response<ResponseBody>) - Method in class com.hw.openai.stream.ResponseBodyCallback
 
OPENAI - Enum constant in enum class com.hw.openai.common.OpenaiApiType
openai.
OpenaiApiType - Enum Class in com.hw.openai.common
 
OpenAiClient - Class in com.hw.openai
Represents a client for interacting with the OpenAI API.
OpenAiClient() - Constructor for class com.hw.openai.OpenAiClient
 
OpenAiError - Class in com.hw.openai.common
Represents the error body when an OpenAI request fails
OpenAiError() - Constructor for class com.hw.openai.common.OpenAiError
 
OpenAiError.OpenAiErrorDetails - Class in com.hw.openai.common
 
OpenAiErrorDetails() - Constructor for class com.hw.openai.common.OpenAiError.OpenAiErrorDetails
 
OpenAiException - Exception in com.hw.openai.exception
 
OpenAiException(OpenAiError, Exception, int) - Constructor for exception com.hw.openai.exception.OpenAiException
 
OpenAiService - Interface in com.hw.openai.service
Service interface for interacting with the OpenAI API.

P

param - Variable in exception com.hw.openai.exception.OpenAiException
 
Permission - Class in com.hw.openai.entity.models
Permission
Permission() - Constructor for class com.hw.openai.entity.models.Permission
 
ProxyUtils - Class in com.hw.openai.utils
A utility class for creating HTTP proxies.
ProxyUtils() - Constructor for class com.hw.openai.utils.ProxyUtils
 

R

register(String, Function<T, ?>) - Static method in class com.hw.openai.function.FunctionExecutor
 
requestTimeout - Variable in class com.hw.openai.OpenAiClient
Timeout for requests to OpenAI completion API.
ResponseBodyCallback - Class in com.hw.openai.stream
Callback to parse Server Sent Events (SSE) from raw InputStream and emit the events with io.reactivex.FlowableEmitter to allow streaming of SSE.
ResponseBodyCallback(FlowableEmitter<SSE>, boolean) - Constructor for class com.hw.openai.stream.ResponseBodyCallback
 
ResponseBodyCallback(FlowableEmitter<SSE>, boolean, ObjectMapper) - Constructor for class com.hw.openai.stream.ResponseBodyCallback
 
retrieveModel(String) - Method in class com.hw.openai.OpenAiClient
Retrieves a model instance, providing basic information about the model such as the owner and permissions.
retrieveModel(String) - Method in interface com.hw.openai.service.OpenAiService
Retrieves a model instance, providing basic information about the model such as the owner and permissions.

S

SSE - Record Class in com.hw.openai.stream
 
SSE(String) - Constructor for record class com.hw.openai.stream.SSE
Creates an instance of a SSE record class.
SSEFormatException - Class in com.hw.openai.exception
 
SSEFormatException(String) - Constructor for class com.hw.openai.exception.SSEFormatException
 
statusCode - Variable in exception com.hw.openai.exception.OpenAiException
HTTP status code
stream(Call<ResponseBody>, boolean) - Method in class com.hw.openai.OpenAiClient
Calls the Open AI api and returns a Flowable of SSE for streaming.
streamChatCompletion(ChatCompletion) - Method in class com.hw.openai.OpenAiClient
Creates a stream response for the given chat conversation.
streamChatCompletion(ChatCompletion) - Method in interface com.hw.openai.service.OpenAiService
Creates a stream response for the given chat conversation.
streamCompletion(Completion) - Method in class com.hw.openai.OpenAiClient
Creates a stream completion for the provided prompt and parameters.
streamCompletion(Completion) - Method in interface com.hw.openai.service.OpenAiService
Creates a stream completion for the provided prompt and parameters.
SYSTEM - Enum constant in enum class com.hw.openai.entity.chat.ChatMessageRole
System role.

T

toJsonStringWithIndent(Object) - Static method in class com.hw.openai.utils.JsonUtils
 
toJsonStringWithIndent(Object, int) - Static method in class com.hw.openai.utils.JsonUtils
 
Tool - Class in com.hw.openai.entity.chat
 
Tool(ChatFunction) - Constructor for class com.hw.openai.entity.chat.Tool
 
ToolCall - Class in com.hw.openai.entity.chat
 
ToolCall() - Constructor for class com.hw.openai.entity.chat.ToolCall
 
toString() - Method in record class com.hw.openai.stream.SSE
Returns a string representation of this record class.
type - Variable in exception com.hw.openai.exception.OpenAiException
OpenAI error type, for example "invalid_request_error" Error codes

U

URL - Enum constant in enum class com.hw.openai.entity.image.ImageRespFormat
 
Usage - Class in com.hw.openai.entity.completions
Usage
Usage() - Constructor for class com.hw.openai.entity.completions.Usage
 
USER - Enum constant in enum class com.hw.openai.entity.chat.ChatMessageRole
User role.

V

valueOf(String) - Static method in enum class com.hw.openai.common.OpenaiApiType
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class com.hw.openai.entity.chat.ChatMessageRole
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class com.hw.openai.entity.image.ImageRespFormat
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class com.hw.openai.entity.image.ImageStyle
Returns the enum constant of this class with the specified name.
values() - Static method in enum class com.hw.openai.common.OpenaiApiType
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class com.hw.openai.entity.chat.ChatMessageRole
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class com.hw.openai.entity.image.ImageRespFormat
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class com.hw.openai.entity.image.ImageStyle
Returns an array containing the constants of this enum class, in the order they are declared.
VIVID - Enum constant in enum class com.hw.openai.entity.image.ImageStyle
 
A B C D E F G H I J L M N O P R S T U V 
All Classes and Interfaces|All Packages|Serialized Form