Create Chat Completion
Creates a completion for the chat message.
Basic Parameters
Parameter | Description |
---|---|
Max Tokens | The maximum number of tokens to generate in the completion. |
Messages | The messages to generate chat completions for, in the chat format. |
Model | ID of the model to use. Currently, only gpt-3.5-turbo and gpt-3.5-turbo-0301 are supported. |
Advanced Parameters
Parameter | Description |
---|---|
Stop | Up to 4 sequences where the API will stop generating further tokens. |
Temperature | 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. We generally recommend altering this or top_p but not both. |
User | A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. |
Example Output
{
"choices": [
{
"finish_reason": "string",
"index": 0,
"message": {
"content": "The contents of the message",
"role": "The role of the author of this message."
}
}
],
"created": 0,
"id": "string",
"model": "string",
"object": "string",
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0
}
}
Automation Library Example
Create Chat Completion with Openai and Send Results Via Email
Preview this Automation on desktop