Skip to main content

<no value>

Project description

SDK Installation

pip install speakeasy-openai

SDK Example Usage

import openai
from openai.models import operations, shared

s = openai.Openai()
   
req = operations.CancelFineTuneRequest(
    path_params=operations.CancelFineTunePathParams(
        fine_tune_id="unde",
    ),
)
    
res = s.open_ai.cancel_fine_tune(req)

if res.fine_tune is not None:
    # handle response

SDK Available Operations

open_ai

  • cancel_fine_tune - Immediately cancel a fine-tune job.

  • create_answer - 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.

  • create_classification - 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.

  • create_completion - Creates a completion for the provided prompt and parameters

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

  • create_embedding - Creates an embedding vector representing the input text.

  • create_file - 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.

  • create_fine_tune - 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

  • create_image - Creates an image given a prompt.
  • create_image_edit - Creates an edited or extended image given an original image and a prompt.
  • create_image_variation - Creates a variation of a given image.
  • create_moderation - Classifies if text violates OpenAI's Content Policy
  • create_search - 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.

  • delete_file - Delete a file.

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

  • download_file - Returns the contents of the specified file

  • list_engines - Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.

  • list_files - Returns a list of files that belong to the user's organization.

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

  • list_fine_tunes - List your organization's fine-tuning jobs

  • list_models - Lists the currently available models, and provides basic information about each one such as the owner and availability.

  • retrieve_engine - Retrieves a model instance, providing basic information about it such as the owner and availability.

  • retrieve_file - Returns information about a specific file.

  • retrieve_fine_tune - Gets info about the fine-tune job.

Learn more about Fine-tuning

  • retrieve_model - Retrieves a model instance, providing basic information about the model such as the owner and permissioning.

SDK Generated by Speakeasy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

speakeasy-openai-1.1.3.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

speakeasy_openai-1.1.3-py3-none-any.whl (39.3 kB view details)

Uploaded Python 3

File details

Details for the file speakeasy-openai-1.1.3.tar.gz.

File metadata

  • Download URL: speakeasy-openai-1.1.3.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for speakeasy-openai-1.1.3.tar.gz
Algorithm Hash digest
SHA256 0b922739949fed93e02797c2655a226655893eaf254014bf4becce75d694cb39
MD5 b1b6f6207c60295b720db52f0ec1980a
BLAKE2b-256 3159e2b71ed8e4a95abdceed4881d48abb81c63b18b40d98a8fa0260516c0f73

See more details on using hashes here.

File details

Details for the file speakeasy_openai-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for speakeasy_openai-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aa9d50bfb099c249dddfdb41e7a3e69625b757f0f7e020bc6fb262fd87d8ea5f
MD5 0a3a1fb1ba5a0742fe527be6c8ed1218
BLAKE2b-256 4aea1e70fc0f28917eab0aa1dfd3bf52ba1a4db13b544f6625ea3ba9ebc6f9cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page