AI on demand: apertus-ai/Apertus-v1.5-8B: Difference between revisions
Jump to navigation
Jump to search
(Redirected page to AI on demand: apertus-ai/Apertus-v1.5-8B-Prerelease-2607) Tag: New redirect |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
# | == Calling the model == | ||
<syntaxhighlight lang="bash"> | |||
# Set your personal key: | |||
STONEY_KEY=sk-... | |||
# Set the desired model: | |||
MODEL=apertus-ai/Apertus-v1.5-8B | |||
# Set your prompt: | |||
PROMPT='Hello.' | |||
# Set maximum amount of tokens: | |||
MAX_TOKENS=100 | |||
curl https://llm.stoney-cloud.com/v1/chat/completions \ | |||
--silent --fail --show-error \ | |||
--header "Authorization: Bearer $STONEY_KEY" \ | |||
--header 'Content-Type: application/json' \ | |||
--data '{ | |||
"model": "'"$MODEL"'", | |||
"messages": [ | |||
{"role": "user", "content": "'"$PROMPT"'"} | |||
], | |||
"max_tokens": '"$MAX_TOKENS"' | |||
}' \ | |||
| jq | |||
</syntaxhighlight> | |||
Example output: | |||
<syntaxhighlight lang="json"> | |||
{ | |||
"id": "chatcmpl-a8967d004bbaff14", | |||
"object": "chat.completion", | |||
"created": 1785332362, | |||
"model": "apertus-ai/Apertus-v1.5-8B", | |||
"choices": [ | |||
{ | |||
"index": 0, | |||
"message": { | |||
"role": "assistant", | |||
"content": "Hello! How can I help you today?", | |||
"refusal": null, | |||
"annotations": null, | |||
"audio": null, | |||
"function_call": null, | |||
"reasoning": null | |||
}, | |||
"logprobs": null, | |||
"finish_reason": "stop", | |||
"stop_reason": 68, | |||
"token_ids": null, | |||
"routed_experts": null | |||
} | |||
], | |||
"service_tier": null, | |||
"system_fingerprint": "vllm-0.23.1rc1.dev1029+ga601a9d99-99d7c206", | |||
"usage": { | |||
"prompt_tokens": 64, | |||
"total_tokens": 74, | |||
"completion_tokens": 10, | |||
"prompt_tokens_details": null | |||
}, | |||
"prompt_logprobs": null, | |||
"prompt_token_ids": null, | |||
"prompt_text": null, | |||
"kv_transfer_params": null, | |||
"metrics": null | |||
} | |||
</syntaxhighlight> | |||
[[Category:AI on demand]] | |||
Latest revision as of 15:39, 29 July 2026
Calling the model
# Set your personal key:
STONEY_KEY=sk-...
# Set the desired model:
MODEL=apertus-ai/Apertus-v1.5-8B
# Set your prompt:
PROMPT='Hello.'
# Set maximum amount of tokens:
MAX_TOKENS=100
curl https://llm.stoney-cloud.com/v1/chat/completions \
--silent --fail --show-error \
--header "Authorization: Bearer $STONEY_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "'"$MODEL"'",
"messages": [
{"role": "user", "content": "'"$PROMPT"'"}
],
"max_tokens": '"$MAX_TOKENS"'
}' \
| jq
Example output:
{
"id": "chatcmpl-a8967d004bbaff14",
"object": "chat.completion",
"created": 1785332362,
"model": "apertus-ai/Apertus-v1.5-8B",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?",
"refusal": null,
"annotations": null,
"audio": null,
"function_call": null,
"reasoning": null
},
"logprobs": null,
"finish_reason": "stop",
"stop_reason": 68,
"token_ids": null,
"routed_experts": null
}
],
"service_tier": null,
"system_fingerprint": "vllm-0.23.1rc1.dev1029+ga601a9d99-99d7c206",
"usage": {
"prompt_tokens": 64,
"total_tokens": 74,
"completion_tokens": 10,
"prompt_tokens_details": null
},
"prompt_logprobs": null,
"prompt_token_ids": null,
"prompt_text": null,
"kv_transfer_params": null,
"metrics": null
}