Class UsersClient

java.lang.Object
io.github.stefanbratanov.jvm.openai.UsersClient

public final class UsersClient extends Object
Manage users and their role in an organization. Users will be automatically added to the Default project.

Based on Users

  • Method Details

    • listUsers

      public UsersClient.PaginatedUsers listUsers(Optional<String> after, Optional<Integer> limit)
      Lists all of the users in the organization.
      Parameters:
      after - A cursor for use in pagination. after is an object ID that defines your place in the list.
      limit - A limit on the number of objects to be returned.
      Throws:
      OpenAIException - in case of API errors
    • modifyUser

      public User modifyUser(String userId, ModifyUserRequest request)
      Modifies a user's role in the organization.
      Parameters:
      userId - The ID of the user.
      Throws:
      OpenAIException - in case of API errors
    • retrieveUser

      public User retrieveUser(String userId)
      Retrieves a user by their identifier.
      Parameters:
      userId - The ID of the user.
      Throws:
      OpenAIException - in case of API errors
    • deleteUser

      public DeletionStatus deleteUser(String userId)
      Deletes a user from the organization.
      Parameters:
      userId - The ID of the user.
      Throws:
      OpenAIException - in case of API errors