Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ Methods:

Types:

- <code><a href="./src/resources/inference-pipelines/rows.ts">RowStreamResponse</a></code>
- <code><a href="./src/resources/inference-pipelines/rows.ts">RowUpdateResponse</a></code>

Methods:

- <code title="put /inference-pipelines/{inferencePipelineId}/rows">client.inferencePipelines.rows.<a href="./src/resources/inference-pipelines/rows.ts">stream</a>(inferencePipelineId, { ...params }) -> RowStreamResponse</code>
- <code title="put /inference-pipelines/{inferencePipelineId}/rows">client.inferencePipelines.rows.<a href="./src/resources/inference-pipelines/rows.ts">update</a>(inferencePipelineId, { ...params }) -> RowUpdateResponse</code>

## TestResults

Expand Down
2 changes: 1 addition & 1 deletion src/resources/inference-pipelines/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
4 changes: 2 additions & 2 deletions src/resources/inference-pipelines/inference-pipelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
18 changes: 9 additions & 9 deletions src/resources/inference-pipelines/rows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<RowStreamResponse> {
): Core.APIPromise<RowUpdateResponse> {
const { inferenceId, ...body } = params;
return this._client.put(`/inference-pipelines/${inferencePipelineId}/rows`, {
query: { inferenceId },
Expand All @@ -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.
*/
Expand All @@ -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.
Expand Down Expand Up @@ -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;
}
8 changes: 4 additions & 4 deletions tests/api-resources/inference-pipelines/rows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
});
Expand All @@ -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: {
Expand Down