Skip to content

Commit 4ad0dfb

Browse files
committed
cleanup
1 parent e6d91f3 commit 4ad0dfb

16 files changed

Lines changed: 32 additions & 38 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ make chat-tool
9999
- **Dual Authentication**: Model Hub (email/password) + blockchain (private key)
100100
- **x402 Payments**: Streamed micropayment protocol for LLM inference
101101
- **Digital Twins**: Chat integration with twin.fun personas
102-
- **Dual Chain**: Base Sepolia (LLM) + OpenGradient testnet (Alpha on-chain inference)
102+
- **Dual Chain**: Base mainnet (LLM) + OpenGradient testnet (Alpha on-chain inference)
103103

104104
## Configuration
105105

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ For current network RPC endpoints, contract addresses, and deployment informatio
5252

5353
Before using the SDK, you will need:
5454

55-
1. **Private Key**: An Ethereum-compatible wallet private key funded with **Base Sepolia OPG tokens** for x402 LLM payments
56-
2. **Test Tokens**: Obtain free test tokens from the [OpenGradient Faucet](https://faucet.opengradient.ai) for testnet LLM inference
57-
3. **Alpha Testnet Key** (Optional): A private key funded with **OpenGradient testnet gas tokens** for Alpha Testnet on-chain inference (can be the same or a different key)
58-
4. **Model Hub Account** (Optional): Required only for model uploads. Register at [hub.opengradient.ai/signup](https://hub.opengradient.ai/signup)
55+
1. **Private Key**: An Ethereum-compatible wallet private key funded with **Base OPG tokens** for x402 LLM payments
56+
2. **Alpha Testnet Key** (Optional): A private key funded with **OpenGradient testnet gas tokens** for Alpha Testnet on-chain inference (can be the same or a different key)
57+
3. **Model Hub Account** (Optional): Required only for model uploads. Register at [hub.opengradient.ai/signup](https://hub.opengradient.ai/signup)
5958

6059
### Configuration
6160

@@ -87,7 +86,7 @@ The SDK provides separate clients for each service. Create only the ones you nee
8786
import os
8887
import opengradient as og
8988

90-
# LLM inference — settles via x402 on Base Sepolia using OPG tokens
89+
# LLM inference — settles via x402 on Base using OPG tokens
9190
llm = og.LLM(private_key=os.environ.get("OG_PRIVATE_KEY"))
9291

9392
# Alpha Testnet — on-chain inference on the OpenGradient network using testnet gas tokens

docs/CLAUDE_SDK_USERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ print(result.chat_output["content"])
4040
Each service has its own client class:
4141

4242
```python
43-
# LLM inference (Base Sepolia OPG tokens for x402 payments)
43+
# LLM inference (Base OPG tokens for x402 payments)
4444
llm = og.LLM(private_key="0x...")
4545

4646
# Connect directly to a known TEE IP instead of using the on-chain registry.

docs/opengradient/client/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OpenGradient Client -- service modules for the SDK.
1010

1111
## Modules
1212

13-
- **[llm](./llm)** -- LLM chat and text completion with TEE-verified execution and x402 payment settlement (Base Sepolia OPG tokens)
13+
- **[llm](./llm)** -- LLM chat and text completion with TEE-verified execution and x402 payment settlement (Base OPG tokens)
1414
- **[model_hub](./model_hub)** -- Model repository management: create, version, and upload ML models
1515
- **[alpha](./alpha)** -- Alpha Testnet features: on-chain ONNX model inference (VANILLA, TEE, ZKML modes), workflow deployment, and scheduled ML model execution (OpenGradient testnet gas tokens)
1616
- **[twins](./twins)** -- Digital twins chat via OpenGradient verifiable inference
@@ -22,7 +22,7 @@ OpenGradient Client -- service modules for the SDK.
2222
```python
2323
import opengradient as og
2424

25-
# LLM inference (Base Sepolia OPG tokens)
25+
# LLM inference (Base OPG tokens)
2626
llm = og.LLM(private_key="0x...")
2727
llm.ensure_opg_approval(min_allowance=5)
2828
result = await llm.chat(model=og.TEE_LLM.CLAUDE_HAIKU_4_5, messages=[...])

docs/opengradient/client/llm.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@ Permit2ApprovalResult: Contains ``allowance_before``,
231231

232232
### Automatic Endpoint Discovery (Production)
233233

234-
By default, `LLM()` constructor automatically discovers active TEE endpoints from the on-chain TEE registry using the `rpc_url` parameter (defaults to the Base Sepolia testnet).
234+
By default, `LLM()` constructor automatically discovers active TEE endpoints from the on-chain TEE registry using the `rpc_url` parameter (defaults to the OpenGradient devnet).
235235

236236
**Key Points:**
237237
- The TEE endpoint is **dynamically discovered** from the registry
238-
- x402 payments are always settled on **Base Sepolia**, regardless of which TEE endpoint serves your request
238+
- x402 payments are always settled on **Base**, regardless of which TEE endpoint serves your request
239239
- This is the recommended approach for production use
240240

241241
**Example:**
@@ -250,7 +250,7 @@ For development, testing, or self-hosted TEE servers, use `LLM.from_url()` with
250250

251251
**Key Points:**
252252
- TLS certificate verification is disabled (suitable for self-signed certs)
253-
- x402 payment settlement still occurs on Base Sepolia
253+
- x402 payment settlement still occurs on Base
254254
- Intended for non-production environments only
255255

256256
**Example:**
@@ -264,5 +264,5 @@ llm = og.LLM.from_url(
264264

265265
### Important: x402 Payment Settlement
266266

267-
Regardless of which TEE endpoint serves your inference request, **x402 payment settlement always occurs on Base Sepolia blockchain**. This ensures all payments are recorded on-chain for auditability and ensures consistent settlement across all TEE providers.
267+
Regardless of which TEE endpoint serves your inference request, **x402 payment settlement always occurs on Base blockchain**. This ensures all payments are recorded on-chain for auditability and ensures consistent settlement across all TEE providers.
268268

docs/opengradient/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inference was performed correctly.
1919

2020
The SDK operates across two chains with separate private keys:
2121

22-
- **[llm](./client/llm)** (``og.LLM``) -- LLM chat and completion with TEE-verified execution. Pays via x402 on **Base Sepolia** (requires OPG tokens).
22+
- **[llm](./client/llm)** (``og.LLM``) -- LLM chat and completion with TEE-verified execution. Pays via x402 on **Base** (requires OPG tokens).
2323
- **[alpha](./client/alpha)** (``og.Alpha``) -- On-chain ONNX model inference with VANILLA, TEE, or ZKML verification. Pays gas on the **OpenGradient alpha testnet**.
2424
- **[model_hub](./client/model_hub)** (``og.ModelHub``) -- Model repository management: create, version, and upload ML models. Requires email/password auth.
2525
- **[twins](./client/twins)** (``og.Twins``) -- Digital twins chat via verifiable inference. Requires a twins API key.

examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Before running any examples, ensure you have:
88

99
1. **Installed the SDK**: `pip install opengradient`
1010
2. **Set up your credentials**: Configure your OpenGradient account using environment variables:
11-
- `OG_PRIVATE_KEY`: Private key funded with **Base Sepolia OPG tokens** for x402 LLM payments (can be obtained from our [faucet](https://faucet.opengradient.ai)). Also used for Alpha Testnet on-chain inference (requires **OpenGradient testnet gas tokens**).
11+
- `OG_PRIVATE_KEY`: Private key funded with **Base OPG tokens** for x402 LLM payments.
1212
- `OG_MODEL_HUB_EMAIL`: (Optional) Your Model Hub email for model uploads
1313
- `OG_MODEL_HUB_PASSWORD`: (Optional) Your Model Hub password for model uploads
1414

@@ -140,7 +140,7 @@ Each sub-client is created independently with the credentials it needs:
140140
import os
141141
import opengradient as og
142142

143-
# LLM inference (Base Sepolia OPG tokens for x402 payments)
143+
# LLM inference (Base OPG tokens for x402 payments)
144144
llm = og.LLM(private_key=os.environ.get("OG_PRIVATE_KEY"))
145145

146146
# On-chain model inference (OpenGradient testnet gas tokens)

integrationtest/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ End-to-end tests that exercise the OpenGradient SDK against live services.
66

77
### LLM (`llm/`)
88

9-
Tests LLM chat and streaming chat via the x402 payment flow on Base Sepolia.
9+
Tests LLM chat and streaming chat via the x402 payment flow on Base.
1010

1111
Each run creates a **fresh Ethereum account**, funds it with ETH (for gas) and OPG tokens from a funder wallet, approves Permit2, and then runs chat requests against a TEE-verified model.
1212

1313
**Requirements:**
14-
- `PRIVATE_KEY` env var — private key of a funded wallet on Base Sepolia that holds OPG tokens.
14+
- `PRIVATE_KEY` env var — private key of a funded wallet on Base that holds OPG tokens.
1515

1616
```bash
1717
make llm_integrationtest

integrationtest/llm/test_llm_chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from web3 import Web3
77

88
import opengradient as og
9-
from opengradient.client.opg_token import BASE_OPG_ADDRESS, BASE_SEPOLIA_RPC
9+
from opengradient.client.opg_token import BASE_OPG_ADDRESS, BASE_MAINNET_RPC
1010

1111
# Minimal ERC20 ABI for transfer
1212
ERC20_TRANSFER_ABI = [
@@ -37,7 +37,7 @@
3737

3838
def _fund_account(funder_key: str, recipient_address: str):
3939
"""Transfer ETH (for gas) and OPG tokens from the funder to the recipient."""
40-
w3 = Web3(Web3.HTTPProvider(BASE_SEPOLIA_RPC))
40+
w3 = Web3(Web3.HTTPProvider(BASE_MAINNET_RPC))
4141
funder = Account.from_key(funder_key)
4242
funder_addr = Web3.to_checksum_address(funder.address)
4343
recipient = Web3.to_checksum_address(recipient_address)

src/opengradient/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
The SDK operates across two chains with separate private keys:
1212
13-
- **`opengradient.client.llm`** (``og.LLM``) -- LLM chat and completion with TEE-verified execution. Pays via x402 on **Base Sepolia** (requires OPG tokens).
13+
- **`opengradient.client.llm`** (``og.LLM``) -- LLM chat and completion with TEE-verified execution. Pays via x402 on **Base** (requires OPG tokens).
1414
- **`opengradient.client.alpha`** (``og.Alpha``) -- On-chain ONNX model inference with VANILLA, TEE, or ZKML verification. Pays gas on the **OpenGradient alpha testnet**.
1515
- **`opengradient.client.model_hub`** (``og.ModelHub``) -- Model repository management: create, version, and upload ML models. Requires email/password auth.
1616
- **`opengradient.client.twins`** (``og.Twins``) -- Digital twins chat via verifiable inference. Requires a twins API key.

0 commit comments

Comments
 (0)