Class ProjectsClient
java.lang.Object
io.github.stefanbratanov.jvm.openai.ProjectsClient
Manage the projects within an organization includes creation, updating, and archiving or
projects. The Default project cannot be modified or archived.
Based on Projects
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionarchiveProject
(String projectId) Archives a project in the organization.createProject
(CreateProjectRequest request) Create a new project in the organization.Returns a list of projects.modifyProject
(String projectId, ModifyProjectRequest request) Modifies a project in the organization.retrieveProject
(String projectId) Retrieves a project.
-
Method Details
-
listProjects
public ProjectsClient.PaginatedProjects listProjects(Optional<String> after, Optional<Integer> limit, Optional<Boolean> includeArchived) Returns a list of projects.- 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.includeArchived
- If true returns all projects including those that have been archived. Archived projects are not included by default.- Throws:
OpenAIException
- in case of API errors
-
createProject
Create a new project in the organization. Projects can be created and archived, but cannot be deleted.- Throws:
OpenAIException
- in case of API errors
-
retrieveProject
Retrieves a project.- Parameters:
projectId
- The ID of the project.- Throws:
OpenAIException
- in case of API errors
-
modifyProject
Modifies a project in the organization.- Parameters:
projectId
- The ID of the project.- Throws:
OpenAIException
- in case of API errors
-
archiveProject
Archives a project in the organization. Archived projects cannot be used or updated.- Parameters:
projectId
- The ID of the project.- Throws:
OpenAIException
- in case of API errors
-