Ai
class Ai (View source)
Class for AI
Constants
| AI_DEFAULT_PROMPT_FOR_EMAIL |
|
| AI_DEFAULT_PROMPT_FOR_WEBPAGE |
|
| AI_DEFAULT_PROMPT_FOR_TEXT_TRANSLATION |
|
| AI_DEFAULT_PROMPT_FOR_TEXT_SUMMARIZE |
|
| AI_DEFAULT_PROMPT_FOR_TEXT_REPHRASER |
|
| AI_DEFAULT_PROMPT_FOR_EXTRAFIELD_FILLER |
|
Properties
| protected DoliDB | $db |
Methods
string|array{error: bool, message: string, code?: int, curl_error_no?: int, format?: string, service?: string, function?: string}
generateContent(string $instructions, string $model = 'auto', string $function = 'textgeneration', string $format = '')
Generate response of instructions
Details
__construct(DoliDB $db)
Constructor
string|array{error: bool, message: string, code?: int, curl_error_no?: int, format?: string, service?: string, function?: string}
generateContent(string $instructions, string $model = 'auto', string $function = 'textgeneration', string $format = '')
Generate response of instructions