llama[prompt_]:=Block[{result=URLRead[HTTPRequest["http://localhost:8080/completion",<|"Body"->ExportString["stream"True,"n_predict"400,"temperature"0.7`,"stop"{"</s>","Llama:","User:"},"repeat_last_n"256,"repeat_penalty"1.18`,"top_k"40,"top_p"0.5`,"tfs_z"1,"typical_p"1,"presence_penalty"0,"frequency_penalty"0,"mirostat"0,"mirostat_tau"5,"mirostat_eta"0.1`,"grammar""","n_probs"0,"image_data"{},"cache_prompt"True,"slot_id"-1,"prompt"prompt,"JSON"],"Headers"-><|"Content-Type"->"application/json","Authorization"->"Bearer no-key"|>|>]]},Dataset[StringCases[result["Body"],"data:"~~Shortest[x___]~~"\n":>ImportString[x,"RawJSON"]]][StringJoin,"content"]]