Skip to content
L edited this page Sep 20, 2023 · 2 revisions

A request to local.ai's API is sent through a JSON payload, and handled as a standard SSE (server-sent events) transaction. Below is an example request to the API using cURL in a terminal window:

curl http://localhost:8000/v1/completions \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "You are a helpful assistant who helps answer questions with friendly answers.\\n<human>: Hey can you help me?\\n<bot>: ",
    "max_tokens": 32,
    "temperature": 0.6
  }'

Welcome to the (W.I.P.) local.ai wiki

Everyone is welcome to contribute and edit the Wiki!

Clone this wiki locally