Motheo wa tsebo Moka
Phatlalatšo
Di hwetšwago gona, o hwetšwago gona, o hwetšwago gona
Letlakala le le fetoletšwe ka motšhene bakeng sa go ba bonolo. Seisemane sa mathomo ke phetolelo yeo e šomago.
Maikemišetšo a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng a nkgetheng. Moka Moka (Moka)
Wo ile), le model id ka
WAGO© 2019 metle
anthropic/claude-sonnet-5 Di hwetšwago gona nymbot/auto is the cheaper choice on the standard balance for plain chat, but it can’t call tools, which Goose needs; for that, pick a catalog model with capabilities.tools.
Setup for coding agents such as Claude Code, Codex, Cline, Kilo Code and Continue is on its own page: Wo ile.
Sebaka ye nkgethilwe ke ye nkgethilwe ke ye nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe ke nkgethilwe
© 2019 metle
Di hwetšwago gona base_url at Nymbot and pass your key. Chat Completions, Reply, images, audio and embeddings all work through them.
cURL
curl https://nymbot.ai/api/v1/chat/completions \
-H "Authorization: Bearer $NYMBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "anthropic/claude-sonnet-5", "messages": [{"role": "user", "content": "Hello"}]}'
Python
# pip install openai
import os
from openai import OpenAI
client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])
reply = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)
JavaScript
// npm install openai
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });
const reply = await client.chat.completions.create({
model: "anthropic/claude-sonnet-5",
messages: [{ role: "user", content: "Hello" }],
});
console.log(reply.choices[0].message.content);
Sebotse wa Nymbot, goba plugins © 2019 metle extra_body
in Python le go tsebaga ka objekti ya tsebaga in JavaScript. nymbot The cost object in a response reply.model_extra["nymbot"] Phatlalatšo
reply.nymbot in JavaScript. Libraries which read the OPENAI_BASE_URL
le OPENAI_API_KEY Phatlalatšo ya setšhaba kgotsa wa setšhaba kgotsa wa setšhaba kgotsa wa setšhaba kgotsa wa setšhaba kgotsa wa setšhaba.
Phatlalatšo
The Anthropic Libraries go thoma https://nymbot.ai/api as base URL, goba
/v1Sebaka sa le boima /v1/messages Di na le diphoofolo tše dingwe e na le diphoofolo tše dingwe.
cURL
curl https://nymbot.ai/api/v1/messages \
-H "x-api-key: $NYMBOT_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}'
Python
# pip install anthropic
import os
import anthropic
client = anthropic.Anthropic(base_url="https://nymbot.ai/api", api_key=os.environ["NYMBOT_API_KEY"])
message = client.messages.create(
model="claude-sonnet-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(message.content[0].text)
JavaScript
// npm install @anthropic-ai/sdk
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({ baseURL: "https://nymbot.ai/api", apiKey: process.env.NYMBOT_API_KEY });
const message = await client.messages.create({
model: "claude-sonnet-5",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content[0].text);
Moka
Phatlalatšo a go swana le server ye OpenAI. Phatlalatšo le URL ya batswadi le kgauswi,
openai/ di hwetšwa ka model id so Aider o hwetšwa kgauswi ye:
Shell
export OPENAI_API_BASE=https://nymbot.ai/api/v1
export OPENAI_API_KEY=sk-nymbot-...
aider --model openai/anthropic/claude-sonnet-5
Phatlalatšo a na le mmele wa setšhaba, e na le mmele wa setšhaba, e na le mmele wa setšhaba.
--no-show-model-warnings Pitsi
Moka
In Open WebUI, Open © 2019 metleMoka MokaMoka Moka, le tshepedišo ya OpenAI API:
- Moka:
https://nymbot.ai/api/v1 - Ke: Ke ke
Open WebUI le tšhoga sa hlogo ya modela tša API, ka tšhoga ye nkgetheng le tšhoga sa nkgetheng ya picker. Kago e dirilwe tša Docker, e tšhoga ka go thoma
OPENAI_API_BASE_URL le OPENAI_API_KEY.
Nymbot a a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse a nkhothatse.
Moka
Moka goose configureMoka PhatlalatšoPitsi
Moka, and give it these values when asked. E hwetšwa ka go thoma:
Shell
export GOOSE_PROVIDER=openai
export OPENAI_HOST=https://nymbot.ai/api
export OPENAI_BASE_PATH=v1/chat/completions
export OPENAI_API_KEY=sk-nymbot-...
export GOOSE_MODEL=anthropic/claude-sonnet-5
goose session
Goose mofsa e na le go fihla disentimetara tše dingwe, ka tšhoga mofsa capabilities.tools o na le model; nymbot/auto Phatlalatšo
Phatlalatšo
Phatlalatšo e na le SDK. Tše dingwe di na le tokelo e na le tokelo ya JSON go ya ka HTTPS, yeo e tšerego sephetho sa go fihla, yeo e tšerego sephetho sa go bulega. Tše dingwe di na le tokelo yeo e na le tokelo yeo e na le tokelo yeo e na le tokelo yeo e na le tokelo yeo e na le tokelo yeo e na le tokelo yeo e na le tokelo yeo e na le tokelo yeo.
- Phatlalatšo
Authorization: Bearer sk-nymbot-…. - Phatlalatšo ya JSON
Content-Type: application/json. - Di hwetšwago mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a mabaka a
-NTlhalošo ya mohuta wo mohuta wo mohuta wa setšhaba. - Tshepedišo ya go swana le
X-Nymbot-Cost-Satsheader, leX-Request-Idheader if you might need to ask about a request.
cURL
curl -i https://nymbot.ai/api/v1/chat/completions \
-H "Authorization: Bearer $NYMBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "nymbot/auto", "messages": [{"role": "user", "content": "Hello"}]}'
Python
import os
import requests
res = requests.post(
"https://nymbot.ai/api/v1/chat/completions",
headers={"Authorization": "Bearer " + os.environ["NYMBOT_API_KEY"]},
json={"model": "nymbot/auto", "messages": [{"role": "user", "content": "Hello"}]},
)
print(res.headers["X-Nymbot-Cost-Sats"], res.headers["X-Request-Id"])
print(res.json()["choices"][0]["message"]["content"])
JavaScript
const res = await fetch("https://nymbot.ai/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.NYMBOT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ model: "nymbot/auto", messages: [{ role: "user", content: "Hello" }] }),
});
console.log(res.headers.get("X-Nymbot-Cost-Sats"), res.headers.get("X-Request-Id"));
console.log((await res.json()).choices[0].message.content);