fix curl endpoint

This commit is contained in:
Xi Yan 2024-11-19 10:26:05 -08:00
parent 1619d37cc6
commit 1b0f5fff5a

View file

@ -535,10 +535,10 @@ $ llama-stack-client models list
Once the server is set up, we can test it with a client to verify it's working correctly. The following command will send a chat completion request to the server's `/inference/chat_completion` API: Once the server is set up, we can test it with a client to verify it's working correctly. The following command will send a chat completion request to the server's `/inference/chat_completion` API:
```bash ```bash
$ curl http://localhost:5000/inference/chat_completion \ $ curl http://localhost:5000/alpha/inference/chat-completion \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{ -d '{
"model_id": "Llama3.1-8B-Instruct", "model_id": "meta-llama/Llama-3.1-8B-Instruct",
"messages": [ "messages": [
{"role": "system", "content": "You are a helpful assistant."}, {"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write me a 2 sentence poem about the moon"} {"role": "user", "content": "Write me a 2 sentence poem about the moon"}