class OpenAI::CreateEditCompletion

Overview

POST https://api.openai.com/v1/edits

Included Modules

Extended Modules

Defined in:

open_ai/models/edit_completion.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def input : String #

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


[View source]
def input=(input : String) #

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


[View source]
def instruction : String #

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


[View source]
def instruction=(instruction : String) #

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


[View source]
def model : String #

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


[View source]
def model=(model : String) #

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


[View source]
def num_completions : Int32 #

How many completions to generate for each prompt.


[View source]
def num_completions=(num_completions : Int32) #

How many completions to generate for each prompt.


[View source]
def temperature : Float64 #

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.


[View source]
def temperature=(temperature : Float64) #

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.


[View source]
def top_p : Float64 #

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. Alter this or temperature but not both.


[View source]
def top_p=(top_p : Float64) #

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. Alter this or temperature but not both.


[View source]