wavespeed 0.0.1__tar.gz → 0.0.3__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.
- {wavespeed-0.0.1 → wavespeed-0.0.3}/LICENSE +1 -1
- {wavespeed-0.0.1 → wavespeed-0.0.3}/PKG-INFO +19 -17
- {wavespeed-0.0.1 → wavespeed-0.0.3}/README.md +15 -13
- {wavespeed-0.0.1 → wavespeed-0.0.3}/pyproject.toml +4 -4
- {wavespeed-0.0.1 → wavespeed-0.0.3}/tests/test_client.py +3 -4
- {wavespeed-0.0.1 → wavespeed-0.0.3}/wavespeed/__init__.py +2 -2
- {wavespeed-0.0.1 → wavespeed-0.0.3}/wavespeed/client.py +2 -2
- wavespeed-0.0.3/wavespeed/schemas/__init__.py +7 -0
- wavespeed-0.0.3/wavespeed/schemas/prediction.py +76 -0
- {wavespeed-0.0.1 → wavespeed-0.0.3}/wavespeed.egg-info/PKG-INFO +19 -17
- {wavespeed-0.0.1 → wavespeed-0.0.3}/wavespeed.egg-info/SOURCES.txt +3 -1
- {wavespeed-0.0.1 → wavespeed-0.0.3}/setup.cfg +0 -0
- {wavespeed-0.0.1 → wavespeed-0.0.3}/wavespeed.egg-info/dependency_links.txt +0 -0
- {wavespeed-0.0.1 → wavespeed-0.0.3}/wavespeed.egg-info/requires.txt +0 -0
- {wavespeed-0.0.1 → wavespeed-0.0.3}/wavespeed.egg-info/top_level.txt +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wavespeed
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary: Python client for
|
|
5
|
-
Author:
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Summary: Python client for WaveSpeed AI
|
|
5
|
+
Author: WaveSpeed AI
|
|
6
6
|
License: MIT License
|
|
7
7
|
|
|
8
|
-
Copyright (c) 2025
|
|
8
|
+
Copyright (c) 2025 WaveSpeed AI
|
|
9
9
|
|
|
10
10
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
11
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -35,9 +35,9 @@ Requires-Dist: pydantic>1.10.7
|
|
|
35
35
|
Requires-Dist: typing_extensions>=4.5.0
|
|
36
36
|
Dynamic: license-file
|
|
37
37
|
|
|
38
|
-
#
|
|
38
|
+
# WaveSpeed Python Client
|
|
39
39
|
|
|
40
|
-
A Python client for interacting with the
|
|
40
|
+
A Python client for interacting with the WaveSpeed AI API.
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
43
43
|
|
|
@@ -50,10 +50,10 @@ pip install wavespeed
|
|
|
50
50
|
### Synchronous Image Generation
|
|
51
51
|
|
|
52
52
|
```python
|
|
53
|
-
from wavespeed import
|
|
53
|
+
from wavespeed import WaveSpeed
|
|
54
54
|
|
|
55
55
|
# Initialize the client with your API key (or set WAVESPEED_API_KEY environment variable)
|
|
56
|
-
client =
|
|
56
|
+
client = WaveSpeed(api_key="YOUR_API_KEY")
|
|
57
57
|
|
|
58
58
|
# Generate an image and wait for the result
|
|
59
59
|
prediction = client.run(
|
|
@@ -78,11 +78,11 @@ for i, img_url in enumerate(prediction.outputs):
|
|
|
78
78
|
|
|
79
79
|
```python
|
|
80
80
|
import asyncio
|
|
81
|
-
from wavespeed import
|
|
81
|
+
from wavespeed import WaveSpeed
|
|
82
82
|
|
|
83
83
|
async def generate_image():
|
|
84
84
|
# Initialize the client with your API key (or set WAVESPEED_API_KEY environment variable)
|
|
85
|
-
client =
|
|
85
|
+
client = WaveSpeed(api_key="YOUR_API_KEY")
|
|
86
86
|
|
|
87
87
|
try:
|
|
88
88
|
# Generate an image and wait for the result
|
|
@@ -115,10 +115,10 @@ asyncio.run(generate_image())
|
|
|
115
115
|
You can also create a prediction without waiting for it to complete:
|
|
116
116
|
|
|
117
117
|
```python
|
|
118
|
-
from wavespeed import
|
|
118
|
+
from wavespeed import WaveSpeed
|
|
119
119
|
|
|
120
120
|
# Initialize the client with your API key (or set WAVESPEED_API_KEY environment variable)
|
|
121
|
-
client =
|
|
121
|
+
client = WaveSpeed(api_key="YOUR_API_KEY")
|
|
122
122
|
|
|
123
123
|
# Create a prediction without waiting
|
|
124
124
|
prediction = client.create(
|
|
@@ -189,15 +189,15 @@ python examples/create_generate_image.py --prompt "A futuristic cityscape with f
|
|
|
189
189
|
|
|
190
190
|
## API Reference
|
|
191
191
|
|
|
192
|
-
###
|
|
192
|
+
### WaveSpeed Client
|
|
193
193
|
|
|
194
194
|
```python
|
|
195
|
-
|
|
195
|
+
WaveSpeed(api_key)
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
#### Parameters:
|
|
199
199
|
|
|
200
|
-
- `api_key` (str): Your
|
|
200
|
+
- `api_key` (str): Your WaveSpeed API key
|
|
201
201
|
|
|
202
202
|
### Methods
|
|
203
203
|
|
|
@@ -241,8 +241,10 @@ The `Prediction` object contains information about an image generation job:
|
|
|
241
241
|
prediction.id # Unique ID of the prediction
|
|
242
242
|
prediction.model # Model ID used for the prediction
|
|
243
243
|
prediction.status # Status of the prediction (processing, completed, failed)
|
|
244
|
-
prediction.outputs # List of output image URLs
|
|
245
244
|
prediction.input # Input parameters used for the prediction
|
|
245
|
+
prediction.outputs # List of output image URLs
|
|
246
|
+
prediction.urls.get # URL to get the prediction status
|
|
247
|
+
prediction.has_nsfw_contents # List of booleans indicating if each image has NSFW content
|
|
246
248
|
prediction.created_at # Creation timestamp
|
|
247
249
|
prediction.error # Error message (if any)
|
|
248
250
|
prediction.executionTime # Time taken to execute the prediction in milliseconds
|
|
@@ -261,7 +263,7 @@ await prediction.async_reload() -> Prediction
|
|
|
261
263
|
|
|
262
264
|
## Environment Variables
|
|
263
265
|
|
|
264
|
-
- `WAVESPEED_API_KEY`: Your
|
|
266
|
+
- `WAVESPEED_API_KEY`: Your WaveSpeed API key
|
|
265
267
|
- `WAVESPEED_POLL_INTERVAL`: Interval in seconds for polling prediction status (default: 1)
|
|
266
268
|
- `WAVESPEED_TIMEOUT`: Timeout in seconds for API requests (default: 60)
|
|
267
269
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# WaveSpeed Python Client
|
|
2
2
|
|
|
3
|
-
A Python client for interacting with the
|
|
3
|
+
A Python client for interacting with the WaveSpeed AI API.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -13,10 +13,10 @@ pip install wavespeed
|
|
|
13
13
|
### Synchronous Image Generation
|
|
14
14
|
|
|
15
15
|
```python
|
|
16
|
-
from wavespeed import
|
|
16
|
+
from wavespeed import WaveSpeed
|
|
17
17
|
|
|
18
18
|
# Initialize the client with your API key (or set WAVESPEED_API_KEY environment variable)
|
|
19
|
-
client =
|
|
19
|
+
client = WaveSpeed(api_key="YOUR_API_KEY")
|
|
20
20
|
|
|
21
21
|
# Generate an image and wait for the result
|
|
22
22
|
prediction = client.run(
|
|
@@ -41,11 +41,11 @@ for i, img_url in enumerate(prediction.outputs):
|
|
|
41
41
|
|
|
42
42
|
```python
|
|
43
43
|
import asyncio
|
|
44
|
-
from wavespeed import
|
|
44
|
+
from wavespeed import WaveSpeed
|
|
45
45
|
|
|
46
46
|
async def generate_image():
|
|
47
47
|
# Initialize the client with your API key (or set WAVESPEED_API_KEY environment variable)
|
|
48
|
-
client =
|
|
48
|
+
client = WaveSpeed(api_key="YOUR_API_KEY")
|
|
49
49
|
|
|
50
50
|
try:
|
|
51
51
|
# Generate an image and wait for the result
|
|
@@ -78,10 +78,10 @@ asyncio.run(generate_image())
|
|
|
78
78
|
You can also create a prediction without waiting for it to complete:
|
|
79
79
|
|
|
80
80
|
```python
|
|
81
|
-
from wavespeed import
|
|
81
|
+
from wavespeed import WaveSpeed
|
|
82
82
|
|
|
83
83
|
# Initialize the client with your API key (or set WAVESPEED_API_KEY environment variable)
|
|
84
|
-
client =
|
|
84
|
+
client = WaveSpeed(api_key="YOUR_API_KEY")
|
|
85
85
|
|
|
86
86
|
# Create a prediction without waiting
|
|
87
87
|
prediction = client.create(
|
|
@@ -152,15 +152,15 @@ python examples/create_generate_image.py --prompt "A futuristic cityscape with f
|
|
|
152
152
|
|
|
153
153
|
## API Reference
|
|
154
154
|
|
|
155
|
-
###
|
|
155
|
+
### WaveSpeed Client
|
|
156
156
|
|
|
157
157
|
```python
|
|
158
|
-
|
|
158
|
+
WaveSpeed(api_key)
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
#### Parameters:
|
|
162
162
|
|
|
163
|
-
- `api_key` (str): Your
|
|
163
|
+
- `api_key` (str): Your WaveSpeed API key
|
|
164
164
|
|
|
165
165
|
### Methods
|
|
166
166
|
|
|
@@ -204,8 +204,10 @@ The `Prediction` object contains information about an image generation job:
|
|
|
204
204
|
prediction.id # Unique ID of the prediction
|
|
205
205
|
prediction.model # Model ID used for the prediction
|
|
206
206
|
prediction.status # Status of the prediction (processing, completed, failed)
|
|
207
|
-
prediction.outputs # List of output image URLs
|
|
208
207
|
prediction.input # Input parameters used for the prediction
|
|
208
|
+
prediction.outputs # List of output image URLs
|
|
209
|
+
prediction.urls.get # URL to get the prediction status
|
|
210
|
+
prediction.has_nsfw_contents # List of booleans indicating if each image has NSFW content
|
|
209
211
|
prediction.created_at # Creation timestamp
|
|
210
212
|
prediction.error # Error message (if any)
|
|
211
213
|
prediction.executionTime # Time taken to execute the prediction in milliseconds
|
|
@@ -224,7 +226,7 @@ await prediction.async_reload() -> Prediction
|
|
|
224
226
|
|
|
225
227
|
## Environment Variables
|
|
226
228
|
|
|
227
|
-
- `WAVESPEED_API_KEY`: Your
|
|
229
|
+
- `WAVESPEED_API_KEY`: Your WaveSpeed API key
|
|
228
230
|
- `WAVESPEED_POLL_INTERVAL`: Interval in seconds for polling prediction status (default: 1)
|
|
229
231
|
- `WAVESPEED_TIMEOUT`: Timeout in seconds for API requests (default: 60)
|
|
230
232
|
|
|
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "wavespeed"
|
|
7
|
-
version = "0.0.
|
|
8
|
-
description = "Python client for
|
|
7
|
+
version = "0.0.3"
|
|
8
|
+
description = "Python client for WaveSpeed AI"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
11
|
-
authors = [{ name = "
|
|
11
|
+
authors = [{ name = "WaveSpeed AI" }]
|
|
12
12
|
requires-python = ">=3.8"
|
|
13
13
|
dependencies = [
|
|
14
14
|
"httpx>=0.21.0,<1",
|
|
@@ -37,7 +37,7 @@ asyncio_mode = "auto"
|
|
|
37
37
|
testpaths = "tests/"
|
|
38
38
|
|
|
39
39
|
[tool.setuptools]
|
|
40
|
-
packages = ["wavespeed"]
|
|
40
|
+
packages = ["wavespeed", "wavespeed.schemas"]
|
|
41
41
|
|
|
42
42
|
[tool.setuptools.package-data]
|
|
43
43
|
"wavespeed" = ["py.typed"]
|
|
@@ -5,23 +5,22 @@ Tests for the Wavespeed client.
|
|
|
5
5
|
import pytest
|
|
6
6
|
import respx
|
|
7
7
|
from httpx import Response
|
|
8
|
-
import asyncio
|
|
9
8
|
from datetime import datetime
|
|
10
9
|
|
|
11
|
-
from wavespeed.client import
|
|
10
|
+
from wavespeed.client import WaveSpeed
|
|
12
11
|
from wavespeed.schemas.prediction import Prediction, PredictionUrls
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
@pytest.fixture
|
|
16
15
|
def client():
|
|
17
16
|
"""Create a test client with a dummy API key."""
|
|
18
|
-
return
|
|
17
|
+
return WaveSpeed(api_key="test_api_key")
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
@pytest.fixture
|
|
22
21
|
async def async_client():
|
|
23
22
|
"""Create a test client with a dummy API key and clean up after test."""
|
|
24
|
-
client =
|
|
23
|
+
client = WaveSpeed(api_key="test_api_key")
|
|
25
24
|
yield client
|
|
26
25
|
await client.close()
|
|
27
26
|
|
|
@@ -6,11 +6,11 @@ A Python client for interacting with the Wavespeed AI API.
|
|
|
6
6
|
|
|
7
7
|
__version__ = "0.1.0"
|
|
8
8
|
|
|
9
|
-
from .client import
|
|
9
|
+
from .client import WaveSpeed
|
|
10
10
|
from .schemas.prediction import Prediction, PredictionUrls, PredictionResponse
|
|
11
11
|
|
|
12
12
|
__all__ = [
|
|
13
|
-
"
|
|
13
|
+
"WaveSpeed",
|
|
14
14
|
"Prediction",
|
|
15
15
|
"PredictionUrls",
|
|
16
16
|
"PredictionResponse",
|
|
@@ -6,7 +6,7 @@ from urllib.parse import urljoin
|
|
|
6
6
|
from wavespeed.schemas.prediction import Prediction
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class WaveSpeed:
|
|
10
10
|
"""
|
|
11
11
|
A client for interacting with the Wavespeed AI API.
|
|
12
12
|
"""
|
|
@@ -147,4 +147,4 @@ class Wavespeed:
|
|
|
147
147
|
|
|
148
148
|
def __str__(self) -> str:
|
|
149
149
|
"""String representation of the client."""
|
|
150
|
-
return f"
|
|
150
|
+
return f"WaveSpeed()"
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import logging
|
|
3
|
+
import time
|
|
4
|
+
from typing import List, Dict, Any, Optional
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
from pydantic import BaseModel, Field
|
|
7
|
+
import pydantic
|
|
8
|
+
from typing import TYPE_CHECKING
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from wavespeed.client import WaveSpeed
|
|
11
|
+
|
|
12
|
+
class PredictionUrls(BaseModel):
|
|
13
|
+
"""URLs associated with a prediction."""
|
|
14
|
+
get: str
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Prediction(BaseModel):
|
|
18
|
+
"""Response from a prediction API call."""
|
|
19
|
+
_client: "WaveSpeed" = pydantic.PrivateAttr()
|
|
20
|
+
|
|
21
|
+
id: str
|
|
22
|
+
model: str
|
|
23
|
+
input: Dict[str, Any] | None = None
|
|
24
|
+
outputs: List[str]
|
|
25
|
+
urls: PredictionUrls
|
|
26
|
+
has_nsfw_contents: List[bool]
|
|
27
|
+
status: str
|
|
28
|
+
created_at: datetime
|
|
29
|
+
error: str = ""
|
|
30
|
+
executionTime: int
|
|
31
|
+
|
|
32
|
+
def wait(self) -> "Prediction":
|
|
33
|
+
while self.status not in ['completed', 'failed']:
|
|
34
|
+
time.sleep(self._client.poll_interval)
|
|
35
|
+
print('Waiting for prediction to complete: ', self.urls.get, type(self.urls.get))
|
|
36
|
+
response = self._client.client.get(self.urls.get)
|
|
37
|
+
response.raise_for_status()
|
|
38
|
+
data = response.json()['data']
|
|
39
|
+
self._update_from_dict(data)
|
|
40
|
+
return self
|
|
41
|
+
|
|
42
|
+
async def async_wait(self) -> "Prediction":
|
|
43
|
+
while self.status not in ['completed', 'failed']:
|
|
44
|
+
await asyncio.sleep(self._client.poll_interval)
|
|
45
|
+
response = await self._client.async_client.get(self.urls.get)
|
|
46
|
+
response.raise_for_status()
|
|
47
|
+
data = response.json()['data']
|
|
48
|
+
self._update_from_dict(data)
|
|
49
|
+
return self
|
|
50
|
+
|
|
51
|
+
async def async_reload(self) -> "Prediction":
|
|
52
|
+
response = await self._client.async_client.get(self.urls.get)
|
|
53
|
+
response.raise_for_status()
|
|
54
|
+
data = response.json()['data']
|
|
55
|
+
self._update_from_dict(data)
|
|
56
|
+
return self
|
|
57
|
+
|
|
58
|
+
def reload(self) -> "Prediction":
|
|
59
|
+
response = self._client.client.get(self.urls.get)
|
|
60
|
+
response.raise_for_status()
|
|
61
|
+
data = response.json()['data']
|
|
62
|
+
self._update_from_dict(data)
|
|
63
|
+
return self
|
|
64
|
+
|
|
65
|
+
def _update_from_dict(self, data: Dict[str, Any]) -> None:
|
|
66
|
+
"""Update the object from a dictionary, handling nested objects properly."""
|
|
67
|
+
for key, value in data.items():
|
|
68
|
+
if key == 'urls' and isinstance(value, dict):
|
|
69
|
+
self.urls = PredictionUrls(**value)
|
|
70
|
+
elif hasattr(self, key):
|
|
71
|
+
setattr(self, key, value)
|
|
72
|
+
|
|
73
|
+
class PredictionResponse(BaseModel):
|
|
74
|
+
code: int
|
|
75
|
+
message: str
|
|
76
|
+
data: Prediction
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wavespeed
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary: Python client for
|
|
5
|
-
Author:
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Summary: Python client for WaveSpeed AI
|
|
5
|
+
Author: WaveSpeed AI
|
|
6
6
|
License: MIT License
|
|
7
7
|
|
|
8
|
-
Copyright (c) 2025
|
|
8
|
+
Copyright (c) 2025 WaveSpeed AI
|
|
9
9
|
|
|
10
10
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
11
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -35,9 +35,9 @@ Requires-Dist: pydantic>1.10.7
|
|
|
35
35
|
Requires-Dist: typing_extensions>=4.5.0
|
|
36
36
|
Dynamic: license-file
|
|
37
37
|
|
|
38
|
-
#
|
|
38
|
+
# WaveSpeed Python Client
|
|
39
39
|
|
|
40
|
-
A Python client for interacting with the
|
|
40
|
+
A Python client for interacting with the WaveSpeed AI API.
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
43
43
|
|
|
@@ -50,10 +50,10 @@ pip install wavespeed
|
|
|
50
50
|
### Synchronous Image Generation
|
|
51
51
|
|
|
52
52
|
```python
|
|
53
|
-
from wavespeed import
|
|
53
|
+
from wavespeed import WaveSpeed
|
|
54
54
|
|
|
55
55
|
# Initialize the client with your API key (or set WAVESPEED_API_KEY environment variable)
|
|
56
|
-
client =
|
|
56
|
+
client = WaveSpeed(api_key="YOUR_API_KEY")
|
|
57
57
|
|
|
58
58
|
# Generate an image and wait for the result
|
|
59
59
|
prediction = client.run(
|
|
@@ -78,11 +78,11 @@ for i, img_url in enumerate(prediction.outputs):
|
|
|
78
78
|
|
|
79
79
|
```python
|
|
80
80
|
import asyncio
|
|
81
|
-
from wavespeed import
|
|
81
|
+
from wavespeed import WaveSpeed
|
|
82
82
|
|
|
83
83
|
async def generate_image():
|
|
84
84
|
# Initialize the client with your API key (or set WAVESPEED_API_KEY environment variable)
|
|
85
|
-
client =
|
|
85
|
+
client = WaveSpeed(api_key="YOUR_API_KEY")
|
|
86
86
|
|
|
87
87
|
try:
|
|
88
88
|
# Generate an image and wait for the result
|
|
@@ -115,10 +115,10 @@ asyncio.run(generate_image())
|
|
|
115
115
|
You can also create a prediction without waiting for it to complete:
|
|
116
116
|
|
|
117
117
|
```python
|
|
118
|
-
from wavespeed import
|
|
118
|
+
from wavespeed import WaveSpeed
|
|
119
119
|
|
|
120
120
|
# Initialize the client with your API key (or set WAVESPEED_API_KEY environment variable)
|
|
121
|
-
client =
|
|
121
|
+
client = WaveSpeed(api_key="YOUR_API_KEY")
|
|
122
122
|
|
|
123
123
|
# Create a prediction without waiting
|
|
124
124
|
prediction = client.create(
|
|
@@ -189,15 +189,15 @@ python examples/create_generate_image.py --prompt "A futuristic cityscape with f
|
|
|
189
189
|
|
|
190
190
|
## API Reference
|
|
191
191
|
|
|
192
|
-
###
|
|
192
|
+
### WaveSpeed Client
|
|
193
193
|
|
|
194
194
|
```python
|
|
195
|
-
|
|
195
|
+
WaveSpeed(api_key)
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
#### Parameters:
|
|
199
199
|
|
|
200
|
-
- `api_key` (str): Your
|
|
200
|
+
- `api_key` (str): Your WaveSpeed API key
|
|
201
201
|
|
|
202
202
|
### Methods
|
|
203
203
|
|
|
@@ -241,8 +241,10 @@ The `Prediction` object contains information about an image generation job:
|
|
|
241
241
|
prediction.id # Unique ID of the prediction
|
|
242
242
|
prediction.model # Model ID used for the prediction
|
|
243
243
|
prediction.status # Status of the prediction (processing, completed, failed)
|
|
244
|
-
prediction.outputs # List of output image URLs
|
|
245
244
|
prediction.input # Input parameters used for the prediction
|
|
245
|
+
prediction.outputs # List of output image URLs
|
|
246
|
+
prediction.urls.get # URL to get the prediction status
|
|
247
|
+
prediction.has_nsfw_contents # List of booleans indicating if each image has NSFW content
|
|
246
248
|
prediction.created_at # Creation timestamp
|
|
247
249
|
prediction.error # Error message (if any)
|
|
248
250
|
prediction.executionTime # Time taken to execute the prediction in milliseconds
|
|
@@ -261,7 +263,7 @@ await prediction.async_reload() -> Prediction
|
|
|
261
263
|
|
|
262
264
|
## Environment Variables
|
|
263
265
|
|
|
264
|
-
- `WAVESPEED_API_KEY`: Your
|
|
266
|
+
- `WAVESPEED_API_KEY`: Your WaveSpeed API key
|
|
265
267
|
- `WAVESPEED_POLL_INTERVAL`: Interval in seconds for polling prediction status (default: 1)
|
|
266
268
|
- `WAVESPEED_TIMEOUT`: Timeout in seconds for API requests (default: 60)
|
|
267
269
|
|
|
@@ -8,4 +8,6 @@ wavespeed.egg-info/PKG-INFO
|
|
|
8
8
|
wavespeed.egg-info/SOURCES.txt
|
|
9
9
|
wavespeed.egg-info/dependency_links.txt
|
|
10
10
|
wavespeed.egg-info/requires.txt
|
|
11
|
-
wavespeed.egg-info/top_level.txt
|
|
11
|
+
wavespeed.egg-info/top_level.txt
|
|
12
|
+
wavespeed/schemas/__init__.py
|
|
13
|
+
wavespeed/schemas/prediction.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|