Skip to main content

bridgenode-llm

BridgeNode Python SDK — AI inference be API key. Mokėjimas: Solana USDC per x402 (automatinis handshake, fee sponsorship — agentui SOL nereikia).

Diegimas

pip install bridgenode-llm

Naudojimas

from bridgenode_llm import LLMClient

client = LLMClient()  # raktas iš .env (BRIDGENODE_WALLET_KEY)
resp = client.chat("deepseek-v4-flash", [
    {"role": "user", "content": "Labas!"}])
print(resp["choices"][0]["message"]["content"])

Viskas paslėpta: 402 → dalinis TX → PAYMENT-SIGNATURE → 200 (§4.1). Jokio API key.

.env

# Privalomas — jūsų Solana wallet private key (base58)
BRIDGENODE_WALLET_KEY=...
# Neprivalomi:
# BRIDGENODE_BASE_URL=https://bridgenode.cc/v1
# BRIDGENODE_MAX_PER_CALL=0.05   # spending policy: max USD per call (fail-closed)
# BRIDGENODE_DAILY_CAP=1.0       # spending policy: max USD per day

Apsaugos

  • Kvito verifikacija (Free-Riding apsauga): po 200 tikrinamas PAYMENT-RESPONSE — success, network, payer, fee payer'io parašas per mūsų TX žinutę, amount. Netikras kvitas → BridgenodeError.
  • Spending policy (fail-closed): BRIDGENODE_MAX_PER_CALL + BRIDGENODE_DAILY_CAP — tikrinama PRIEŠ pasirašant; viršijus → blokuota, jokio mokėjimo.
  • SIWX: automatinis žinomo agento identifikavimas (§5.7) — fallback į payment jei auth failina.

Komandos

client.chat(model, messages, max_tokens=..., mode="auto")  # mode: auto/eco/premium

Reikalavimai

  • Python ≥ 3.11
  • Solana wallet su USDC ATA (rent — agento atsakomybė, §3.3)

Nuorodos

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bridgenode_llm-0.2.4.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bridgenode_llm-0.2.4-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file bridgenode_llm-0.2.4.tar.gz.

File metadata

  • Download URL: bridgenode_llm-0.2.4.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for bridgenode_llm-0.2.4.tar.gz
Algorithm Hash digest
SHA256 8d983027f8645fc0e19ed12b2fcaf628f170a1852f964997d7ceba7719c70294
MD5 a46d2a4a53296f58bcc834fa559a255f
BLAKE2b-256 5d9eb8d0dde9a0f99231bb96839cf96d875e7222c2bf132a38d0286eb4260d26

See more details on using hashes here.

File details

Details for the file bridgenode_llm-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: bridgenode_llm-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for bridgenode_llm-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 557c436170219bbc6c03ee39a2130ea2674db91cf69b8605907d90a248c5867e
MD5 a08d6bb3162d9bf2071cccb8a4462cca
BLAKE2b-256 8e68014358e8ee0d88fe2a5d6398848a40bff597c5774592376737a428acadb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page