diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5813609..008e387 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: pull_request: branches: - main + - next jobs: lint: diff --git a/README.md b/README.md index 4a4d0de..329fd2c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/). ## Documentation -The REST API documentation can be foundĀ [on openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). +The REST API documentation can be foundĀ on [openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). --- @@ -250,3 +250,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. We are keen for your feedback; please open an [issue](https://www.github.com/openlayer-ai/openlayer-java/issues) with questions, bugs, or suggestions. + +## Requirements + +This library requires Java 8 or later. diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParams.kt index e2f6f84..62d6be9 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParams.kt @@ -76,7 +76,7 @@ constructor( /** Configuration for the data stream. Depends on your **Openlayer project task type**. */ @JsonProperty("config") fun config(): Config? = config - /** A list of entries that represent rows of a csv file */ + /** A list of inference data points with inputs and outputs */ @JsonProperty("rows") fun rows(): List? = rows @JsonAnyGetter @@ -135,7 +135,7 @@ constructor( */ @JsonProperty("config") fun config(config: Config) = apply { this.config = config } - /** A list of entries that represent rows of a csv file */ + /** A list of inference data points with inputs and outputs */ @JsonProperty("rows") fun rows(rows: List) = apply { this.rows = rows } fun additionalProperties(additionalProperties: Map) = apply { @@ -248,13 +248,13 @@ constructor( this.config = Config.ofTextClassificationData(textClassificationData) } - /** A list of entries that represent rows of a csv file */ + /** A list of inference data points with inputs and outputs */ fun rows(rows: List) = apply { this.rows.clear() this.rows.addAll(rows) } - /** A list of entries that represent rows of a csv file */ + /** A list of inference data points with inputs and outputs */ fun addRow(row: Row) = apply { this.rows.add(row) } fun additionalQueryParams(additionalQueryParams: Map>) = apply { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsync.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsync.kt index 26d5be9..18a6b9f 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsync.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsync.kt @@ -11,7 +11,7 @@ import java.util.concurrent.CompletableFuture interface DataServiceAsync { - /** Stream production data to an inference pipeline. */ + /** Create an inference data point in an inference pipeline. */ @JvmOverloads fun stream( params: InferencePipelineDataStreamParams, diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsyncImpl.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsyncImpl.kt index 33d3bfc..55b2b75 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsyncImpl.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/DataServiceAsyncImpl.kt @@ -27,7 +27,7 @@ constructor( jsonHandler(clientOptions.jsonMapper) .withErrorHandler(errorHandler) - /** Stream production data to an inference pipeline. */ + /** Create an inference data point in an inference pipeline. */ override fun stream( params: InferencePipelineDataStreamParams, requestOptions: RequestOptions diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataService.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataService.kt index e165559..98680d0 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataService.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataService.kt @@ -10,7 +10,7 @@ import com.openlayer.api.models.InferencePipelineDataStreamResponse interface DataService { - /** Stream production data to an inference pipeline. */ + /** Create an inference data point in an inference pipeline. */ @JvmOverloads fun stream( params: InferencePipelineDataStreamParams, diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataServiceImpl.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataServiceImpl.kt index 34cc6ce..cc9431e 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataServiceImpl.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataServiceImpl.kt @@ -26,7 +26,7 @@ constructor( jsonHandler(clientOptions.jsonMapper) .withErrorHandler(errorHandler) - /** Stream production data to an inference pipeline. */ + /** Create an inference data point in an inference pipeline. */ override fun stream( params: InferencePipelineDataStreamParams, requestOptions: RequestOptions diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListResponseTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListResponseTest.kt index 72defbb..5793bd5 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListResponseTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListResponseTest.kt @@ -38,7 +38,7 @@ class ProjectCommitListResponseTest { .dateCreated(OffsetDateTime.parse("2024-03-22T11:31:01.185Z")) .gitCommitRef("main") .gitCommitSha(123L) - .gitCommitUrl("string") + .gitCommitUrl("gitCommitUrl") .build() ) .dateArchived(OffsetDateTime.parse("2024-03-22T11:31:01.185Z")) @@ -94,7 +94,7 @@ class ProjectCommitListResponseTest { .dateCreated(OffsetDateTime.parse("2024-03-22T11:31:01.185Z")) .gitCommitRef("main") .gitCommitSha(123L) - .gitCommitUrl("string") + .gitCommitUrl("gitCommitUrl") .build() ) .dateArchived(OffsetDateTime.parse("2024-03-22T11:31:01.185Z")) diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCreateResponseTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCreateResponseTest.kt index 1adc950..1fc43bb 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCreateResponseTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCreateResponseTest.kt @@ -40,13 +40,13 @@ class ProjectCreateResponseTest { .dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .gitId(123L) - .name("string") + .name("name") .private_(true) .projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .slug("string") - .url("string") - .branch("string") - .rootDir("string") + .slug("slug") + .url("url") + .branch("branch") + .rootDir("rootDir") .build() ) .build() @@ -86,13 +86,13 @@ class ProjectCreateResponseTest { .dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .gitId(123L) - .name("string") + .name("name") .private_(true) .projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .slug("string") - .url("string") - .branch("string") - .rootDir("string") + .slug("slug") + .url("url") + .branch("branch") + .rootDir("rootDir") .build() ) } diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParamsTest.kt index 170fc1b..671b802 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParamsTest.kt @@ -12,7 +12,7 @@ class ProjectInferencePipelineListParamsTest { fun createProjectInferencePipelineListParams() { ProjectInferencePipelineListParams.builder() .projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .name("string") + .name("name") .page(123L) .perPage(100L) .build() @@ -23,12 +23,12 @@ class ProjectInferencePipelineListParamsTest { val params = ProjectInferencePipelineListParams.builder() .projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .name("string") + .name("name") .page(123L) .perPage(100L) .build() val expected = mutableMapOf>() - expected.put("name", listOf("string")) + expected.put("name", listOf("name")) expected.put("page", listOf("123")) expected.put("perPage", listOf("100")) assertThat(params.getQueryParams()).isEqualTo(expected) diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListParamsTest.kt index 2daea94..daf73e7 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListParamsTest.kt @@ -11,7 +11,7 @@ class ProjectListParamsTest { @Test fun createProjectListParams() { ProjectListParams.builder() - .name("string") + .name("name") .page(123L) .perPage(100L) .taskType(ProjectListParams.TaskType.LLM_BASE) @@ -22,13 +22,13 @@ class ProjectListParamsTest { fun getQueryParams() { val params = ProjectListParams.builder() - .name("string") + .name("name") .page(123L) .perPage(100L) .taskType(ProjectListParams.TaskType.LLM_BASE) .build() val expected = mutableMapOf>() - expected.put("name", listOf("string")) + expected.put("name", listOf("name")) expected.put("page", listOf("123")) expected.put("perPage", listOf("100")) expected.put("taskType", listOf(ProjectListParams.TaskType.LLM_BASE.toString())) diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListResponseTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListResponseTest.kt index 949d211..c30dee9 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListResponseTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListResponseTest.kt @@ -52,13 +52,13 @@ class ProjectListResponseTest { .dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .gitId(123L) - .name("string") + .name("name") .private_(true) .projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .slug("string") - .url("string") - .branch("string") - .rootDir("string") + .slug("slug") + .url("url") + .branch("branch") + .rootDir("rootDir") .build() ) .build() @@ -107,13 +107,13 @@ class ProjectListResponseTest { .dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .gitId(123L) - .name("string") + .name("name") .private_(true) .projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .slug("string") - .url("string") - .branch("string") - .rootDir("string") + .slug("slug") + .url("url") + .branch("branch") + .rootDir("rootDir") .build() ) .build() diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/ProjectServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/ProjectServiceTest.kt index 5fc7f17..a87bdef 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/ProjectServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/ProjectServiceTest.kt @@ -42,7 +42,7 @@ class ProjectServiceTest { val projectListResponse = projectService.list( ProjectListParams.builder() - .name("string") + .name("name") .page(123L) .perPage(100L) .taskType(ProjectListParams.TaskType.LLM_BASE) diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/InferencePipelineServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/InferencePipelineServiceTest.kt index 5ee7b4e..ed1ee7c 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/InferencePipelineServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/InferencePipelineServiceTest.kt @@ -43,7 +43,7 @@ class InferencePipelineServiceTest { inferencePipelineService.list( ProjectInferencePipelineListParams.builder() .projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .name("string") + .name("name") .page(123L) .perPage(100L) .build()