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 |
(Removed redirect to AI on demand: apertus-ai/Apertus-v1.5-8B-Prerelease-2607) Tag: Removed redirect |
||
| 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"> | |||
TBD | |||
</syntaxhighlight> | |||
[[Category:AI on demand]] | |||
Revision as of 13:26, 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:
TBD