OpenAICompletion

Description

The OpenAICompletion component is a component that integrates with the AI features provided by OpenAI. OpenAICompletion returns completions for given prompts. For chat-based functions, please use the OpenAI Chat.

※ To use this OpenAICompletion component, you need to obtain an API Key in advance to call OpenAI's AI function. For how to get an API Key on OpenAI's site, please refer to OpenAI API Key Setup.

openai1-en

Component Properties

Property NameDescriptionExample
Basic PropertiesSpecify the basic properties of the 'OpenAI' category
API KeyAPI Key ※1
Organization IdOrganization ID ※1
UserUsername
ModelChoose or manually input the model name to useText Davinci 003 Text Davinci 002 Text Curie 001 Text Babbage 001 Text Ada 001
TemperatureSpecify the sampling temperature between 0 and 1
PromptPrompt
SuffixSuffix
Max TokensThe maximum number of tokens to be generated
Top-PSpecify nucleus sampling between 0 and 1. Default is 1
NThe number of answers generated per prompt
Log ProbabilitiesInclude the log probabilities of the most likely token and the selected token
EchoAdd the prompt to the answer
StopString to stop token generation
Presence PenaltySpecify whether to use a word that has already appeared again, from -2.0 to 2.0. Default is 0
Frequency PenaltySpecify whether to give a penalty the more often it appears, from -2.0 to 2.0. Default is 0
Best OfControl the number of candidate answers. You specify the number to return, but best_of must be greater than N
Logit BiasParameter to change the likelihood of a specified token appearing

※ Please refer to the OpenAI API Reference for details on each OpenAI-related property.

※1 To use the OpenAICompletion component, you need to obtain an API key. For how to get an API key, please refer to OpenAI API Key Setup.

Output Payload

Output PayloadDescription
cv.PayloadIt stores the response from the OpenAI Completion API as is