diff --git a/api.md b/api.md index 3dcaf64a..92cf0fb4 100644 --- a/api.md +++ b/api.md @@ -60,11 +60,11 @@ Methods: Types: -- RowStreamResponse +- RowUpdateResponse Methods: -- client.inferencePipelines.rows.stream(inferencePipelineId, { ...params }) -> RowStreamResponse +- client.inferencePipelines.rows.update(inferencePipelineId, { ...params }) -> RowUpdateResponse ## TestResults diff --git a/src/resources/inference-pipelines/index.ts b/src/resources/inference-pipelines/index.ts index 5f050627..fcbc6fa7 100644 --- a/src/resources/inference-pipelines/index.ts +++ b/src/resources/inference-pipelines/index.ts @@ -2,5 +2,5 @@ export { DataStreamResponse, DataStreamParams, Data } from './data'; export { InferencePipelines } from './inference-pipelines'; -export { RowStreamResponse, RowStreamParams, Rows } from './rows'; +export { RowUpdateResponse, RowUpdateParams, Rows } from './rows'; export { TestResultListResponse, TestResultListParams, TestResults } from './test-results'; diff --git a/src/resources/inference-pipelines/inference-pipelines.ts b/src/resources/inference-pipelines/inference-pipelines.ts index 51c2d1e5..c5d962e0 100644 --- a/src/resources/inference-pipelines/inference-pipelines.ts +++ b/src/resources/inference-pipelines/inference-pipelines.ts @@ -16,8 +16,8 @@ export namespace InferencePipelines { export import DataStreamResponse = DataAPI.DataStreamResponse; export import DataStreamParams = DataAPI.DataStreamParams; export import Rows = RowsAPI.Rows; - export import RowStreamResponse = RowsAPI.RowStreamResponse; - export import RowStreamParams = RowsAPI.RowStreamParams; + export import RowUpdateResponse = RowsAPI.RowUpdateResponse; + export import RowUpdateParams = RowsAPI.RowUpdateParams; export import TestResults = TestResultsAPI.TestResults; export import TestResultListResponse = TestResultsAPI.TestResultListResponse; export import TestResultListParams = TestResultsAPI.TestResultListParams; diff --git a/src/resources/inference-pipelines/rows.ts b/src/resources/inference-pipelines/rows.ts index b834dd02..f8f40854 100644 --- a/src/resources/inference-pipelines/rows.ts +++ b/src/resources/inference-pipelines/rows.ts @@ -8,11 +8,11 @@ export class Rows extends APIResource { /** * Update an inference data point in an inference pipeline. */ - stream( + update( inferencePipelineId: string, - params: RowStreamParams, + params: RowUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { inferenceId, ...body } = params; return this._client.put(`/inference-pipelines/${inferencePipelineId}/rows`, { query: { inferenceId }, @@ -22,11 +22,11 @@ export class Rows extends APIResource { } } -export interface RowStreamResponse { +export interface RowUpdateResponse { success: true; } -export interface RowStreamParams { +export interface RowUpdateParams { /** * Query param: Specify the inference id as a query param. */ @@ -40,10 +40,10 @@ export interface RowStreamParams { /** * Body param: */ - config?: RowStreamParams.Config | null; + config?: RowUpdateParams.Config | null; } -export namespace RowStreamParams { +export namespace RowUpdateParams { export interface Config { /** * Name of the column with the ground truths. @@ -76,6 +76,6 @@ export namespace RowStreamParams { } export namespace Rows { - export import RowStreamResponse = RowsAPI.RowStreamResponse; - export import RowStreamParams = RowsAPI.RowStreamParams; + export import RowUpdateResponse = RowsAPI.RowUpdateResponse; + export import RowUpdateParams = RowsAPI.RowUpdateParams; } diff --git a/tests/api-resources/inference-pipelines/rows.test.ts b/tests/api-resources/inference-pipelines/rows.test.ts index 4349ab6f..14ee331c 100644 --- a/tests/api-resources/inference-pipelines/rows.test.ts +++ b/tests/api-resources/inference-pipelines/rows.test.ts @@ -9,8 +9,8 @@ const openlayer = new Openlayer({ }); describe('resource rows', () => { - test('stream: only required params', async () => { - const responsePromise = openlayer.inferencePipelines.rows.stream('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + test('update: only required params', async () => { + const responsePromise = openlayer.inferencePipelines.rows.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { inferenceId: 'inferenceId', row: {}, }); @@ -23,8 +23,8 @@ describe('resource rows', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('stream: required and optional params', async () => { - const response = await openlayer.inferencePipelines.rows.stream('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + test('update: required and optional params', async () => { + const response = await openlayer.inferencePipelines.rows.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { inferenceId: 'inferenceId', row: {}, config: {