mirror of
https://github.com/mudler/LocalAI.git
synced 2025-02-02 09:17:59 +00:00
c5c77d2b0d
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
757 B
757 B
+++ disableToc = false title = "Easy Request - Curl" weight = 2 +++
Now we can make a curl request!
Curl Chat API -
curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "lunademo",
"messages": [{"role": "user", "content": "How are you?"}],
"temperature": 0.9
}'
Curl Completion API -
curl --request POST \
--url http://localhost:8080/v1/completions \
--header 'Content-Type: application/json' \
--data '{
"model": "lunademo",
"prompt": "function downloadFile(string url, string outputPath) {",
"max_tokens": 256,
"temperature": 0.5
}'
See OpenAI API for more info! Have fun using LocalAI!