CONST platform\openAi::MODEL_GPT = ['gpt-4o-2024-11-20', 'gpt-4o-mini', 'gpt-4.5-preview', 'gpt-4.1', 'gpt-4.1-mini'] |
Sprachmodelle |
CONST platform\openAi::MODEL_REASONING = ['o4-mini', 'o3-mini', 'o3', 'o1-mini', 'o1', 'o1-pro'] |
Reasoning Sprachmodelle |
CONST platform\openAi::MODEL_REALTIME = ['gpt-4o-mini-realtime-preview', 'gpt-4o-realtime-preview-2024-12-17'] |
Realtime Sprachmodelle |
CONST platform\openAi::MODEL_AUDIO = ['gpt-4o-mini-audio-preview', 'gpt-4o-audio-preview-2024-12-17'] |
Audio Sprachmodelle |
CONST platform\openAi::MODEL_SEARCH = ['gpt-4o-mini-search-preview', 'gpt-4o-search-preview'] |
Websuch Sprachmodelle |
CONST platform\openAi::MODEL_COMPUTERUSE = ['computer-use-preview-2025-03-11'] |
AI Agent Sprachmodelle |
CONST platform\openAi::MODEL_IMAGE = ['gpt-image-1', 'dall-e-3', 'dall-e-2'] |
Image Sprachmodelle |
CONST platform\openAi::MODEL_TTS = ['gpt-4o-mini-tts', 'tts-1-1106', 'tts-1-hd-1106'] |
Text-To-Speech Sprachmodelle |
CONST platform\openAi::MODEL_TRANS = ['gpt-4o-transcribe', 'gpt-4o-mini-transcribe', 'whisper-1'] |
Transcription Sprachmodelle |
CONST platform\openAi::MODEL_EMBEDDINGS = ['text-embedding-3-small', 'text-embedding-3-large', 'text-embedding-ada-002'] |
Embeddings Sprachmodelle |
CONST platform\openAi::MODEL_MODERATION = ['omni-moderation-2024-09-26'] |
Moderation Sprachmodelle |
CONST platform\openAi::GPTIMAGEMIME = ['png', 'jpeg', 'jpg', 'webp', 'gif'] |
Bildgeneration Mime |
CONST platform\openAi::MULTILANG = ['af', 'ar', 'hy', 'az', 'be', 'bs', 'bg', 'ca', 'zh', 'hr', 'cs', 'da', |
Sprachen |
CONST platform\openAi::TTSVOICE = ['alloy', 'ash', 'ballad', 'coral', 'echo', 'fable', 'onyx', 'nova', 'sage', 'shimmer', 'verse'] |
TTS Ausgabesprachen https://platform.openai.com/docs/guides/text-to-speech#voice-options |
CONST platform\openAi::TTSAUDIOMIME = ['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'] |
Audio Ausgabeformate |
CONST platform\openAi::TTSCHATVOICE = ['alloy', 'ash', 'ballad', 'coral', 'echo', 'sage', 'shimmer'] |
TTS Chat Ausgabesprachen |
CONST platform\openAi::TTSCHATAUDIOMIME = ['wav', 'mp3', 'flac', 'opus', 'pcm16'] |
Audio Chat Ausgabeformate |
CONST platform\openAi::TRANSAUDIOMIME = ['flac', 'mp3', 'mp4', 'mpeg', 'mpga', 'm4a', 'ogg', 'wav', 'webm'] |
Transcription Audio Mime |
CONST platform\openAi::TRANSTEXTMIME = ['json', 'txt', 'srt', 'vtt'] |
Transcription Text Mime |
CONST platform\openAi::IMAGESIZE = ['gpt-image-1' => ['1024x1024', '1536x1024', '1024x1536'], |
Image Größen |
CONST platform\openAi::FILEPURPOSE = ['assistants', 'vision', 'batch', 'fine-tune', 'user_data', 'evals'] |
Dateigebrauch |
Audio
static platform\openAi::textToSpeech ($string $text = null[, $array $option = null])
$text |
enthält den zu sprechenden Text als string |
$option |
optional; legt Optionen als $array fest
|
https://platform.openai.com/docs/api-reference/audio/createSpeech
gibt bei Erfolg den Audio-Inhalt einer Datei als string zurück; ansonsten null
gibt bei Erfolg den Audio-Inhalt einer Datei als string zurück; ansonsten null
$speech = platform\openAi::textToSpeech ('Hallo Welt' ) ;
static platform\openAi::speechToText ($string $object $audioFile = null[, $array $option = null])
$audioFile |
enthält die Audio Datei als string oder new file() Objekt (platform\openAi::TRANSAUDIOMIME) |
$option |
optional; legt Optionen als $array fest
|
https://platform.openai.com/docs/api-reference/audio/createTranscription
gibt bei Erfolg den Text als string zurück; ansonsten null
gibt bei Erfolg den Text als string zurück; ansonsten null
$audio = new file ('media/aud/gpt.mp3' ) ;
platform\openAi::speechToText ($audio) ;
Image
static platform\openAi::image ($string $prompt = null[, $array $option = null])
$prompt |
enthält den Prompt für die Bildgenerierung |
$option |
optional; legt Optionen als $array fest
|
https://platform.openai.com/docs/api-reference/images/create
generiert ein Bild, und gibt ein array mit den Bildinformationen zurück; im Fehlerfall null
generiert ein Bild, und gibt ein array mit den Bildinformationen zurück; im Fehlerfall null
$img = platform\openAi::image ('strand am abend, gemütlich, entspannend, mit schönen lichtern, im stil von leonardo davinci' ) ;
static platform\openAi::imageEdit ()
https://platform.openai.com/docs/api-reference/images/createEdit
aktuell nur für Dall-E 2, muss noch ausgearbeitet werden
aktuell nur für Dall-E 2, muss noch ausgearbeitet werden
static platform\openAi::imageVariation ()
https://platform.openai.com/docs/api-reference/images/createVariation
aktuell nur für Dall-E 2, muss noch ausgearbeitet werden
aktuell nur für Dall-E 2, muss noch ausgearbeitet werden
Embeddings
static platform\openAi::embedding ($string $text = null[, $array $option = null])
$text |
Text der berechnet werden soll |
$option |
optional; legt Optionen als $array fest
|
https://platform.openai.com/docs/api-reference/embeddings/create
erfassen semantische Ähnlichkeiten zwischen Texten durch numerische Vektorrepräsentationen
erfassen semantische Ähnlichkeiten zwischen Texten durch numerische Vektorrepräsentationen
$emp = platform\openAi::embedding ('Text der berechnet werden soll' ) ;
Model
static platform\openAi::models ([$string $model = null])
$model |
optional; gibt ein Model von OpenAi an |
https://platform.openai.com/docs/api-reference/models
ruft alle Modelle von OpenAi ab, oder Information über ein einzelnes Model
ruft alle Modelle von OpenAi ab, oder Information über ein einzelnes Model
platform\openAi::models () ;
platform\openAi::models ('o3-mini' ) ;
Moderation
static platform\openAi::moderation ($string $array $input = null)
$input |
enthält Texte und/oder Bilder welche zu prüfen sind |
https://platform.openai.com/docs/api-reference/moderations/create
prüft Texte und Bilder auf nicht angebrachte Ausdrucksweisen, es wird ein array ausgegeben; im Fehlerfall null
prüft Texte und Bilder auf nicht angebrachte Ausdrucksweisen, es wird ein array ausgegeben; im Fehlerfall null
platform\openAi::moderation ('Du bist ein Arschloch!' ) ;
platform\openAi::moderation (['txt' => 'Du bist ein Arschloch!' ] ) ;
platform\openAi::moderation (['img' => 'media/img/testsexual.png' ] ) ;
platform\openAi::moderation (['Du bist ein Arschloch!' , ['img' => 'media/img/testsexual.png' ], ['txt' => 'Du bist ein Arschloch!' ]] ) ;