જ્ઞાનનો આધાર વિકાસકર્તાઓ
સાધનો અને SDKs
Anything that can talk to OpenAI or Anthropic can talk to Nymbot. In almost every case it is a base URL, a key and a model name.
આ પૃષ્ઠ સુવિધા માટે મશીન-અનુવાદિત છે. અંગ્રેજી મૂળ એ સંસ્કરણ છે જે લાગુ પડે છે.
નીચે આપેલા દરેક સુયોજન માટે એક API કીની જરૂર પડે છે, જે એપ્લિકેશનના સ્વરૂપમાં બનાવવામાં આવે છે. આઉટડોર મેન્યુફેક્ચરિંગ (See
API કીઓ) અને એક મોડલ ID થી
મોડલ યાદી. ઉદાહરણો ઉપયોગ કરે છે
anthropic/claude-sonnet-5 પ્રો સંતુલન પર. nymbot/auto એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએલ એકાઉન્ટ્સ માટે એનઆરએફએલ એકાઉન્ટ્સ માટે એનઆરએલ capabilities.tools.
કૉપિરાઇટ્સ માટે કૉપિરાઇટ્સ, જેમ કે Claude Code, Codex, Cline, Kilo Code અને Continue: કોડિંગ સાધનો.
મિત્રો,આવી અસંખ્ય ડોક્યુમેન્ટ્રીઓ સરળતાથી ઇન્ટરનેટના માધ્યમથી જોઇ શકાય છે પરંતુ તેમાં આપવામાં આવતા સંદેશનો આપણે બહું ઓછા સ્વીકાર કરીએ છીએ, પરંતુ એક વાત શિખવા જેવી જરૂર છે કે, ભલે આપણે ધનવાન હોઇએ કે છાશવારે હોટલ કે રેસ્ટોરન્ટમાં જમવા જઇએ ત્યારે ક્યારેય આપણી થાળીમાં પડેલ અન્નનો બગાડ ક્યારેય ના કરીએ અને જો તે ખોરાક વધારે માત્રામાં છે તો તરત જ તેને પાર્સલ કરાવીને કોઇ ભૂખ્યાની આંતરડી ઠારીએ કારણ કે અંતે તો આપણી પરંપરા છે ને જ્યાં અન્નનો ટુકડો.
ઓપનએઆઈ એસડીકે
સત્તાવાર Python અને JavaScript સોફ્ટવેર સારી રીતે કામ કરે છે. base_url at
Nymbot and pass your key. Chat Completions, Responses, 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);
Nymbot's own fields, such as plugins વેબ શોધ માટે, અંદર જાઓ extra_body
Python માં, અને સીધા JavaScript માં request object માં. nymbot પ્રતિક્રિયામાં કિંમત વસ્તુ છે reply.model_extra["nymbot"] પાયથોનમાં અને
reply.nymbot જાવાસ્ક્રિપ્ટમાં. પુસ્તકાલયો કે જે વાંચે છે OPENAI_BASE_URL
અને OPENAI_API_KEY environment variables can be pointed at Nymbot with those
alone.
એન્થ્રોપિક એસ. ડી. કે.
Anthropic Librariesનો ઉપયોગ https://nymbot.ai/api આ પણ વાંચો: Basic URL, without
/v1, કારણ કે તેઓ ઉમેરે છે /v1/messages કોઈપણ કેશબેક મોડલ કામ કરે છે, માત્ર Claude નથી.
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);
સહાયક
Aider OpenAI-compatible servers (OpenAI-compatible servers) સાથે કૉલિંગ કરે છે.
openai/ મોબાઈલ એડમિન એડમિન એડમિન એડમિન એડમિન એડમિન એડમિન એડમિન એડમિન એડમિન છે.
Shell
export OPENAI_API_BASE=https://nymbot.ai/api/v1
export OPENAI_API_KEY=sk-nymbot-...
aider --model openai/anthropic/claude-sonnet-5
સહાયક ચેતવણી આપી શકે છે કે તે મોડેલના સંદર્ભ કદ અથવા કિંમતને જાણતો નથી. ચેતવણી હાનિકારક નથી;
--no-show-model-warnings તેને છુપાવે છે.
ઓનલાઇન WebUI
ઓપન વેબયુઆઈમાં, ખોલો Admin પેનલપછી સ્થાપનપછી કનેક્શન, અને એક OpenAI API કનેક્શન ઉમેરો:
- યુઆરએલઃ
https://nymbot.ai/api/v1 - ચાવીઃ તમારી API ચાવી
ઓપન વેબયુઆઈ એ. પી. આઈ. માંથી મોડેલ સૂચિ વાંચે છે, જેથી દરેક ચેટ મોડેલ તેના પીકરમાં દેખાય છે. જ્યારે તેને ડોકરમાં ચલાવવામાં આવે છે, ત્યારે તે પર્યાવરણ ચલ સાથે સેટ કરી શકાય છે.
OPENAI_API_BASE_URL અને OPENAI_API_KEY.
Open WebUI keeps your conversations on its own server. Nymbot does not store them, but Open WebUI does, wherever you run it.
હંસ.
વાયરસ goose configureપસંદ કરો પ્રદાતાઓને રૂપરેખાંકિત કરોપિક્ચર
ઓનલાઇનઆ ઉપરાંત, આ ઉપરાંત, જો તમે આ વેબસાઇટનો ઉપયોગ કરી રહ્યા છો, તો તમારે તેનો ઉપયોગ કરી શકો છો.
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
ગૂઝ લગભગ દરેક પગલા પર સાધનોને કૉલ કરે છે, તેથી તેની સાથે એક મોડેલ પસંદ કરો capabilities.tools ફોટો લાઈન મોબાઈલ નંબર; nymbot/auto સાધનોનો ઉલ્લેખ કરો
સાદો HTTP
કંઈપણ SDK ની જરૂર નથી. ફાઇલ અપલોડ સિવાય દરેક અંતિમ બિંદુ HTTPS પર JSON છે, જે બહુપક્ષીય સ્વરૂપો છે. કોઈપણ ભાષા અથવા સાધન કે જે HTTP વિનંતી કરી શકે છે તે API નો ઉપયોગ કરી શકે છેઃ
- ચાવી આ રીતે મોકલો
Authorization: Bearer sk-nymbot-…. - જે. એસ. ઓ. એન. સંસ્થાઓ સાથે મોકલો
Content-Type: application/json. - સ્ટ્રીમિંગ માટે, પ્રતિસાદને સર્વર-મોકલેલી ઘટનાઓ તરીકે વાંચો; cURL સાથે, ઉમેરો
-Nતેથી જ્યારે તેઓ આવે ત્યારે તે તેમને છાપી લે છે. - તેમાંથી ખર્ચ વાંચો
X-Nymbot-Cost-Satsહાર્દિક પટેલે કહ્યું હતું કે, “The header, and keep theX-Request-Idજો તમારે વિનંતી વિશે પૂછવાની જરૂર હોય તો હેડર.
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);