transform-columns
transform-columns
adaptor transforms values in specified columns using an OpenAI language model.
Description
Inputs
data
Type: datatable
Required: Yes
The datatable containing the columns to be transformed.
columns
Type: list
Required: Yes
The list of columns to be transformed.
model
Type: text
Required: No
The name of the language models to run. Consider price points of each model. If unspecified, defaults to gpt-3.5-turbo
.
system message
Type: text
Required: Yes
The system message helps set the behavior of the assistant. You can modify the personality of the assistant or provide specific instructions about how it should behave throughout the conversation.
api token
Type: text
Required: Yes
OpenAI API token
Outputs
data
Type: datatable
A datatable with the specified columns transformed.
summary
Type: dictionary
A summary of the transformed values.
Examples
Example 1: Default behaviour.
Inputs:
data:
1
GB
United Kingdom
2
TR
Turkey
3
US
United States
4
IND
India
5
IND
India
6
us
United States
columns:
code
model:
null (empty)
system message:
You will be provided a country code and your job is to return the country code in lowercase
api token:
12345
Outputs:
data
:
1
gb
United Kingdom
2
tr
Turkey
3
us
United States
4
ind
India
5
ind
India
6
us
United States
-> Transformed the column code
into lowercase.
Last updated