The Universal AI component is an AI component that allows users to connect the AI models served on the different platforms with standardized input and output formats..
It can carry out the following tasks:
#Release Stage
Alpha
#Configuration
The component definition and tasks are defined in the definition.json and tasks.json files respectively.
#Setup
In order to communicate with the
external application, the following connection details need to be
provided. You may specify them directly in a pipeline recipe as key-value pairs
within the component's setup
block, or you can create a Connection from
the Integration Settings
page and reference the whole setup
as setup: ${connection.<my-connection-id>}
.
Field | Field ID | Type | Note |
---|
API Key | api-key | string | Fill in your API key from the vendor's platform. |
Organization ID | organization | string | Specify which organization is used for the requests. Usage will count against the specified organization's subscription quota. |
#Supported Tasks
#Chat
Generate response base on conversation input
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_CHAT |
Chat Data (required) | data | object | Input data |
Input Parameter | parameter | object | Input parameter |
Input Objects in Chat
Chat Data
Input data
Field | Field ID | Type | Note |
---|
Chat Messages | messages | array | List of chat messages |
Model Name | model | string | The model to be used. Now, it only supports OpenAI model, and will support more models in the future.
Enum valueso1-preview o1-mini gpt-4o-mini gpt-4o gpt-4o-2024-05-13 gpt-4o-2024-08-06 gpt-4-turbo gpt-4-turbo-2024-04-09 gpt-4-0125-preview gpt-4-turbo-preview gpt-4-1106-preview gpt-4-vision-preview gpt-4 gpt-4-0314 gpt-4-0613 gpt-4-32k gpt-4-32k-0314 gpt-4-32k-0613 gpt-3.5-turbo gpt-3.5-turbo-16k gpt-3.5-turbo-0301 gpt-3.5-turbo-0613 gpt-3.5-turbo-1106 gpt-3.5-turbo-0125 gpt-3.5-turbo-16k-0613
|
Chat Messages
List of chat messages
Field | Field ID | Type | Note |
---|
Content | content | array | The message content |
Name | name | string | An optional name for the participant. Provides the model information to differentiate between participants of the same role. |
Role | role | string | The message role, i.e. 'system', 'user' or 'assistant'
Enum values |
Input parameter
Field | Field ID | Type | Note |
---|
Max New Tokens | max-tokens | integer | The maximum number of tokens for model to generate |
Number of Choices | n | integer | How many chat completion choices to generate for each input message. |
Seed | seed | integer | The seed, default is 0 |
Stream | stream | boolean | If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available. |
Temperature | temperature | number | The temperature for sampling |
Top P | 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. |
Output Objects in Chat
Output Data
Field | Field ID | Type | Note |
---|
Choices | choices | array | List of chat completion choices |
Choices
Field | Field ID | Type | Note |
---|
Created | created | integer | The Unix timestamp (in seconds) of when the chat completion was created. |
Finish Reason | finish-reason | string | The reason the model stopped generating tokens. |
Index | index | integer | The index of the choice in the list of choices. |
Message | message | object | A chat message generated by the model. |
Message
Field | Field ID | Type | Note |
---|
Content | content | string | The contents of the message. |
Role | role | string | The role of the author of this message. |
Field | Field ID | Type | Note |
---|
Usage | usage | object | Usage statistics for the request. |
Usage
Field | Field ID | Type | Note |
---|
Completion Tokens | completion-tokens | integer | Number of tokens in the generated response. |
Prompt Tokens | prompt-tokens | integer | Number of tokens in the prompt. |
Total Tokens | total-tokens | integer | Total number of tokens used in the request (prompt + completion). |