GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
OpenAI::API::Request::Edit(3) User Contributed Perl Documentation OpenAI::API::Request::Edit(3)

OpenAI::API::Request::Edit - Request class for OpenAI API content editing

    use OpenAI::API::Request::Edit;
    my $request = OpenAI::API::Request::Edit->new(
        model       => "text-davinci-edit-001",
        instruction => 'Correct the grammar in the following text:',
        input       => 'the cat sat on teh mat.',
    );
    my $res  = $request->send();            # or: my $res  = $request->send(%args)
    my $text = $res->{choices}[0]{text};    # or: my $text = "$res";

This module provides a request class for interacting with the OpenAI API's content editing endpoint. It inherits from OpenAI::API::Request.

ID of the model to use. You can use the text-davinci-edit-001 or code-davinci-edit-001 model with this endpoint.

The input text to use as a starting point for the edit.

The instruction that tells the model how to edit the prompt.

How many edits to generate for the input and instruction.

What sampling temperature to use, between 0 and 2.

An alternative to sampling with temperature.

This module inherits the following methods from OpenAI::API::Request:

OpenAI::API::Request, OpenAI::API::Config

2023-04-09 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.