askopenai - Ask OpenAI
Get answer from OpenAI GPT. Will be charged per used OpenAI tokens.
This function is a service that allows you to ask OpenAI's GPT model a question and get an answer in return. It's an artificial intelligence language model that can generate human-like text based on the input it receives.
To use this function simply provide a prompt (the question you want to ask) in the JSON format, and specify other properties such as the sampling temperature and maximum number of tokens to generate. Using this function requires tokens, and you will be charged based on the number of tokens used.
prompt
string
Prompt that will be send to OpenAI
Example:
Explain nocode software development to a six year old kid.
temperature
number
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.
Maximum: 2
Example:
0.8
maxTokens
number
The maximum number of tokens to generate in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length. Most models have a context length of 2048 tokens(except for the newest models, which support 4096). 1 token ~= 4 chararcters in english, 1 token ~= 3/4 words
Example:
16
model
string
Open AI model to be used. Defaults to text-davinci-003
Possible values are: text-davinci-003, text-davinci-002, text-curie-001, text-babbage-001, text-ada-001
Example:
text-davinci-003