Class UsersClient
java.lang.Object
io.github.stefanbratanov.jvm.openai.UsersClient
Manage users and their role in an organization. Users will be automatically added to the Default
project.
Based on Users
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondeleteUser(String userId) Deletes a user from the organization.Lists all of the users in the organization.modifyUser(String userId, ModifyUserRequest request) Modifies a user's role in the organization.retrieveUser(String userId) Retrieves a user by their identifier.
-
Method Details
-
listUsers
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
Modifies a user's role in the organization.- Parameters:
userId- The ID of the user.- Throws:
OpenAIException- in case of API errors
-
retrieveUser
Retrieves a user by their identifier.- Parameters:
userId- The ID of the user.- Throws:
OpenAIException- in case of API errors
-
deleteUser
Deletes a user from the organization.- Parameters:
userId- The ID of the user.- Throws:
OpenAIException- in case of API errors
-