-
Notifications
You must be signed in to change notification settings - Fork 53
API with cURL
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
}'