Use AI.ASK to submit a prompt to OpenAI ( ChatGPT ) and returns the completion
For example:
- =AI.ASK(“Write a tagline for a coffee shop”)
- =AI.ASK(“Extract zip code from”, A2)
- =AI.ASK(“Write a tagline for”, A3, 1)
- =AI.ASK(“Write a tagline for”, A3, 1, 1000)
- =AI.ASK(“Write a tagline for”, A3, 1, 1000, “text-curie-001”)
Syntax
AI.ASK(prompt, [value], [temperature], [maxTokens], [model])
Argument name | Description |
---|---|
prompt | The prompt to submit. |
value OPTIONAL | The value to be added to the end of the prompt. |
temperature OPTIONAL | Controls the creativity of the response, with 0 being the most predictable and 1 being the most random. The default value is 0. |
maxTokens OPTIONAL | 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). |
model OPTIONAL | ID of the model to use. You can use the List models API to see all of your available models. |