API tương thích OpenAI
Trỏ một client tương thích OpenAI tới https://llm.valefront.com/v1.
Chat completions
curl https://llm.valefront.com/v1/chat/completions \
-H "Authorization: Bearer $VALEFRONT_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Summarize this call"}]}'Streaming
Đặt stream thành true để nhận các khối dữ liệu server-sent events từ endpoint chat completions.
curl https://llm.valefront.com/v1/chat/completions \
-H "Authorization: Bearer $VALEFRONT_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","stream":true,"messages":[{"role":"user","content":"Count to three"}]}'Mô hình
curl https://llm.valefront.com/v1/models \ -H "Authorization: Bearer $VALEFRONT_KEY"