Skip to content

Commit 78c86d7

Browse files
author
balogh.adam@icloud.com
committed
revert to old name
1 parent 8ec4ddc commit 78c86d7

19 files changed

Lines changed: 46 additions & 46 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ hub = og.ModelHub(email="you@example.com", password="...")
9191
Before making LLM requests, your wallet must approve OPG token spending via the [Permit2](https://github.com/Uniswap/permit2) protocol. This only sends an on-chain transaction when the current allowance drops below the threshold:
9292

9393
```python
94-
llm.ensure_opg_allowance(min_allowance=5)
94+
llm.ensure_opg_approval(min_allowance=5)
9595
```
9696

9797
See [Payment Settlement](#payment-settlement) for details on settlement modes.

docs/CLAUDE_SDK_USERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import os
2222
llm = og.LLM(private_key=os.environ["OG_PRIVATE_KEY"])
2323

2424
# Ensure sufficient OPG allowance (only sends tx when below threshold)
25-
llm.ensure_opg_allowance(min_allowance=0.1)
25+
llm.ensure_opg_approval(min_allowance=0.1)
2626

2727
# LLM Chat (TEE-verified with x402 payments, async)
2828
result = await llm.chat(

docs/opengradient/client/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import opengradient as og
2424

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

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

docs/opengradient/client/llm.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Supports both streaming and non-streaming responses.
2121
All request methods (``chat``, ``completion``) are async.
2222

2323
Before making LLM requests, ensure your wallet has approved sufficient
24-
OPG tokens for Permit2 spending by calling ``ensure_opg_allowance``.
24+
OPG tokens for Permit2 spending by calling ``ensure_opg_approval``.
2525

2626
#### Constructor
2727

@@ -188,10 +188,10 @@ TextGenerationOutput: Generated text results including:
188188

189189
---
190190

191-
#### `ensure_opg_allowance()`
191+
#### `ensure_opg_approval()`
192192

193193
```python
194-
def ensure_opg_allowance(
194+
def ensure_opg_approval(
195195
self,
196196
min_allowancefloat,
197197
approve_amount: Optional[float= None
@@ -206,7 +206,7 @@ multiple service restarts without re-approving.
206206

207207
Best for backend servers that call this on startup::
208208

209-
llm.ensure_opg_allowance(min_allowance=5.0, approve_amount=100.0)
209+
llm.ensure_opg_approval(min_allowance=5.0, approve_amount=100.0)
210210

211211
**Arguments**
212212

docs/opengradient/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import opengradient as og
3535
llm = og.LLM(private_key="0x...")
3636

3737
# One-time OPG token approval (idempotent -- skips if allowance is sufficient)
38-
llm.ensure_opg_allowance(min_allowance=5)
38+
llm.ensure_opg_approval(min_allowance=5)
3939

4040
# Chat with an LLM (TEE-verified)
4141
response = asyncio.run(llm.chat(

examples/langchain_react_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# Ensure sufficient OPG allowance for Permit2 spending
2121
llm_client = og.LLM(private_key=private_key)
22-
llm_client.ensure_opg_allowance(min_allowance=5)
22+
llm_client.ensure_opg_approval(min_allowance=5)
2323

2424
# Create the OpenGradient LangChain adapter
2525
llm = og.agents.langchain_adapter(

examples/llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
async def main():
1212
llm = og.LLM(private_key=os.environ.get("OG_PRIVATE_KEY"))
13-
llm.ensure_opg_allowance(min_allowance=0.1)
13+
llm.ensure_opg_approval(min_allowance=0.1)
1414

1515
messages = [
1616
{"role": "user", "content": "What is the capital of France?"},

examples/llm_chat_streaming.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
async def main():
88
llm = og.LLM(private_key=os.environ.get("OG_PRIVATE_KEY"))
9-
llm.ensure_opg_allowance(min_allowance=0.1)
9+
llm.ensure_opg_approval(min_allowance=0.1)
1010

1111
messages = [
1212
{"role": "user", "content": "What is Python?"},

examples/llm_tool_calling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def main():
5151
]
5252

5353
# Ensure sufficient OPG allowance for Permit2 spending
54-
llm.ensure_opg_allowance(min_allowance=0.1)
54+
llm.ensure_opg_approval(min_allowance=0.1)
5555

5656
print("Testing Gemini tool calls...")
5757
print(f"Model: {og.TEE_LLM.GEMINI_2_5_FLASH_LITE}")

integrationtest/llm/test_llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def llm_client():
9999
print("Account funded with ETH and OPG")
100100

101101
llm = og.LLM(private_key=account.key.hex())
102-
llm.ensure_opg_allowance(min_allowance=OPG_FUND_AMOUNT, approve_amount=OPG_FUND_AMOUNT)
102+
llm.ensure_opg_approval(min_allowance=OPG_FUND_AMOUNT, approve_amount=OPG_FUND_AMOUNT)
103103
print("Permit2 approval complete")
104104

105105
# Wait for the approval to propagate on-chain

0 commit comments

Comments
 (0)