Skip to content

Commit 9026c80

Browse files
class def
1 parent 450650a commit 9026c80

File tree

12 files changed

+150
-50
lines changed

12 files changed

+150
-50
lines changed

docs/opengradient/alphasense/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ Callable: For ToolType.SWARM, returns a decorated function with appropriate meta
132132

133133
### ToolType
134134

135-
<code>class <b>ToolType</b>(*args, **kwds)</code>
135+
```python
136+
class ToolType(*args, **kwds)
137+
```
136138

137139

138140

docs/opengradient/client/alpha.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ including workflow management and ML model execution.
1616

1717
### Alpha
1818

19-
<code>class <b>Alpha</b>(blockchain: `Web3`, wallet_account: `LocalAccount`)</code>
19+
```python
20+
class Alpha(blockchain`Web3`, wallet_account`LocalAccount`)
21+
```
2022

2123

2224

docs/opengradient/client/client.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Main Client class that unifies all OpenGradient service namespaces.
1313

1414
### Client
1515

16-
<code>class <b>Client</b>(private_key: str, email: Optional[str] = None, password: Optional[str] = None, rpc_url: str = 'https://ogevmdevnet.opengradient.ai', api_url: str = 'https://sdk-devnet.opengradient.ai', contract_address: str = '0x8383C9bD7462F12Eb996DD02F78234C0421A6FaE', og_llm_server_url: Optional[str] = 'https://llmogevm.opengradient.ai', og_llm_streaming_server_url: Optional[str] = 'https://llmogevm.opengradient.ai')</code>
16+
```python
17+
class Client(private_keystr, email: Optional[str= None, password: Optional[str= None, rpc_urlstr = 'https://ogevmdevnet.opengradient.ai', api_urlstr = 'https://sdk-devnet.opengradient.ai', contract_addressstr = '0x8383C9bD7462F12Eb996DD02F78234C0421A6FaE', og_llm_server_url: Optional[str= 'https://llmogevm.opengradient.ai', og_llm_streaming_server_url: Optional[str= 'https://llmogevm.opengradient.ai')
18+
```
1719

1820

1921

docs/opengradient/client/exceptions.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Exception types for OpenGradient SDK errors.
1313

1414
### AuthenticationError
1515

16-
<code>class <b>AuthenticationError</b>(message='Authentication failed', **kwargs)</code>
16+
```python
17+
class AuthenticationError(message='Authentication failed', **kwargs)
18+
```
1719

1820

1921

@@ -26,7 +28,9 @@ Raised when there's an authentication error
2628

2729
### FileNotFoundError
2830

29-
<code>class <b>FileNotFoundError</b>(file_path)</code>
31+
```python
32+
class FileNotFoundError(file_path)
33+
```
3034

3135

3236

@@ -39,7 +43,9 @@ Raised when a file is not found
3943

4044
### InferenceError
4145

42-
<code>class <b>InferenceError</b>(message, model_cid=None, **kwargs)</code>
46+
```python
47+
class InferenceError(message, model_cid=None, **kwargs)
48+
```
4349

4450

4551

@@ -52,7 +58,9 @@ Raised when there's an error during inference
5258

5359
### InsufficientCreditsError
5460

55-
<code>class <b>InsufficientCreditsError</b>(message='Insufficient credits', required_credits=None, available_credits=None, **kwargs)</code>
61+
```python
62+
class InsufficientCreditsError(message='Insufficient credits', required_credits=None, available_credits=None, **kwargs)
63+
```
5664

5765

5866

@@ -65,7 +73,9 @@ Raised when the user has insufficient credits for the operation
6573

6674
### InvalidInputError
6775

68-
<code>class <b>InvalidInputError</b>(message, invalid_fields=None, **kwargs)</code>
76+
```python
77+
class InvalidInputError(message, invalid_fields=None, **kwargs)
78+
```
6979

7080

7181

@@ -78,7 +88,9 @@ Raised when invalid input is provided
7888

7989
### NetworkError
8090

81-
<code>class <b>NetworkError</b>(message, status_code=None, response=None)</code>
91+
```python
92+
class NetworkError(message, status_code=None, response=None)
93+
```
8294

8395

8496

@@ -91,7 +103,9 @@ Raised when a network error occurs
91103

92104
### OpenGradientError
93105

94-
<code>class <b>OpenGradientError</b>(message, status_code=None, response=None)</code>
106+
```python
107+
class OpenGradientError(message, status_code=None, response=None)
108+
```
95109

96110

97111

@@ -117,7 +131,9 @@ Base exception for OpenGradient SDK
117131

118132
### RateLimitError
119133

120-
<code>class <b>RateLimitError</b>(message='Rate limit exceeded', retry_after=None, **kwargs)</code>
134+
```python
135+
class RateLimitError(message='Rate limit exceeded', retry_after=None, **kwargs)
136+
```
121137

122138

123139

@@ -130,7 +146,9 @@ Raised when API rate limit is exceeded
130146

131147
### ResultRetrievalError
132148

133-
<code>class <b>ResultRetrievalError</b>(message, inference_cid=None, **kwargs)</code>
149+
```python
150+
class ResultRetrievalError(message, inference_cid=None, **kwargs)
151+
```
134152

135153

136154

@@ -143,7 +161,9 @@ Raised when there's an error retrieving results
143161

144162
### ServerError
145163

146-
<code>class <b>ServerError</b>(message, status_code=None, response=None)</code>
164+
```python
165+
class ServerError(message, status_code=None, response=None)
166+
```
147167

148168

149169

@@ -156,7 +176,9 @@ Raised when a server error occurs
156176

157177
### TimeoutError
158178

159-
<code>class <b>TimeoutError</b>(message='Request timed out', timeout=None, **kwargs)</code>
179+
```python
180+
class TimeoutError(message='Request timed out', timeout=None, **kwargs)
181+
```
160182

161183

162184

@@ -169,7 +191,9 @@ Raised when a request times out
169191

170192
### UnsupportedModelError
171193

172-
<code>class <b>UnsupportedModelError</b>(model_type)</code>
194+
```python
195+
class UnsupportedModelError(model_type)
196+
```
173197

174198

175199

@@ -182,7 +206,9 @@ Raised when an unsupported model type is used
182206

183207
### UploadError
184208

185-
<code>class <b>UploadError</b>(message, file_path=None, **kwargs)</code>
209+
```python
210+
class UploadError(message, file_path=None, **kwargs)
211+
```
186212

187213

188214

docs/opengradient/client/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ repo = client.model_hub.create_model("my-model", "A price prediction model")
6060

6161
### Client
6262

63-
<code>class <b>Client</b>(private_key: str, email: Optional[str] = None, password: Optional[str] = None, rpc_url: str = 'https://ogevmdevnet.opengradient.ai', api_url: str = 'https://sdk-devnet.opengradient.ai', contract_address: str = '0x8383C9bD7462F12Eb996DD02F78234C0421A6FaE', og_llm_server_url: Optional[str] = 'https://llmogevm.opengradient.ai', og_llm_streaming_server_url: Optional[str] = 'https://llmogevm.opengradient.ai')</code>
63+
```python
64+
class Client(private_keystr, email: Optional[str= None, password: Optional[str= None, rpc_urlstr = 'https://ogevmdevnet.opengradient.ai', api_urlstr = 'https://sdk-devnet.opengradient.ai', contract_addressstr = '0x8383C9bD7462F12Eb996DD02F78234C0421A6FaE', og_llm_server_url: Optional[str= 'https://llmogevm.opengradient.ai', og_llm_streaming_server_url: Optional[str= 'https://llmogevm.opengradient.ai')
65+
```
6466

6567

6668

docs/opengradient/client/llm.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ LLM chat and completion via TEE-verified execution with x402 payments.
1313

1414
### LLM
1515

16-
<code>class <b>LLM</b>(wallet_account: `LocalAccount`, og_llm_server_url: str, og_llm_streaming_server_url: str)</code>
16+
```python
17+
class LLM(wallet_account`LocalAccount`, og_llm_server_urlstr, og_llm_streaming_server_urlstr)
18+
```
1719

1820

1921

docs/opengradient/client/model_hub.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Model Hub for creating, versioning, and uploading ML models.
1313

1414
### ModelHub
1515

16-
<code>class <b>ModelHub</b>(hub_user: Optional[Dict] = None)</code>
16+
```python
17+
class ModelHub(hub_user: Optional[Dict] = None)
18+
```
1719

1820

1921

docs/opengradient/client/onchain_inference.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ On-chain ONNX model inference via blockchain smart contracts.
1313

1414
### Inference
1515

16-
<code>class <b>Inference</b>(blockchain: `Web3`, wallet_account: `LocalAccount`, inference_hub_contract_address: str, api_url: str)</code>
16+
```python
17+
class Inference(blockchain`Web3`, wallet_account`LocalAccount`, inference_hub_contract_addressstr, api_urlstr)
18+
```
1719

1820

1921

docs/opengradient/index.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ The newly created `Client` instance.
124124

125125
### Client
126126

127-
<code>class <b>Client</b>(private_key: str, email: Optional[str] = None, password: Optional[str] = None, rpc_url: str = 'https://ogevmdevnet.opengradient.ai', api_url: str = 'https://sdk-devnet.opengradient.ai', contract_address: str = '0x8383C9bD7462F12Eb996DD02F78234C0421A6FaE', og_llm_server_url: Optional[str] = 'https://llmogevm.opengradient.ai', og_llm_streaming_server_url: Optional[str] = 'https://llmogevm.opengradient.ai')</code>
127+
```python
128+
class Client(private_keystr, email: Optional[str= None, password: Optional[str= None, rpc_urlstr = 'https://ogevmdevnet.opengradient.ai', api_urlstr = 'https://sdk-devnet.opengradient.ai', contract_addressstr = '0x8383C9bD7462F12Eb996DD02F78234C0421A6FaE', og_llm_server_url: Optional[str= 'https://llmogevm.opengradient.ai', og_llm_streaming_server_url: Optional[str= 'https://llmogevm.opengradient.ai')
129+
```
128130

129131

130132

@@ -174,7 +176,9 @@ blockchain private key and optional Model Hub credentials.
174176

175177
### InferenceMode
176178

177-
<code>class <b>InferenceMode</b>(*args, **kwds)</code>
179+
```python
180+
class InferenceMode(*args, **kwds)
181+
```
178182

179183

180184

@@ -197,7 +201,9 @@ Enum for the different inference modes available for inference (VANILLA, ZKML, T
197201

198202
### LLM
199203

200-
<code>class <b>LLM</b>(*args, **kwds)</code>
204+
```python
205+
class LLM(*args, **kwds)
206+
```
201207

202208

203209

@@ -254,7 +260,9 @@ Trusted Execution Environment (TEE) verified inference.
254260

255261
### TEE_LLM
256262

257-
<code>class <b>TEE_LLM</b>(*args, **kwds)</code>
263+
```python
264+
class TEE_LLM(*args, **kwds)
265+
```
258266

259267

260268

0 commit comments

Comments
 (0)