Skip to main content

.AITEXT_VLLM

Chat-Completions über selbstgehostete vLLM-Modelle (RAGAI.AITEXT_VLLM).

Hintergrund

Strukturell identisch zu OpenaiService (gleicher Backend-Endpunkt-Namensraum /api/toolbox/completion/create/<llmType>/<botId>), aber ohne Modell-/Temperatur-Auswahl - vLLM verwendet immer das erste konfigurierte Modell aus VLLMChatModelTypeArr, da selbstgehostete Modelle typischerweise nicht pro Anfrage gewechselt werden.

Methoden

.chatCompletion(input)

Sendet eine Chat-Completion-Anfrage an das vLLM-Modell und liefert die Text-Antwort.

ParameterTypBeschreibung
inputstring | z.input<typeof aiTextInputSchema>Der Prompt-Text oder ein Objekt gemäß aiTextInputSchema.

Objekt-Form (validiert über aiTextInputSchema):

FeldTypPflichtBeschreibung
inputstringDer Prompt-Text.

Rückgabewert: Promise<any>

Die Antwort des Modells.

.chatCompletionJson(input)

Wie chatCompletion, fordert aber eine JSON-Antwort vom Modell an.

ParameterTypBeschreibung
inputstring | z.input<typeof aiTextInputSchema>Der Prompt-Text oder ein Objekt gemäß aiTextInputSchema.

Objekt-Form (validiert über aiTextInputSchema):

FeldTypPflichtBeschreibung
inputstringDer Prompt-Text.

Rückgabewert: Promise<any>

Die Antwort des Modells als JSON-String.