Skip to content

Commit

Permalink
Merge pull request #1 from speakeasy-sdks/speakeasy-sdk-regen-1677087220
Browse files Browse the repository at this point in the history
chore: speakeasy SDK regeneration
  • Loading branch information
ndimares authored Feb 22, 2023
2 parents 73ed940 + 0dea482 commit 7d1b358
Show file tree
Hide file tree
Showing 74 changed files with 4,469 additions and 1 deletion.
103 changes: 103 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# @openai/sdk

<!-- Start SDK Installation -->
## SDK Installation

### NPM

```bash
npm add @openai/sdk
```

### Yarn

```bash
yarn add @openai/sdk
```
<!-- End SDK Installation -->

## SDK Example Usage
<!-- Start SDK Example Usage -->
```typescript
import { Openai, withSecurity} from "@openai/sdk";
import { CancelFineTuneRequest, CancelFineTuneResponse } from "@openai/sdk/src/sdk/models/operations";
import { AxiosError } from "axios";


const sdk = new Openai();

const req: CancelFineTuneRequest = {
pathParams: {
fineTuneId: "unde",
},
};

sdk.openAI.cancelFineTune(req).then((res: CancelFineTuneResponse | AxiosError) => {
// handle response
});
```
<!-- End SDK Example Usage -->

<!-- Start SDK Available Operations -->
## SDK Available Operations


### openAI

* `cancelFineTune` - Immediately cancel a fine-tune job.

* `createAnswer` - Answers the specified question using the provided documents and examples.

The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).

* `createClassification` - Classifies the specified `query` using provided examples.

The endpoint first [searches](/docs/api-reference/searches) over the labeled examples
to select the ones most relevant for the particular query. Then, the relevant examples
are combined with the query to construct a prompt to produce the final label via the
[completions](/docs/api-reference/completions) endpoint.

Labeled examples can be provided via an uploaded `file`, or explicitly listed in the
request using the `examples` parameter for quick tests and small scale use cases.

* `createCompletion` - Creates a completion for the provided prompt and parameters
* `createEdit` - Creates a new edit for the provided input, instruction, and parameters
* `createEmbedding` - Creates an embedding vector representing the input text.
* `createFile` - Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.

* `createFineTune` - Creates a job that fine-tunes a specified model from a given dataset.

Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.

[Learn more about Fine-tuning](/docs/guides/fine-tuning)

* `createImage` - Creates an image given a prompt.
* `createImageEdit` - Creates an edited or extended image given an original image and a prompt.
* `createImageVariation` - Creates a variation of a given image.
* `createModeration` - Classifies if text violates OpenAI's Content Policy
* `createSearch` - The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them.

To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores.

The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.

* `deleteFile` - Delete a file.
* `deleteModel` - Delete a fine-tuned model. You must have the Owner role in your organization.
* `downloadFile` - Returns the contents of the specified file
* `listEngines` - Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
* `listFiles` - Returns a list of files that belong to the user's organization.
* `listFineTuneEvents` - Get fine-grained status updates for a fine-tune job.

* `listFineTunes` - List your organization's fine-tuning jobs

* `listModels` - Lists the currently available models, and provides basic information about each one such as the owner and availability.
* `retrieveEngine` - Retrieves a model instance, providing basic information about it such as the owner and availability.
* `retrieveFile` - Returns information about a specific file.
* `retrieveFineTune` - Gets info about the fine-tune job.

[Learn more about Fine-tuning](/docs/guides/fine-tuning)

* `retrieveModel` - Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
<!-- End SDK Available Operations -->

### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
7 changes: 7 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@


## Version 1.2.0
### Changes
Based on:
- OpenAPI Doc 1.1.0 https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml
- Speakeasy CLI 1.4.7 https://github.com/speakeasy-api/speakeasy
20 changes: 20 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Start SDK Example Usage -->
```typescript
import { Openai, withSecurity} from "@openai/sdk";
import { CancelFineTuneRequest, CancelFineTuneResponse } from "@openai/sdk/src/sdk/models/operations";
import { AxiosError } from "axios";


const sdk = new Openai();

const req: CancelFineTuneRequest = {
pathParams: {
fineTuneId: "unde",
},
};

sdk.openAI.cancelFineTune(req).then((res: CancelFineTuneResponse | AxiosError) => {
// handle response
});
```
<!-- End SDK Example Usage -->
70 changes: 70 additions & 0 deletions files.gen
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
src/sdk/openai.ts
src/sdk/sdk.ts
package-lock.json
package.json
src/index.ts
src/internal/utils/contenttype.ts
src/internal/utils/headers.ts
src/internal/utils/index.ts
src/internal/utils/pathparams.ts
src/internal/utils/queryparams.ts
src/internal/utils/requestbody.ts
src/internal/utils/retries.ts
src/internal/utils/security.ts
src/internal/utils/utils.ts
src/sdk/index.ts
tsconfig.json
src/sdk/models/operations/cancelfinetune.ts
src/sdk/models/operations/createanswer.ts
src/sdk/models/operations/createclassification.ts
src/sdk/models/operations/createcompletion.ts
src/sdk/models/operations/createedit.ts
src/sdk/models/operations/createembedding.ts
src/sdk/models/operations/createfile.ts
src/sdk/models/operations/createfinetune.ts
src/sdk/models/operations/createimage.ts
src/sdk/models/operations/createimageedit.ts
src/sdk/models/operations/createimagevariation.ts
src/sdk/models/operations/createmoderation.ts
src/sdk/models/operations/createsearch.ts
src/sdk/models/operations/deletefile.ts
src/sdk/models/operations/deletemodel.ts
src/sdk/models/operations/downloadfile.ts
src/sdk/models/operations/listengines.ts
src/sdk/models/operations/listfiles.ts
src/sdk/models/operations/listfinetuneevents.ts
src/sdk/models/operations/listfinetunes.ts
src/sdk/models/operations/listmodels.ts
src/sdk/models/operations/retrieveengine.ts
src/sdk/models/operations/retrievefile.ts
src/sdk/models/operations/retrievefinetune.ts
src/sdk/models/operations/retrievemodel.ts
src/sdk/models/operations/index.ts
src/sdk/models/shared/createanswerresponse.ts
src/sdk/models/shared/createanswerrequest.ts
src/sdk/models/shared/createclassificationresponse.ts
src/sdk/models/shared/createclassificationrequest.ts
src/sdk/models/shared/createcompletionresponse.ts
src/sdk/models/shared/createcompletionrequest.ts
src/sdk/models/shared/createeditresponse.ts
src/sdk/models/shared/createeditrequest.ts
src/sdk/models/shared/createembeddingresponse.ts
src/sdk/models/shared/createembeddingrequest.ts
src/sdk/models/shared/createfilerequest.ts
src/sdk/models/shared/createfinetunerequest.ts
src/sdk/models/shared/createimagerequest.ts
src/sdk/models/shared/createimageeditrequest.ts
src/sdk/models/shared/createimagevariationrequest.ts
src/sdk/models/shared/createmoderationresponse.ts
src/sdk/models/shared/createmoderationrequest.ts
src/sdk/models/shared/createsearchresponse.ts
src/sdk/models/shared/createsearchrequest.ts
src/sdk/models/shared/deletefileresponse.ts
src/sdk/models/shared/deletemodelresponse.ts
src/sdk/models/shared/listenginesresponse.ts
src/sdk/models/shared/listfilesresponse.ts
src/sdk/models/shared/listfinetuneeventsresponse.ts
src/sdk/models/shared/listfinetunesresponse.ts
src/sdk/models/shared/listmodelsresponse.ts
src/sdk/models/shared/index.ts
USAGE.md
6 changes: 5 additions & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
management:
openapi-checksum: 070eea1a67c4e5af9e7dbad61d95fd37
openapi-version: 1.1.0
speakeasy-version: 1.4.7
typescript:
version: 1.1.0
version: 1.2.0
packagename: '@openai/sdk'
author: openai
sdkclassname: openai
Loading

0 comments on commit 7d1b358

Please sign in to comment.