new platform\openAi\lib\content() - Object
addText ($string $text = null)
$text |
gibt ein Text als string an |
gibt true zurück, wenn der Text gespeichert wurde; ansonsten false
$content = new platform\openAi\lib\content() ;
$content->addText ('Und kannst du mir etwas zu C++ erzählen' ) ;
addImage ($string $object $image = null[, $string $detail = null])
$image |
gibt eine Bilddatei an, als new file() Objekt, URL, FileID oder Pfad als string |
$detail |
gibt Detailgrad als string an ('high', 'low' oder 'auto') |
gibt true zurück, wenn das Bild gespeichert wurde; ansonsten false
$content = new platform\openAi\lib\content() ;
$content->addImage ('media/img/bilddatei.png' ) ;
addFile ($string $object $file = null)
$file |
gibt eine Datei an, als new file() Objekt, FileID oder Pfad als string |
gibt true zurück, wenn die Datei gespeichert wurde; ansonsten false
$content = new platform\openAi\lib\content() ;
$content->addFile ('media/doc/dokument.txt' ) ;
empty()
gibt true zurück, wenn das Content Objekt leer ist; ansonsten false
$content = new platform\openAi\lib\content() ;
$content->empty() ;
getContent()
gibt den Content als array zurück
$content = new platform\openAi\lib\content() ;
$content->addText ('Und kannst du mir etwas zu C++ erzählen' ) ;
$content->getContent() ;