Serialized Form

  • Package xyz.felh.openai

  • Package xyz.felh.openai.assistant

    • Class xyz.felh.openai.assistant.Assistant

      class Assistant extends OpenAiApiObjectWithId implements Serializable
      • Serialized Fields

        • createdAt
          Integer createdAt
          The Unix timestamp (in seconds) for when the assistant was created.
        • description
          String description
          The description of the assistant. The maximum length is 512 characters.
        • instructions
          String instructions
          The system instructions that the assistant uses. The maximum length is 32768 characters.
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • model
          String model
          ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
        • name
          String name
          The name of the assistant. The maximum length is 256 characters.
        • responseFormat
          Object responseFormat
          Specifies the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.

          Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON.

          Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.

        • temperature
          Double temperature
          What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
        • toolResources
          AssistToolResources toolResources
          A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.
        • tools
          List<AssistantTool> tools
          A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types code_interpreter, retrieval, or function. See AssistantTool
        • topP
          Double topP
          An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

          We generally recommend altering this or temperature but not both.

    • Class xyz.felh.openai.assistant.AssistantTool

      class AssistantTool extends Object implements Serializable
      • Serialized Fields

    • Class xyz.felh.openai.assistant.AssistToolResources

      class AssistToolResources extends Object implements Serializable
    • Class xyz.felh.openai.assistant.AssistToolResources.ToolResourcesCodeInterpreter

      class ToolResourcesCodeInterpreter extends Object implements Serializable
      • Serialized Fields

        • fileIds
          List<String> fileIds
          A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.
    • Class xyz.felh.openai.assistant.AssistToolResources.ToolResourcesFileSearch

      class ToolResourcesFileSearch extends Object implements Serializable
      • Serialized Fields

        • vectorStoreIds
          List<String> vectorStoreIds
          A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.
        • vectorStores
          List<AssistToolResources.ToolResourcesFileSearchVectorStore> vectorStores
          A helper to create a vector store with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant.
    • Class xyz.felh.openai.assistant.AssistToolResources.ToolResourcesFileSearchVectorStore

      class ToolResourcesFileSearchVectorStore extends Object implements Serializable
      • Serialized Fields

        • fileIds
          List<String> fileIds
          A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.
        • metadata
          Map<?,?> metadata
          Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
    • Class xyz.felh.openai.assistant.CreateAssistantRequest

      class CreateAssistantRequest extends Object implements Serializable
      • Serialized Fields

        • description
          String description
          The description of the assistant. The maximum length is 512 characters.
        • instructions
          String instructions
          The system instructions that the assistant uses. The maximum length is 32768 characters.
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • model
          @NonNull String model
          ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
        • name
          String name
          The name of the assistant. The maximum length is 256 characters.
        • responseFormat
          Object responseFormat
          Specifies the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.

          Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON.

          Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.

        • temperature
          Double temperature
          What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
        • toolResources
          AssistToolResources toolResources
          A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.
        • tools
          List<AssistantTool> tools
          A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types code_interpreter, file_search, or function.

          Defaults to []

          See AssistantTool

        • topP
          Double topP
          An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

          We generally recommend altering this or temperature but not both.

    • Class xyz.felh.openai.assistant.IncompleteDetails

      class IncompleteDetails extends Object implements Serializable
      • Serialized Fields

        • reason
          String reason
          The reason the message is incomplete.
    • Class xyz.felh.openai.assistant.ModifyAssistantRequest

      class ModifyAssistantRequest extends Object implements Serializable
      • Serialized Fields

        • description
          String description
          The description of the assistant. The maximum length is 512 characters.
        • instructions
          String instructions
          The system instructions that the assistant uses. The maximum length is 32768 characters.
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • model
          String model
          ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
        • name
          String name
          The name of the assistant. The maximum length is 256 characters.
        • responseFormat
          Object responseFormat
          Specifies the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.

          Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON.

          Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.

        • temperature
          Double temperature
          What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
        • toolResources
          AssistToolResources toolResources
          A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.
        • tools
          List<AssistantTool> tools
          A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types code_interpreter, retrieval, or function.

          Defaults to []

          See AssistantTool

        • topP
          Double topP
          An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

          We generally recommend altering this or temperature but not both.

  • Package xyz.felh.openai.assistant.message

  • Package xyz.felh.openai.assistant.run

    • Class xyz.felh.openai.assistant.run.CreateRunRequest

      class CreateRunRequest extends Object implements Serializable
      • Serialized Fields

        • additionalMessages
          List<Message> additionalMessages
          Adds additional messages to the thread before creating the run.
        • assistantId
          @NonNull String assistantId
          The ID of the Assistant to use to execute this run.
        • instructions
          String instructions
          Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.
        • maxCompletionTokens
          Integer maxCompletionTokens
          The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status incomplete. See incomplete_details for more info.
        • maxPromptTokens
          Integer maxPromptTokens
          The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status incomplete. See incomplete_details for more info.
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • model
          String model
          The ID of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
        • responseFormat
          Object responseFormat
          Specifies the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.

          Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON.

          Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.

        • stream
          Boolean stream
          If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message.
        • temperature
          Double temperature
          What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
        • toolChoice
          Object toolChoice
          Controls which (if any) tool is called by the model. none means the model will not call any tools and instead generates a message. auto is the default value and means the model can pick between generating a message or calling a tool. Specifying a particular tool like {"type": "file_search"} or {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool. See ToolChoice
        • tools
          List<AssistantTool> tools
          Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.
        • topP
          Double topP
          An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

          We generally recommend altering this or temperature but not both.

        • truncationStrategy
          TruncationStrategy truncationStrategy
          Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
    • Class xyz.felh.openai.assistant.run.CreateThreadAndRunRequest

      class CreateThreadAndRunRequest extends Object implements Serializable
      • Serialized Fields

        • assistantId
          @NonNull String assistantId
          The ID of the Assistant to use to execute this run.
        • instructions
          String instructions
          Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.
        • maxCompletionTokens
          Integer maxCompletionTokens
          The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status incomplete. See incomplete_details for more info.
        • maxPromptTokens
          Integer maxPromptTokens
          The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status incomplete. See incomplete_details for more info.
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • model
          String model
          The ID of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
        • responseFormat
          Object responseFormat
          Specifies the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.

          Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON.

          Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.

        • stream
          Boolean stream
          If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message.
        • temperature
          Double temperature
          What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
        • thread
          Thread thread
          See Thread
        • toolChoice
          Object toolChoice
          Controls which (if any) tool is called by the model. none means the model will not call any tools and instead generates a message. auto is the default value and means the model can pick between generating a message or calling a tool. Specifying a particular tool like {"type": "file_search"} or {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool. See
          invalid reference
          CreateRunRequest.ToolChoice
        • toolResources
          AssistToolResources toolResources
          A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.
        • tools
          List<AssistantTool> tools
          Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.
        • topP
          Double topP
          An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

          We generally recommend altering this or temperature but not both.

        • truncationStrategy
          TruncationStrategy truncationStrategy
          Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
    • Class xyz.felh.openai.assistant.run.ModifyRunRequest

      class ModifyRunRequest extends Object implements Serializable
      • Serialized Fields

        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
    • Class xyz.felh.openai.assistant.run.RequiredAction

      class RequiredAction extends Object implements Serializable
    • Class xyz.felh.openai.assistant.run.Run

      class Run extends OpenAiApiObjectWithId implements Serializable
      • Serialized Fields

        • assistantId
          String assistantId
          The ID of the Assistant used for execution of this run.
        • cancelledAt
          Integer cancelledAt
          The Unix timestamp (in seconds) for when the run was cancelled.
        • completedAt
          Integer completedAt
          The Unix timestamp (in seconds) for when the run was completed.
        • createdAt
          Integer createdAt
          The Unix timestamp (in seconds) for when the run was created.
        • expiresAt
          Integer expiresAt
          The Unix timestamp (in seconds) for when the run will expire.
        • failedAt
          Integer failedAt
          The Unix timestamp (in seconds) for when the run failed.
        • incompleteDetails
          IncompleteDetails incompleteDetails
          Details on why the run is incomplete. Will be null if the run is not incomplete.
        • instructions
          String instructions
          The instructions that the Assistant used for this run.
        • lastError
          LastError lastError
          The last error associated with this run. Will be null if there are no errors.

          See LastError

        • maxCompletionTokens
          Integer maxCompletionTokens
          The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status incomplete. See incomplete_details for more info.
        • maxPromptTokens
          Integer maxPromptTokens
          The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status incomplete. See incomplete_details for more info.
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • model
          String model
        • requiredAction
          RequiredAction requiredAction
          Details on the action required to continue the run. Will be null if no action is required.

          See RequiredAction

        • responseFormat
          Object responseFormat
          Specifies the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.

          Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON.

          Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.

        • startedAt
          Integer startedAt
          The Unix timestamp (in seconds) for when the run was started.
        • status
          Run.Status status
          The status of the run, which can be either queued, in_progress, requires_action, cancelling, cancelled, failed, completed, or expired. See Run.Status
        • temperature
          Double temperature
          The sampling temperature used for this run. If not set, defaults to 1.
        • threadId
          String threadId
          The ID of the Thread that was executed on as a part of this run.
        • toolChoice
          Object toolChoice
          Controls which (if any) tool is called by the model. none means the model will not call any tools and instead generates a message. auto is the default value and means the model can pick between generating a message or calling a tool. Specifying a particular tool like {"type": "file_search"} or {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool. See ToolChoice
        • tools
          List<AssistantTool> tools
          The list of tools that the Assistant used for this run.

          See AssistantTool

        • topP
          Double topP
          An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

          We generally recommend altering this or temperature but not both.

        • truncationStrategy
          TruncationStrategy truncationStrategy
          Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
        • usage
          Usage usage
          Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.).
    • Class xyz.felh.openai.assistant.run.SubmitToolOutputsRequest

      class SubmitToolOutputsRequest extends Object implements Serializable
      • Serialized Fields

        • stream
          Boolean stream
          If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message.
        • toolOutputs
          @NonNull List<ToolOutput> toolOutputs
          A list of tools for which the outputs are being submitted.

          See ToolOutput

    • Class xyz.felh.openai.assistant.run.Thread

      class Thread extends Object implements Serializable
      • Serialized Fields

        • messages
          List<Message> messages
          A list of messages to start the thread with.

          See Message

          role and content is required

        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • toolResources
          AssistToolResources toolResources
          A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.
    • Class xyz.felh.openai.assistant.run.ToolChoice

      class ToolChoice extends Object implements Serializable
      • Serialized Fields

    • Class xyz.felh.openai.assistant.run.ToolOutput

      class ToolOutput extends Object implements Serializable
      • Serialized Fields

        • output
          String output
          The output of the tool call to be submitted to continue the run.
        • toolCallId
          String toolCallId
          The ID of the tool call in the required_action object within the run object the output is being submitted for.
    • Class xyz.felh.openai.assistant.run.TruncationStrategy

      class TruncationStrategy extends Object implements Serializable
      • Serialized Fields

        • lastMessages
          Integer lastMessages
          The number of most recent messages from the thread when constructing the context for the run.
        • type
          TruncationStrategy.Type type
          The truncation strategy to use for the thread. The default is auto. If set to last_messages, the thread will be truncated to the n most recent messages in the thread. When set to auto, messages in the middle of the thread will be dropped to fit the context length of the model, max_prompt_tokens.
  • Package xyz.felh.openai.assistant.runstep

  • Package xyz.felh.openai.assistant.stream

  • Package xyz.felh.openai.assistant.stream.message

  • Package xyz.felh.openai.assistant.stream.runstep

  • Package xyz.felh.openai.assistant.thread

    • Class xyz.felh.openai.assistant.thread.CreateThreadRequest

      class CreateThreadRequest extends Object implements Serializable
      • Serialized Fields

        • messages
          List<Message> messages
          A list of Message to start the thread with.

          required fields: role, content

        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • toolResources
          AssistToolResources toolResources
          A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.
    • Class xyz.felh.openai.assistant.thread.ModifyThreadRequest

      class ModifyThreadRequest extends Object implements Serializable
      • Serialized Fields

        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • toolResources
          AssistToolResources toolResources
          A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.
    • Class xyz.felh.openai.assistant.thread.Thread

      class Thread extends OpenAiApiObjectWithId implements Serializable
      • Serialized Fields

        • createdAt
          Integer createdAt
          The Unix timestamp (in seconds) for when the thread was created.
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • toolResources
          AssistToolResources toolResources
          A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.
  • Package xyz.felh.openai.assistant.vector.store

    • Class xyz.felh.openai.assistant.vector.store.CreateVectorStoreRequest

      class CreateVectorStoreRequest extends Object implements Serializable
      • Serialized Fields

        • expiresAfter
          VectorStore.ExpiresAfter expiresAfter
        • fileIds
          List<String> fileIds
          A list of File IDs that the vector store should use. Useful for tools like file_search that can access files.
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • name
          String name
          The name of the vector store.
    • Class xyz.felh.openai.assistant.vector.store.FileCounts

      class FileCounts extends Object implements Serializable
      • Serialized Fields

        • cancelled
          Integer cancelled
          The number of files that were cancelled.
        • completed
          Integer completed
          The number of files that have been successfully processed.
        • failed
          Integer failed
          The number of files that have failed to process.
        • inProgress
          Integer inProgress
          The number of files that are currently being processed.
        • total
          Integer total
          The total number of files.
    • Class xyz.felh.openai.assistant.vector.store.ModifyVectorStoreRequest

      class ModifyVectorStoreRequest extends Object implements Serializable
      • Serialized Fields

        • expiresAfter
          VectorStore.ExpiresAfter expiresAfter
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • name
          String name
          The name of the vector store.
    • Class xyz.felh.openai.assistant.vector.store.VectorStore

      class VectorStore extends OpenAiApiObjectWithId implements Serializable
      • Serialized Fields

        • bytes
          Integer bytes
          The byte size of the vector store.
        • createdAt
          Integer createdAt
          The Unix timestamp (in seconds) for when the vector store was created.
        • expiresAfter
          VectorStore.ExpiresAfter expiresAfter
          The expiration policy for a vector store.
        • expiresAt
          Long expiresAt
          The Unix timestamp (in seconds) for when the vector store will expire.
        • fileCounts
          FileCounts fileCounts
        • lastActiveAt
          Long lastActiveAt
          The Unix timestamp (in seconds) for when the vector store was last active.
        • metadata
          Map<String,String> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • name
          String name
          The name of the vector store.
        • status
          VectorStore.Status status
          The status of the vector store, which can be either expired, in_progress, or completed. A status of completed indicates that the vector store is ready for use.
    • Class xyz.felh.openai.assistant.vector.store.VectorStore.ExpiresAfter

      class ExpiresAfter extends Object implements Serializable
      • Serialized Fields

        • anchor
          String anchor
          Anchor timestamp after which the expiration policy applies. Supported anchors: last_active_at.
        • days
          Integer days
          The number of days after the anchor time that the vector store will expire.
  • Package xyz.felh.openai.assistant.vector.store.file

  • Package xyz.felh.openai.assistant.vector.store.file.batch

  • Package xyz.felh.openai.audio

    • Class xyz.felh.openai.audio.AudioResponse

      class AudioResponse extends Object implements Serializable
      • Serialized Fields

    • Class xyz.felh.openai.audio.CreateAudioTranscriptionRequest

      class CreateAudioTranscriptionRequest extends CreateAudioTranslationRequest implements Serializable
      • Serialized Fields

        • language
          String language
          Optional The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.
        • timestampGranularities
          List<String> timestampGranularities
          The timestamp granularities to populate for this transcription.

          response_format must be set verbose_json to use timestamp granularities. Either or both of these options are supported: word, or segment. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.

    • Class xyz.felh.openai.audio.CreateAudioTranslationRequest

      class CreateAudioTranslationRequest extends Object implements Serializable
      • Serialized Fields

        • file
          byte[] file
        • fileName
          @NonNull String fileName
          The name must contain extension in order to let API know how the file's type
        • filePath
          String filePath
          Required must set filePath or file

          The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.

        • model
          @NonNull String model
          Required ID of the model to use. Only whisper-1 is currently available.
        • prompt
          String prompt
          Optional An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
        • responseFormat
          CreateAudioTranslationRequest.ResponseFormat responseFormat
          Optional Defaults to json

          The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.

          See CreateAudioTranslationRequest.ResponseFormat

        • temperature
          Double temperature
          Optional Defaults to 0

          The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.

    • Class xyz.felh.openai.audio.CreateSpeechRequest

      class CreateSpeechRequest extends Object implements Serializable
  • Package xyz.felh.openai.batch

    • Class xyz.felh.openai.batch.Batch

      class Batch extends OpenAiApiObjectWithId implements Serializable
      • Serialized Fields

        • cancelledAt
          Long cancelledAt
          The Unix timestamp (in seconds) for when the batch was cancelled.
        • cancellingAt
          Long cancellingAt
          The Unix timestamp (in seconds) for when the batch started cancelling.
        • completedAt
          Long completedAt
          The Unix timestamp (in seconds) for when the batch was completed.
        • completionWindow
          String completionWindow
          The time frame within which the batch should be processed.
        • createdAt
          Long createdAt
          The Unix timestamp (in seconds) for when the batch was created.
        • endpoint
          String endpoint
          The OpenAI API endpoint used by the batch.
        • errorFileId
          String errorFileId
          The ID of the file containing the outputs of requests with errors.
        • errors
          OpenAiApiListResponse<Batch.BatchError> errors
        • expiredAt
          Long expiredAt
          The Unix timestamp (in seconds) for when the batch expired.
        • expiresAt
          Long expiresAt
          The Unix timestamp (in seconds) for when the batch will expire.
        • failedAt
          Long failedAt
          The Unix timestamp (in seconds) for when the batch failed.
        • finalizingAt
          Long finalizingAt
          The Unix timestamp (in seconds) for when the batch started finalizing.
        • inProgressAt
          Long inProgressAt
          The Unix timestamp (in seconds) for when the batch started processing.
        • inputFileId
          String inputFileId
          The ID of the input file for the batch.
        • metadata
          Map<?,?> metadata
          Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
        • outputFileId
          String outputFileId
          The ID of the file containing the outputs of successfully executed requests.
        • requestCounts
          Batch.RequestCounts requestCounts
          The request counts for different statuses within the batch.
        • status
          String status
          The current status of the batch.
    • Class xyz.felh.openai.batch.Batch.BatchError

      class BatchError extends Object implements Serializable
      • Serialized Fields

        • code
          String code
          An error code identifying the error type.
        • line
          Integer line
          The line number of the input file where the error occurred, if applicable.
        • message
          String message
          A human-readable message providing more details about the error.
        • param
          String param
          The name of the parameter that caused the error, if applicable.
    • Class xyz.felh.openai.batch.Batch.RequestCounts

      class RequestCounts extends Object implements Serializable
      • Serialized Fields

        • completed
          Integer completed
          Number of requests that have been completed successfully.
        • failed
          Integer failed
          Number of requests that have failed.
        • total
          Integer total
          Total number of requests in the batch.
    • Class xyz.felh.openai.batch.BatchInputLineObject

      class BatchInputLineObject extends Object implements Serializable
      • Serialized Fields

        • body
          Map<?,?> body
        • customId
          String customId
          A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.
        • method
          String method
          The HTTP method to be used for the request. Currently only POST is supported.
        • url
          String url
          The OpenAI API relative URL to be used for the request. Currently only /v1/chat/completions is supported.
    • Class xyz.felh.openai.batch.BatchOutputLineObject

      class BatchOutputLineObject extends Object implements Serializable
      • Serialized Fields

        • customId
          String customId
          A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.
        • error
          BatchOutputLineObject.Error error
          For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure.
        • id
          String id
        • response
          BatchOutputLineObject.Response response
    • Class xyz.felh.openai.batch.BatchOutputLineObject.Error

      class Error extends Object implements Serializable
      • Serialized Fields

        • code
          String code
          A machine-readable error code.
        • message
          String message
          A human-readable error message.
    • Class xyz.felh.openai.batch.BatchOutputLineObject.Response

      class Response extends Object implements Serializable
      • Serialized Fields

        • body
          Map<?,?> body
          The JSON body of the response
        • requestId
          String requestId
          An unique identifier for the OpenAI API request. Please include this request ID when contacting support.
        • statusCode
          Integer statusCode
          The HTTP status code of the response
    • Class xyz.felh.openai.batch.CreateBatchRequest

      class CreateBatchRequest extends Object implements Serializable
      • Serialized Fields

        • completionWindow
          @NonNull String completionWindow
          The time frame within which the batch should be processed. Currently only '24h' is supported.
        • endpoint
          @NonNull String endpoint
          The endpoint to be used for all requests in the batch. Currently only /v1/chat/completions is supported.
        • inputFileId
          @NonNull String inputFileId
          The ID of an uploaded file that contains requests for the new batch.

          See upload file for how to upload a file.

          Your input file must be formatted as a JSONL file, and must be uploaded with the purpose batch.

        • metadata
          Object metadata
          Optional custom metadata for the batch.
  • Package xyz.felh.openai.chat

    • Class xyz.felh.openai.chat.ChatCompletion

      class ChatCompletion extends OpenAiApiObjectWithId implements Serializable
      • Serialized Fields

        • choices
          List<ChatCompletionChoice> choices
          A list of chat completion choices. Can be more than one if n is greater than 1.

          See ChatCompletionChoice

        • created
          Long created
          The Unix timestamp (in seconds) of when the chat completion was created.
        • model
          String model
          The model used for the chat completion.
        • systemFingerprint
          String systemFingerprint
          This fingerprint represents the backend configuration that the model runs with.

          Can be used in conjunction with the

          invalid reference
          CreateChatCompletionRequest#getSeed()
          request parameter to understand when backend changes have been made that might impact determinism.
        • usage
          Usage usage
          Usage statistics for the completion request. See Usage
    • Class xyz.felh.openai.chat.ChatCompletionChoice

      class ChatCompletionChoice extends Object implements Serializable
      • Serialized Fields

        • delta
          ChatMessage delta
          A chat completion delta generated by streamed model responses.

          See ChatMessage

        • finishReason
          String finishReason
          The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool, or function_call (deprecated) if the model called a function.
        • index
          Integer index
          The index of the choice in the list of choices.
        • message
          ChatMessage message
          A chat completion message generated by the model.

          See ChatMessage

    • Class xyz.felh.openai.chat.ChatMessage

      class ChatMessage extends Object implements Serializable
      • Serialized Fields

        • content
          Object content
          The contents of the message

          1. role=system, string or null, required
          2. role=user, string or array, required
          3. role=assistant, string or null, required
          4. role=tool, string or null, required

        • name
          String name
          An optional name for the participant. Provides the model information to differentiate between participants of the same role.

          Optional

          Do not provide this field when role is tool.

        • role
          @NonNull ChatMessageRole role
          Must be either 'system', 'user', 'assistant', or 'tool'.
          You may use ChatMessage enum.
        • toolCallId
          String toolCallId
          Tool call that this message is responding to.

          String, Required It is provided when role is ChatMessageRole.TOOL

        • toolCalls
          List<ToolCall> toolCalls
          The tool calls generated by the model, such as function calls.

          Array, Optional It is provided when role is assistant

          See ToolCall

    • Class xyz.felh.openai.chat.ChatMessage.ContentItem

      class ContentItem extends Object implements Serializable
    • Class xyz.felh.openai.chat.ChatMessage.ImageUrl

      class ImageUrl extends Object implements Serializable
      • Serialized Fields

        • detail
          ChatMessage.ImageUrlDetail detail
          Specifies the detail level of the image.

          Optional, Defaults to auto

        • url
          @NonNull String url
          Either a URL of the image or the base64 encoded image data.
    • Class xyz.felh.openai.chat.CreateChatCompletionRequest

      class CreateChatCompletionRequest extends Object implements Serializable
      • Serialized Fields

        • frequencyPenalty
          Double frequencyPenalty
          Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

          Number or null, Optional, Defaults to 0

          See more information about frequency and presence penalties.

        • logitBias
          Map<String,Integer> logitBias
          Modify the likelihood of specified tokens appearing in the completion.

          Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.

          Map, Optional Defaults to null

        • maxTokens
          Integer maxTokens
          The maximum number of tokens to generate in the chat completion.

          The total length of input tokens and generated tokens is limited by the model's context length. Example Python code for counting tokens.

          integer or null, Optional

          Defaults to inf

        • messages
          @NonNull List<ChatMessage> messages
          A list of messages comprising the conversation so far. See api document

          See ChatMessage

        • model
          @NonNull String model
          ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API.
        • n
          Integer n
          How many chat completion choices to generate for each input message.

          integer or null, Optional

          Defaults to 1

        • presencePenalty
          Double presencePenalty
          Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

          Number or null, Optional, Defaults to 0

          See more information about frequency and presence penalties.

        • responseFormat
          RequestResponseFormat responseFormat
          An object specifying the format that the model must output.

          Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON.

          Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded CreateChatCompletionRequest.maxTokens or the conversation exceeded the max context length.

          object, Optional

          See RequestResponseFormat

        • seed
          Integer seed
          This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.

          integer or null, Optional

        • stop
          String stop
          Up to 4 sequences where the API will stop generating further tokens.

          string / array / null

          Optional Defaults to null

        • stream
          Boolean stream
          If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.

          boolean or null, Optional

          Defaults to false

        • temperature
          Double temperature
          What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

          We generally recommend altering this or CreateChatCompletionRequest.topP but not both.

          number or null, Optional

          Defaults to 1

        • toolChoice
          Object toolChoice
          Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. Specifying a particular function via {"type: "function", "function": {"name": "my_function"}} forces the model to call that function.

          none is the default when no functions are present. auto is the default if functions are present.

          string or object, Optional

          string - none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. object - Specifies a tool the model should use. Use to force the model to call a specific function.ToolChoice

        • tools
          List<Tool> tools
          A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.

          array Optional

          See Tool

        • topP
          Double topP
          An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

          We generally recommend altering this or CreateChatCompletionRequest.temperature but not both.

          number or null, Optional

          Defaults to 1

        • user
          String user
          A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more

          string, Optional

    • Class xyz.felh.openai.chat.RequestResponseFormat

      class RequestResponseFormat extends Object implements Serializable
  • Package xyz.felh.openai.chat.tool

  • Package xyz.felh.openai.embedding

    • Class xyz.felh.openai.embedding.CreateEmbeddingRequest

      class CreateEmbeddingRequest extends Object implements Serializable
      • Serialized Fields

        • dimensions
          Integer dimensions
          integer Optional

          The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.

        • encodingFormat
          CreateEmbeddingRequest.EncodingFormat encodingFormat
          string Optional Defaults to float

          The format to return the embeddings in. Can be either float or base64. See CreateEmbeddingRequest.EncodingFormat

        • input
          @NonNull Object input
          string or array Required

          Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for text-embedding-ada-002), cannot be an empty string, and any array must be 2048 dimensions or less. Example Python code for counting tokens.

          string string - The string that will be turned into an embedding.

          array array - The array of strings that will be turned into an embedding. Each line's max is 8191

          array array - The array of integers that will be turned into an embedding.

          array array - The array of arrays containing integers that will be turned into an embedding.

        • model
          @NonNull String model
          Required ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
        • user
          String user
          Optional

          A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.

    • Class xyz.felh.openai.embedding.CreateEmbeddingResponse

      class CreateEmbeddingResponse extends Object implements Serializable
    • Class xyz.felh.openai.embedding.Embedding

      class Embedding extends Object implements Serializable
      • Serialized Fields

        • embedding
          List<Double> embedding
          The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the embedding guide.
        • index
          Integer index
          The index of the embedding in the list of embeddings.
        • object
          String object
          The object type, which is always "embedding".
  • Package xyz.felh.openai.file

    • Class xyz.felh.openai.file.File

      class File extends OpenAiApiObjectWithId implements Serializable
      • Serialized Fields

        • bytes
          Long bytes
          The size of the file, in bytes.
        • createdAt
          Long createdAt
          The Unix timestamp (in seconds) for when the file was created.
        • filename
          String filename
          The name of the file.
        • purpose
          File.Purpose purpose
          The intended purpose of the file. Supported values are fine-tune, fine-tune-results, assistants, and assistants_output.

          See File.Purpose

          assistants - Supported formats: ['c', 'cpp', 'csv', 'docx', 'html', 'java', 'json', 'md', 'pdf', 'php', 'pptx', 'py', 'rb', 'tex', 'txt', 'css', 'jpeg', 'jpg', 'js', 'gif', 'png', 'tar', 'ts', 'xlsx', 'xml', 'zip']

  • Package xyz.felh.openai.fineTuning

    • Class xyz.felh.openai.fineTuning.CreateFineTuningJobRequest

      class CreateFineTuningJobRequest extends Object implements Serializable
      • Serialized Fields

        • hyperparameters
          Hyperparameters hyperparameters
          Optional The hyperparameters used for the fine-tuning job.
        • model
          @NonNull String model
          The name of the model to fine-tune. You can select one of the supported models.
        • suffix
          String suffix
          A string of up to 18 characters that will be added to your fine-tuned model name.

          For example, a suffix of "custom-model-name" would produce a model name like ft:gpt-3.5-turbo:openai:custom-model-name:7p4lURel.

        • trainingFile
          @NonNull String trainingFile
          The ID of an uploaded file that contains training data. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose fine-tune.
        • validationFile
          String validationFile
          Optional

          The ID of an uploaded file that contains validation data.

          If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should not be present in both train and validation files.

          Your dataset must be formatted as a JSONL file. You must upload your file with the purpose fine-tune.

    • Class xyz.felh.openai.fineTuning.FineTuningJob

      class FineTuningJob extends OpenAiApiObjectWithId implements Serializable
      • Serialized Fields

        • createdAt
          Long createdAt
          The Unix timestamp (in seconds) for when the fine-tuning job was created.
        • error
          FineTuningJobError error
          For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
        • fineTunedModel
          String fineTunedModel
          The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.
        • finishedAt
          Long finishedAt
          The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.
        • hyperparameters
          Hyperparameters hyperparameters
          The hyperparameters used for the fine-tuning job. See the fine-tuning guide for more details.

          See Hyperparameters

        • model
          String model
          The base model that is being fine-tuned.
        • organizationId
          String organizationId
          The organization that owns the fine-tuning job.
        • resultFiles
          List<String> resultFiles
          The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the Files API.
        • status
          FineTuningJob.FineTuningJobStatus status
          The current status of the fine-tuning job, which can be either validating_files, queued, running, succeeded, failed, or cancelled.

          See FineTuningJob.FineTuningJobStatus

        • trainedTokens
          Long trainedTokens
          The total number of billable tokens processed by this fine tuning job.
        • trainingFile
          String trainingFile
          The file ID used for training.
        • validationFile
          String validationFile
          string or null The file ID used for validation.
    • Class xyz.felh.openai.fineTuning.FineTuningJobError

      class FineTuningJobError extends Object implements Serializable
      • Serialized Fields

        • code
          String code
          A machine-readable error code.
        • message
          String message
          A human-readable error message.
        • param
          String param
          The parameter that was invalid, usually training_file or validation_file. This field will be null if the failure was not parameter-specific.
    • Class xyz.felh.openai.fineTuning.FineTuningJobEvent

      class FineTuningJobEvent extends OpenAiApiObjectWithId implements Serializable
    • Class xyz.felh.openai.fineTuning.Hyperparameters

      class Hyperparameters extends Object implements Serializable
      • Serialized Fields

        • batchSize
          Object batchSize
          string or integer Optional Defaults to auto

          Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.

        • learningRateMultiplier
          Object learningRateMultiplier
          string or number Optional Defaults to auto

          Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.

        • nEpochs
          Object nEpochs
          string or integer

          The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. "auto" decides the optimal number of epochs based on the size of the dataset. If setting the number manually, we support any number between 1 and 50 epochs.

  • Package xyz.felh.openai.image

    • Class xyz.felh.openai.image.BaseRequest

      class BaseRequest extends Object implements Serializable
      • Serialized Fields

        • model
          String model
          The model to use for image generation.

          string, Optional Defaults to dall-e-2

          When creating edit image

          The model to use for image generation. Only dall-e-2 is supported at this time.

        • n
          Integer n
          The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported.

          integer or null, Optional

          Defaults to 1

        • responseFormat
          ImageResponseFormat responseFormat
          The format in which the generated images are returned. Must be one of url or b64_json.

          string or null, Optional

          Defaults to url

          See ImageResponseFormat

        • size
          ImageSize size
          The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024 for dall-e-2. Must be one of 1024x1024, 1792x1024, or 1024x1792 for dall-e-3

          string or null, Optional

          Defaults to 1024x1024

          See ImageSize

        • user
          String user
          A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.

          Learn more.

          string, Optional

    • Class xyz.felh.openai.image.CreateImageRequest

      class CreateImageRequest extends BaseRequest implements Serializable
      • Serialized Fields

        • prompt
          @NonNull String prompt
          A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3.

          string, Required

        • quality
          ImageQuality quality
          The quality of the image that will be generated. hd creates images with finer details and greater consistency across the image. This param is only supported for dall-e-3.

          string, Optional

          Default to standard

          See ImageQuality

        • style
          ImageStyle style
          The style of the generated images. Must be one of vivid or natural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for dall-e-3.

          string or null, Optional

          Defaults to vivid

          See ImageStyle

    • Class xyz.felh.openai.image.Image

      class Image extends Object implements Serializable
      • Serialized Fields

        • b64Json
          String b64Json
          The base64-encoded JSON of the generated image, if response_format is b64_json.
        • revisedPrompt
          String revisedPrompt
          The prompt that was used to generate the image, if there was any revision to the prompt.
        • url
          String url
          The URL of the generated image, if response_format is url (default).
    • Class xyz.felh.openai.image.ImageResponse

      class ImageResponse extends Object implements Serializable
  • Package xyz.felh.openai.image.edit

    • Class xyz.felh.openai.image.edit.CreateEditRequest

      class CreateEditRequest extends BaseRequest implements Serializable
      • Serialized Fields

        • image
          byte[] image
          The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.

          string, Required

        • imagePath
          String imagePath
        • mask
          byte[] mask
          An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.

          string, Optional

        • maskPath
          String maskPath
        • prompt
          @NonNull String prompt
          A text description of the desired image(s). The maximum length is 1000 characters.

          string

  • Package xyz.felh.openai.image.variation

  • Package xyz.felh.openai.model

  • Package xyz.felh.openai.moderation

    • Class xyz.felh.openai.moderation.CreateModerationRequest

      class CreateModerationRequest extends Object implements Serializable
      • Serialized Fields

        • input
          @NonNull Object input
          string or array Required

          The input text to classify

        • model
          String model
          Optional Defaults to text-moderation-latest

          Two content moderations models are available: text-moderation-stable and text-moderation-latest.

          The default is text-moderation-latest which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use text-moderation-stable, we will provide advanced notice before updating the model. Accuracy of text-moderation-stable may be slightly lower than for text-moderation-latest.

    • Class xyz.felh.openai.moderation.CreateModerationResponse

      class CreateModerationResponse extends Object implements Serializable
      • Serialized Fields

        • id
          String id
          The unique identifier for the moderation request.
        • model
          String model
          The model used to generate the moderation results.
        • results
          List<Moderation> results
          A list of moderation objects.

          See Moderation

    • Class xyz.felh.openai.moderation.Moderation

      class Moderation extends Object implements Serializable
    • Class xyz.felh.openai.moderation.ModerationCategories

      class ModerationCategories extends Object implements Serializable
      • Serialized Fields

        • harassment
          Boolean harassment
          Content that expresses, incites, or promotes harassing language towards any target.
        • harassmentThreatening
          Boolean harassmentThreatening
          Harassment content that also includes violence or serious harm towards any target.
        • hate
          Boolean hate
          Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harrassment.
        • hateThreatening
          Boolean hateThreatening
          Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.
        • selfHarm
          Boolean selfHarm
          Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.
        • selfHarmInstructions
          Boolean selfHarmInstructions
          Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.
        • selfHarmIntent
          Boolean selfHarmIntent
          Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.
        • sexual
          Boolean sexual
          Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).
        • sexualMinors
          Boolean sexualMinors
          Sexual content that includes an individual who is under 18 years old.
        • violence
          Boolean violence
          Content that depicts death, violence, or physical injury.
        • violenceGraphic
          Boolean violenceGraphic
          Content that depicts death, violence, or physical injury in graphic detail.
    • Class xyz.felh.openai.moderation.ModerationCategoryScores

      class ModerationCategoryScores extends Object implements Serializable
      • Serialized Fields

        • harassment
          Double harassment
          The score for the category 'harassment'.
        • harassmentThreatening
          Double harassmentThreatening
          The score for the category 'harassment/threatening'.
        • hate
          Double hate
          The score for the category 'hate'.
        • hateThreatening
          Double hateThreatening
          The score for the category 'hate/threatening'.
        • selfHarm
          Double selfHarm
          The score for the category 'self-harm'.
        • selfHarmInstructions
          Double selfHarmInstructions
          The score for the category 'self-harm/instructions'.
        • selfHarmIntent
          Double selfHarmIntent
          The score for the category 'self-harm/intent'.
        • sexual
          Double sexual
          The score for the category 'sexual'.
        • sexualMinors
          Double sexualMinors
          The score for the category 'sexual/minors'.
        • violence
          Double violence
          The score for the category 'violence'.
        • violenceGraphic
          Double violenceGraphic
          The score for the category 'violence/graphic'.