|
dolibarr 20.0.5
|
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 33 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', 'audiotext', 'imagegeneration', 'translation') |
| string | $format | Format for output ('', 'html', ...) |
Definition at line 80 of file ai.class.php.
References dol_nl2br(), dol_syslog(), dol_textishtml(), getDolGlobalString(), and getURLContent().