mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-27 22:15:00 +00:00
docs: Initial import from localai-website (#1312)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
763f94ca80
commit
c5c77d2b0d
66 changed files with 6111 additions and 0 deletions
35
docs/content/howtos/easy-request-curl.md
Normal file
35
docs/content/howtos/easy-request-curl.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
+++
|
||||
disableToc = false
|
||||
title = "Easy Request - Curl"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
Now we can make a curl request!
|
||||
|
||||
Curl Chat API -
|
||||
|
||||
```bash
|
||||
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 -
|
||||
|
||||
```bash
|
||||
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](https://platform.openai.com/docs/api-reference) for more info!
|
||||
Have fun using LocalAI!
|
Loading…
Add table
Add a link
Reference in a new issue