From 1d8a4837c8fdef177c1ec42528e8d7906490b10e Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 17 Jul 2024 21:35:04 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API --- .github/workflows/ci.yml | 1 + README.md | 10 +--------- src/resources/inference-pipelines/data.ts | 4 ++-- .../api-resources/projects/inference-pipelines.test.ts | 2 +- tests/api-resources/projects/projects.test.ts | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a380da9..d6e734c4 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 f54782b1..c1b034f8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This library provides convenient access to the Openlayer REST API from server-side TypeScript or JavaScript. -The REST API documentation can be found [on openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found on [openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). The full API of this library can be found in [api.md](api.md). It is generated with [Stainless](https://www.stainlessapi.com/). @@ -396,14 +396,6 @@ TypeScript >= 4.5 is supported. The following runtimes are supported: -- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions. -- Deno v1.28.0 or higher, using `import Openlayer from "npm:openlayer"`. -- Bun 1.0 or later. -- Cloudflare Workers. -- Vercel Edge Runtime. -- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time). -- Nitro v2.6 or greater. - Note that React Native is not supported at this time. If you are interested in other runtime environments, please open or upvote an issue on GitHub. diff --git a/src/resources/inference-pipelines/data.ts b/src/resources/inference-pipelines/data.ts index 41e52dbd..a7efd253 100644 --- a/src/resources/inference-pipelines/data.ts +++ b/src/resources/inference-pipelines/data.ts @@ -6,7 +6,7 @@ import * as DataAPI from './data'; export class Data extends APIResource { /** - * Stream production data to an inference pipeline. + * Create an inference data point in an inference pipeline. */ stream( inferencePipelineId: string, @@ -33,7 +33,7 @@ export interface DataStreamParams { | DataStreamParams.TextClassificationData; /** - * A list of entries that represent rows of a csv file + * A list of inference data points with inputs and outputs */ rows: Array>; } diff --git a/tests/api-resources/projects/inference-pipelines.test.ts b/tests/api-resources/projects/inference-pipelines.test.ts index 6b8f0bf0..8daf8af6 100644 --- a/tests/api-resources/projects/inference-pipelines.test.ts +++ b/tests/api-resources/projects/inference-pipelines.test.ts @@ -57,7 +57,7 @@ describe('resource inferencePipelines', () => { await expect( openlayer.projects.inferencePipelines.list( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - { name: 'string', page: 1, perPage: 1 }, + { name: 'name', page: 1, perPage: 1 }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Openlayer.NotFoundError); diff --git a/tests/api-resources/projects/projects.test.ts b/tests/api-resources/projects/projects.test.ts index 1144bd50..1dc80991 100644 --- a/tests/api-resources/projects/projects.test.ts +++ b/tests/api-resources/projects/projects.test.ts @@ -50,7 +50,7 @@ describe('resource projects', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( openlayer.projects.list( - { name: 'string', page: 1, perPage: 1, taskType: 'llm-base' }, + { name: 'name', page: 1, perPage: 1, taskType: 'llm-base' }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Openlayer.NotFoundError);