Basic Information

appmixer.openai.core.createChatCompletion

1.0.0

Public

Properties

FieldTypeDescription
No properties defined

Input Ports

in

FieldTypeDescription
Model select

ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API. Example: gpt-3.5-turbo

Frequency Penalty number

Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

See more information about frequency and presence penalties.

Max Tokens number

The maximum number of tokens to generate in the chat completion.

The total length of input tokens and generated tokens is limited by the model's context length. Example Python code for counting tokens.

N number

How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. Example: 1

Presence Penalty number

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

See more information about frequency and presence penalties.

Seed number

This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.

Stop text -
Stream toggle

If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Example Python code.

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.

We generally recommend altering this or top_p but not both. Example: 1

Top P number

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.

We generally recommend altering this or temperature but not both. Example: 1

Tools textarea

A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.

JSON array. Example: [{"type":"function","function":{"description":"sed incididunt consectetur Excepteur dolore","name":"nisi","parameters":{}}}].
Tool Choice select

none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function.

User text

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. Example: user-1234

Function Call select

none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function.

Functions textarea

Deprecated in favor of tools.

A list of functions the model may generate JSON inputs for.

JSON array. Example: [{"description":"ut incididunt labore reprehenderit","name":"elit quis","parameters":{}}].
Prompt Role select

The role of the messages author. One of system, user, assistant, or function.

Prompt Content text

The content of the message.

Prompt Name text

The name of the author of this message. name is required if role is function, and it should be the name of the function whose response is in the content. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of 64 characters.

Response Format Type select

Must be one of text or json_object. Example: json_object

Output Ports

out

FieldTypeDescription
Id -
Choices -
Created -
Model -
System Fingerprint -
Object -
Usage -
Usage Completion Tokens -
Usage Prompt Tokens -
Usage Total Tokens -

Full Metadata