dolibarr 21.0.0-alpha
|
Class for AI. More...
Public Member Functions | |
__construct ($db) | |
Constructor. | |
generateContent ($instructions, $model='auto', $function='textgeneration', $format='') | |
Generate response of instructions. | |
Class for AI.
Definition at line 34 of file ai.class.php.
Ai::__construct | ( | $db | ) |
Ai::generateContent | ( | $instructions, | |
$model = 'auto', | |||
$function = 'textgeneration', | |||
$format = '' ) |
Generate response of instructions.
string | $instructions | Instruction to generate content |
string | $model | Model name ('gpt-3.5-turbo', 'gpt-4-turbo', 'dall-e-3', ...) |
string | $function | Code of the feature we want to use ('textgeneration', 'transcription', 'audiogeneration', 'imagegeneration', 'translation') |
string | $format | Format for output ('', 'html', ...) |
Definition at line 81 of file ai.class.php.
References dol_nl2br(), dol_syslog(), dol_textishtml(), dol_trunc(), getDolGlobalString(), and getURLContent().