Class ProjectsClient

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

public final class ProjectsClient extends Object
Manage the projects within an organization includes creation, updating, and archiving or projects. The Default project cannot be modified or archived.

Based on Projects

  • 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

      public Project createProject(CreateProjectRequest request)
      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

      public Project retrieveProject(String projectId)
      Retrieves a project.
      Parameters:
      projectId - The ID of the project.
      Throws:
      OpenAIException - in case of API errors
    • modifyProject

      public Project modifyProject(String projectId, ModifyProjectRequest request)
      Modifies a project in the organization.
      Parameters:
      projectId - The ID of the project.
      Throws:
      OpenAIException - in case of API errors
    • archiveProject

      public Project archiveProject(String projectId)
      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