http Post Streaming
Invia una richiesta POST al server LLAMA e trasmette la risposta come linee SSE.
Contratto di inquadramento SSE
Il server llama.cpp emette un flusso SSE minimo:
Ogni blocco è una riga
data: {json}seguita da una riga vuota.Lo stream termina con "data: DONE".
Nessun campo "event:", "id:" o "retry:" viene inviato durante il normale funzionamento.
Se il server emette mai questi campi (ad esempio dopo un aggiornamento llama.cpp), vengono registrati in INFO livello in modo che la modifica sia visibile nella diagnostica.
Parameters
The API endpoint path.
The JSON request body (should include "stream": true).
Callback invoked for each SSE data: line as it arrives.
Callback that returns true to abort streaming early.
Read timeout in milliseconds.
Optional port override. Defaults to the current server port.
Throws
if the server returns a non-2xx status code.