opengradient 0.3.15__tar.gz → 0.3.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {opengradient-0.3.15 → opengradient-0.3.16}/PKG-INFO +29 -1
  2. {opengradient-0.3.15 → opengradient-0.3.16}/README.md +28 -0
  3. {opengradient-0.3.15 → opengradient-0.3.16}/pyproject.toml +1 -1
  4. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/__init__.py +1 -1
  5. {opengradient-0.3.15 → opengradient-0.3.16}/.gitignore +0 -0
  6. {opengradient-0.3.15 → opengradient-0.3.16}/LICENSE +0 -0
  7. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/abi/inference.abi +0 -0
  8. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/account.py +0 -0
  9. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/cli.py +0 -0
  10. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/client.py +0 -0
  11. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/defaults.py +0 -0
  12. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/exceptions.py +0 -0
  13. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/llm/__init__.py +0 -0
  14. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/llm/chat.py +0 -0
  15. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/proto/__init__.py +0 -0
  16. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/proto/infer.proto +0 -0
  17. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/proto/infer_pb2.py +0 -0
  18. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/proto/infer_pb2_grpc.py +0 -0
  19. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/types.py +0 -0
  20. {opengradient-0.3.15 → opengradient-0.3.16}/src/opengradient/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: opengradient
3
- Version: 0.3.15
3
+ Version: 0.3.16
4
4
  Summary: Python SDK for OpenGradient decentralized model management & inference services
5
5
  Project-URL: Homepage, https://opengradient.ai
6
6
  Author-email: OpenGradient <oliver@opengradient.ai>
@@ -215,7 +215,18 @@ tx_hash, finish_reason, message = og.llm_chat(
215
215
  )
216
216
  ```
217
217
 
218
+ ### Image Generation
219
+ ```python
220
+ tx_hash, image_data = og.generate_image(
221
+ model="stabilityai/stable-diffusion-xl-base-1.0",
222
+ prompt="A beautiful sunset over mountains",
223
+ width=1024,
224
+ height=1024
225
+ )
218
226
 
227
+ with open("generated_image.png", "wb") as f:
228
+ f.write(image_data)
229
+ ```
219
230
 
220
231
  ## Using the CLI
221
232
 
@@ -270,4 +281,21 @@ Or you can use files instead of text input in order to simplify your command:
270
281
  opengradient chat --model "mistralai/Mistral-7B-Instruct-v0.3" --messages-file messages.json --tools-file tools.json --max-tokens 200
271
282
  ```
272
283
 
284
+ ### Image Generation
285
+ ```bash
286
+ opengradient generate-image \
287
+ --model "stabilityai/stable-diffusion-xl-base-1.0" \
288
+ --prompt "A beautiful sunset over mountains" \
289
+ --output-path sunset.png \
290
+ --width 1024 \
291
+ --height 1024
292
+ ```
293
+
294
+ Options:
295
+ - `--model`, `-m`: Model identifier for image generation (required)
296
+ - `--prompt`, `-p`: Text prompt for generating the image (required)
297
+ - `--output-path`, `-o`: Output file path for the generated image (required)
298
+ - `--width`: Output image width in pixels (default: 1024)
299
+ - `--height`: Output image height in pixels (default: 1024)
300
+
273
301
  For more information read the OpenGradient [documentation](https://docs.opengradient.ai/).
@@ -83,7 +83,18 @@ tx_hash, finish_reason, message = og.llm_chat(
83
83
  )
84
84
  ```
85
85
 
86
+ ### Image Generation
87
+ ```python
88
+ tx_hash, image_data = og.generate_image(
89
+ model="stabilityai/stable-diffusion-xl-base-1.0",
90
+ prompt="A beautiful sunset over mountains",
91
+ width=1024,
92
+ height=1024
93
+ )
86
94
 
95
+ with open("generated_image.png", "wb") as f:
96
+ f.write(image_data)
97
+ ```
87
98
 
88
99
  ## Using the CLI
89
100
 
@@ -138,4 +149,21 @@ Or you can use files instead of text input in order to simplify your command:
138
149
  opengradient chat --model "mistralai/Mistral-7B-Instruct-v0.3" --messages-file messages.json --tools-file tools.json --max-tokens 200
139
150
  ```
140
151
 
152
+ ### Image Generation
153
+ ```bash
154
+ opengradient generate-image \
155
+ --model "stabilityai/stable-diffusion-xl-base-1.0" \
156
+ --prompt "A beautiful sunset over mountains" \
157
+ --output-path sunset.png \
158
+ --width 1024 \
159
+ --height 1024
160
+ ```
161
+
162
+ Options:
163
+ - `--model`, `-m`: Model identifier for image generation (required)
164
+ - `--prompt`, `-p`: Text prompt for generating the image (required)
165
+ - `--output-path`, `-o`: Output file path for the generated image (required)
166
+ - `--width`: Output image width in pixels (default: 1024)
167
+ - `--height`: Output image height in pixels (default: 1024)
168
+
141
169
  For more information read the OpenGradient [documentation](https://docs.opengradient.ai/).
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "opengradient"
7
- version = "0.3.15"
7
+ version = "0.3.16"
8
8
  description = "Python SDK for OpenGradient decentralized model management & inference services"
9
9
  authors = [{name = "OpenGradient", email = "oliver@opengradient.ai"}]
10
10
  license = {file = "LICENSE"}
@@ -5,7 +5,7 @@ from .defaults import DEFAULT_INFERENCE_CONTRACT_ADDRESS, DEFAULT_RPC_URL
5
5
  from .types import InferenceMode, LLM
6
6
  from . import llm
7
7
 
8
- __version__ = "0.3.15"
8
+ __version__ = "0.3.16"
9
9
 
10
10
  _client = None
11
11
 
File without changes
File without changes