httpPost

fun httpPost(endpoint: String, jsonBody: String, timeoutMs: Int, port: Int = defaultPort()): String

Sendet eine POST-Anfrage an den LLAMA-Server und gibt den Antworttext zurück.

Return

Der Antworttext als String.

Parameters

endpoint

The API endpoint path (e.g., /v1/chat/completions).

jsonBody

The JSON request body.

timeoutMs

Read timeout in milliseconds.

port

Optional port override. Defaults to the current server port.

Throws

on non-2xx responses.