VectorStore [extends \platform\openAi] - (platform\openAi\vectorStore.class.php)

Vektor Store

static platform\openAi\vectorStore::createVector ([$string $name = null[, $string $array $fileIds = null[, $array $options = null]]])
$name optional; Name des Vecotor Store
$fileIds optional; Liste der File IDs
$options optional; legt Optionen als $array fest
[
  'expires_after' | 'expire' => null // Verfallsregel für einen Vektor Store, als integer in Tagen seit der letzten Nutzung
  'metadata' => null // Daten als assoziatives array, max 16 Datensätze
]
https://platform.openai.com/docs/api-reference/vector-stores/create

erstellt einen Vector Store und gibt diesen als array zurück; im Fehlerfall null
platform\openAi\vectorStore::createVector ('Gesetze im Internet', 'file-aia75zFVocj5R4TaKxy3xLfN');
static platform\openAi\vectorStore::isVectorId ($string $vectorId = null)
$vectorId enthält die Vector ID
prüft die angegebene Variable, ob diese eine Vector ID ist und gibt true oder falsezurück
platform\openAi\vectorStore::isVectorId('vs_6wet23f345zserg45424');
static platform\openAi\vectorStore::vectorIdExists ($string $vectorId = null)
$vectorId enthält die Vector ID
prüft ob der Vecotr mit der angegebenen ID existiert und gibt true oder false zurück
platform\openAi\vectorStore::vectorIdExists('vs_6wet23f345zserg45424');
static platform\openAi\vectorStore::getVectorList ([$array $options = null])
$options optional; Query:
[
  'limit' => null, // integer, maximale Vector Stores die aufgelistet werden sollen
  'order' => null, // string, Sortierung 'created_at', 'asc' oder 'desc'
  'after' => null, // string, ID des Vector Store
  'before' => null, // string, ID des Vector Store
]
https://platform.openai.com/docs/api-reference/vector-stores/list

listet alle Vector Stores in einem array auf; im Fehlerfall null
print_r (platform\openAi\vectorStore::getVectorList());
static platform\openAi\vectorStore::getVector ($string $vectorId = null)
$vectorId enthält die Vector ID
https://platform.openai.com/docs/api-reference/vector-stores/retrieve

gibt den Vector Store als array zurück; ansonsten null
print_r (platform\openAi\vectorStore::getVector('vs_6wet23f345zserg45424'));
static platform\openAi\vectorStore::modifyVector ($string $vectorId = null[, $array $options = null])
$vectorId enthält die Vector ID
$options optional; legt Optionen als $array fest
[
  'name' => null // Name des Vecotor Store
  'expires_after' | 'expire' => null // Verfallsregel für einen Vektor Store, als integer in Tagen seit der letzten Nutzung
  'metadata' => array() // Daten als assoziatives array, max 16 Datensätze
]
https://platform.openai.com/docs/api-reference/vector-stores/modify

modifiziert einen Vector Store und gibt diesen als array zurück; im Fehlerfall null
platform\openAi\vectorStore::modifyVector ('vs_6wet23f345zserg45424', ['name' => 'Gesetze im Internet']);
static platform\openAi\vectorStore::deleteVector ($string $vectorId = null)
$vectorId enthält die Vector ID
https://platform.openai.com/docs/api-reference/vector-stores/delete

löscht einen Vector Store und gibt ein array zurück; im Fehlerfall null
platform\openAi\vectorStore::deleteVector ('vs_6wet23f345zserg45424');
static platform\openAi\vectorStore::searchVector ($string $vectorId = null, $string $query = null[, $array $options = null])
$vectorId enthält die Vector ID
$query enthält die Anfrage an den VektorStore
$options optional; legt Optionen als $array fest
[
  'max_num_results' => null // integer, Anzahl der maximalen Ergebnisse, zwischen 1 und 50
  'ranker' => null // string, gibt den Ranker an
  'score_threshold' => null // float, gibt den Score Threshold an
  'rewrite_query' => null // bool, gibt mit true an ob die natürliche Sprachabfrage für die Vektorsuche umgeschrieben werden soll
  'filters' => null // array, siehe Filters
]


Filters:
[
  'type' => 'eq' // 'eq': equals, 'ne': not equal, 'gt': greater than, 'gte': greater than or equal, 'lt': less than, 'lte': less than or equal
  'key' => 'test' // gibt ein Key als String an
  'value' => 1 // gibt den Wert an, als bool, numeric oder string
]


[
  'filters' => #FILTERS // als array; ['type' => 'eq', 'key' => 'test', 'value' => 1]
  'type' => 'and' // gibt den Filtertyp an; 'and' oder 'or'
]
https://platform.openai.com/docs/api-reference/vector-stores/search

durchsucht einen Vector Store und gibt das Ergebnis als array zurück; im Fehlerfall null
platform\openAi\vectorStore::searchVector ('vs_6wet23f345zserg45424', 'finde ein passendes Gesetz für ...');

Vektor Store File

static platform\openAi\vectorStore::createVectorFile ($string $vectorId = null, $string $fileId = null[, $array $attributes = null])
$vectorId enthält die Vector ID
$fileId enthält die File ID
$attributes optional; enthält zusätzliche Informationen als array die angehängt werden können [KEY => VALUE]
https://platform.openai.com/docs/api-reference/vector-stores-files/createFile

fügt eine File ID zu einem File Vector Store hinzu und gibt ein array zurück; im Fehlerfall null
platform\openAi\vectorStore::createVectorFile ('vs_6wet23f345zserg45424', 'file-aia75zFVocj5R4TaKxy3xLfN');
static platform\openAi\vectorStore::getVectorFileList ($string $vectorId = null[, $array $options = null])
$vectorId enthält die Vector ID
$options optional; Query:
[
  'limit' => null, // integer, maximale Vector Stores die aufgelistet werden sollen
  'order' => null, // string, Sortierung 'created_at', 'asc' oder 'desc'
  'after' => null, // string, ID des Vector Store
  'before' => null, // string, ID des Vector Store
  'filter' => null, // string, Filter Status 'in_progress', 'completed', 'failed' oder 'cancelled'
]
https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles

listet alle Files im Vector Store in einem array auf; im Fehlerfall null
platform\openAi\vectorStore::getVectorFileList ('vs_6wet23f345zserg45424');
static platform\openAi\vectorStore::getVectorFile ($string $vectorId = null, $string $fileId = null)
$vectorId enthält die Vector ID
$fileId enthält die File ID
https://platform.openai.com/docs/api-reference/vector-stores-files/getFile

gibt ein File als array zurück; im Fehlerfall null
platform\openAi\vectorStore::getVectorFile ('vs_6wet23f345zserg45424', 'file-aia75zFVocj5R4TaKxy3xLfN');
static platform\openAi\vectorStore::getVectorFileContent ($string $vectorId = null, $string $fileId = null)
$vectorId enthält die Vector ID
$fileId enthält die File ID
https://platform.openai.com/docs/api-reference/vector-stores-files/getContent

gibt den Dateiinhalt als array zurück; im Fehlerfall null
platform\openAi\vectorStore::getVectorFileContent ('vs_6wet23f345zserg45424', 'file-aia75zFVocj5R4TaKxy3xLfN');
static platform\openAi\vectorStore::updateVectorFile ($string $vectorId = null, $string $fileId = null[, $array $attributes = null])
$vectorId enthält die Vector ID
$fileId enthält die File ID
$attributes optional; enthält zusätzliche Informationen als array die angehängt werden können [KEY => VALUE]
https://platform.openai.com/docs/api-reference/vector-stores-files/updateAttributes

aktualisiert ein VectorStore Datei und gibt ein array zurück; im Fehlerfall null
platform\openAi\vectorStore::updateVectorFile ('vs_6wet23f345zserg45424', 'file-aia75zFVocj5R4TaKxy3xLfN', [#KEY => #VALUE]);
static platform\openAi\vectorStore::deleteVectorFile ($string $vectorId = null, $string $fileId = null)
$vectorId enthält die Vector ID
$fileId enthält die File ID
https://platform.openai.com/docs/api-reference/vector-stores-files/deleteFile

entfernt eine File ID aus einem Vektor Store und gibt ein array zurück; im Fehlerfall null
platform\openAi\vectorStore::deleteVectorFile ('vs_6wet23f345zserg45424', 'file-aia75zFVocj5R4TaKxy3xLfN');

Vektor Store File Batches

static platform\openAi\vectorStore::createVectorFileBatch ($string $vectorId = null, $string $array $fileIds = null[, $array $attributes = null])
$vectorId enthält die Vector ID
$fileIds Liste der File IDs
$attributes optional; enthält zusätzliche Informationen als array die angehängt werden können [KEY => VALUE]
https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch

erzeugt ein Batch mit den angegebenen Files und gibt ein array zurück; im Fehlerfall null
platform\openAi\vectorStore::createVectorFileBatch ('vs_6wet23f345zserg45424', 'file-aia75zFVocj5R4TaKxy3xLfN');
static platform\openAi\vectorStore::getVectorFileBatchList ($string $vectorId = null, $string $batchId = null[, $array $options = null])
$vectorId enthält die Vector ID
$batchId enthält die Batch ID
$options optional; Query:
[
  'limit' => null, // integer, maximale Vector Stores die aufgelistet werden sollen
  'order' => null, // string, Sortierung 'created_at', 'asc' oder 'desc'
  'after' => null, // string, ID des Vector Store
  'before' => null, // string, ID des Vector Store
  'filter' => null, // string, Filter Status 'in_progress', 'completed', 'failed' oder 'cancelled'
]
https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles

listet alle Dateien eines Batches im Vector Stores in einem array auf; im Fehlerfall null
platform\openAi\vectorStore::getVectorFileBatchList ('vs_6wet23f345zserg45424', 'batch_6vcan6uHqsNAoHm0FSYjZY7y')
static platform\openAi\vectorStore::getVectorFileBatch ($string $vectorId = null, $string $batchId = null)
$vectorId enthält die Vector ID
$batchId enthält die Batch ID
https://platform.openai.com/docs/api-reference/vector-stores-file-batches/getBatch

gibt den Batch in einem array zurück; im Fehlerfall null
platform\openAi\vectorStore::getVectorFileBatch ('vs_6wet23f345zserg45424', 'batch_6vcan6uHqsNAoHm0FSYjZY7y');
static platform\openAi\vectorStore::cancelVectorFileBatch ($string $vectorId = null, $string $batchId = null)
$vectorId enthält die Vector ID
$batchId enthält die Batch ID
https://platform.openai.com/docs/api-reference/vector-stores-file-batches/cancelBatch

unterbricht die Ausführung eines Batches und gibt ein array zurück; im Fehlerfall null
platform\openAi\vectorStore::cancelVectorFileBatch ('vs_6wet23f345zserg45424', 'batch_6vcan6uHqsNAoHm0FSYjZY7y');