Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Use this filter to send away the values to Open AI.
Usage
add_filter('frm_ai_data', 'your_custom_function');
Parameters
- $data (array)
- $data['prompt'] (string) The prompt setting from the field.
- $data['question'] (string) The combined values of the watched fields.
- $data['temperature'] (float) A number between 0 and 1. Lower values are more focused while higher values are more random.
Examples
Reduce the ChatGPT model temperature
Reduce the temperature for a very focused response.
add_filter( 'frm_ai_data', 'frm_reduce_ai_temp' );
function frm_reduce_ai_temp( $data ) {
$data['temperature'] = 0.2;
return $data;
}