docs: standardize Chat Payload and cURL

This commit is contained in:
Ho Duc Hieu 2024-01-05 08:05:10 +07:00
parent 2f1fe6cb67
commit 24e7c1213c
2 changed files with 19 additions and 16 deletions

View File

@ -67,18 +67,21 @@ paths:
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: > source: >
curl -X POST curl http://localhost:1337/v1/chat/completions \
'http://localhost:3982/inferences/llamacpp/chat_completion' \ -H "Content-Type: application/json" \
-H "Content-Type: application/json" \ -d '{
-d '{ "model": "tinyllama-1.1b",
"llama_model_path": "/path/to/your/model.gguf", "messages": [
"messages": [ {
{ "role": "system",
"role": "user", "content": "You are a helpful assistant."
"content": "hello" },
}, {
] "role": "user",
}' "content": "Hello!"
}
]
}'
/models: /models:
get: get:
operationId: listModels operationId: listModels

View File

@ -71,13 +71,13 @@ components:
description: | description: |
Contains input data or prompts for the model to process. Contains input data or prompts for the model to process.
example: example:
- content: "Hello there :wave:" - content: "You are a helpful assistant."
role: assistant role: system
- content: Can you write a long story - content: Hello!
role: user role: user
model: model:
type: string type: string
example: model-zephyr-7B example: tinyllama-1.1b
description: | description: |
Specifies the model being used for inference or processing tasks. Specifies the model being used for inference or processing tasks.
stream: stream: