pub struct OpenAiClient { /* private fields */ }

Implementations

Lists the currently available engines, and provides basic information about each one such as the owner and availability.

See endpoint docs at https://beta.openai.com/docs/api-reference/engines/list.

Retrieves an engine instance, providing basic information about the engine such as the owner and availability.

Creates a new completion for the provided prompt and parameters

Creates a completion using a fine-tuned model

Creates a new edit for the provided input, instruction, and parameters

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.

Returns a list of files that belong to the user’s organization.

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.

Returns information about a specific file.

Delete a file.

Returns the contents of the specified file

Answers the specified question using the provided documents and examples.

The endpoint first 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.

Classifies the specified query using provided examples.

The endpoint first 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 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.

List your organization’s fine-tuning jobs

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

Gets info about the fine-tune job.

Learn more about Fine-tuning

Immediately cancel a fine-tune job.

Get fine-grained status updates for a fine-tune job.

Delete a fine-tuned model. You must have the Owner role in your organization.

Creates an embedding vector representing the input text.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more