indoxrouter 0.1.17__py3-none-any.whl → 0.1.18__py3-none-any.whl
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.
- indoxrouter/client.py +21 -12
- {indoxrouter-0.1.17.dist-info → indoxrouter-0.1.18.dist-info}/METADATA +1 -1
- indoxrouter-0.1.18.dist-info/RECORD +8 -0
- indoxrouter-0.1.17.dist-info/RECORD +0 -8
- {indoxrouter-0.1.17.dist-info → indoxrouter-0.1.18.dist-info}/WHEEL +0 -0
- {indoxrouter-0.1.17.dist-info → indoxrouter-0.1.18.dist-info}/top_level.txt +0 -0
indoxrouter/client.py
CHANGED
@@ -531,10 +531,10 @@ class Client:
|
|
531
531
|
self,
|
532
532
|
prompt: str,
|
533
533
|
model: str = DEFAULT_IMAGE_MODEL,
|
534
|
-
size: str =
|
535
|
-
n: int =
|
536
|
-
quality: str =
|
537
|
-
style: str =
|
534
|
+
size: Optional[str] = None,
|
535
|
+
n: Optional[int] = None,
|
536
|
+
quality: Optional[str] = None,
|
537
|
+
style: Optional[str] = None,
|
538
538
|
# Standard parameters
|
539
539
|
response_format: Optional[str] = None,
|
540
540
|
user: Optional[str] = None,
|
@@ -563,10 +563,13 @@ class Client:
|
|
563
563
|
Args:
|
564
564
|
prompt: Text prompt
|
565
565
|
model: Model to use in the format "provider/model" (e.g., "openai/dall-e-3", "google/imagen-3.0-generate-002")
|
566
|
-
|
566
|
+
|
567
|
+
# Provider-specific parameters - will only be included if explicitly provided
|
568
|
+
# Note: Different providers support different parameters
|
569
|
+
size: Image size - For OpenAI: "1024x1024", "512x512", etc. For Google: "1:1", "4:3", etc.
|
567
570
|
n: Number of images to generate
|
568
|
-
quality: Image quality (e.g., "standard", "hd")
|
569
|
-
style: Image style (e.g., "vivid", "natural")
|
571
|
+
quality: Image quality (e.g., "standard", "hd") - supported by some providers
|
572
|
+
style: Image style (e.g., "vivid", "natural") - supported by some providers
|
570
573
|
|
571
574
|
# Standard parameters
|
572
575
|
response_format: Format of the response - "url" or "b64_json"
|
@@ -605,16 +608,22 @@ class Client:
|
|
605
608
|
if key not in ["return_generator"]: # List of parameters to exclude
|
606
609
|
filtered_kwargs[key] = value
|
607
610
|
|
608
|
-
# Create the base request data
|
611
|
+
# Create the base request data with only the required parameters
|
609
612
|
data = {
|
610
613
|
"prompt": prompt,
|
611
614
|
"model": formatted_model,
|
612
|
-
"n": n,
|
613
|
-
"size": size,
|
614
|
-
"quality": quality,
|
615
|
-
"style": style,
|
616
615
|
}
|
617
616
|
|
617
|
+
# Add optional parameters only if they are explicitly provided
|
618
|
+
if n is not None:
|
619
|
+
data["n"] = n
|
620
|
+
if size is not None:
|
621
|
+
data["size"] = size
|
622
|
+
if quality is not None:
|
623
|
+
data["quality"] = quality
|
624
|
+
if style is not None:
|
625
|
+
data["style"] = style
|
626
|
+
|
618
627
|
# Add standard parameters if provided
|
619
628
|
if response_format is not None:
|
620
629
|
data["response_format"] = response_format
|
@@ -0,0 +1,8 @@
|
|
1
|
+
indoxrouter/__init__.py,sha256=kwGvH8F5oqm2O4kLs-UtPfcY0AYiy5ZDUg-Sh3iYJA4,1627
|
2
|
+
indoxrouter/client.py,sha256=j1ESSti83R9_fDiYEop0FJqtho0e2FuYes92XY7iImI,35263
|
3
|
+
indoxrouter/constants.py,sha256=GezZ9nuwK3A37xpWlcfXCrMsIIlCdP7xnvEkPBMyn5g,1383
|
4
|
+
indoxrouter/exceptions.py,sha256=qs7f9AnJ7SkOyf9N5qRaZIKpECE8uBq1Pvcg19Jif-U,1718
|
5
|
+
indoxrouter-0.1.18.dist-info/METADATA,sha256=2K3ms5FkCR1L_PkApVOwzF10AHZWh-nn6yi9GvqDlQE,6639
|
6
|
+
indoxrouter-0.1.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
indoxrouter-0.1.18.dist-info/top_level.txt,sha256=v6FGWkw0QAnXhyYtnXLI1cxzna0iveNvZUotVzCWabM,12
|
8
|
+
indoxrouter-0.1.18.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
indoxrouter/__init__.py,sha256=kwGvH8F5oqm2O4kLs-UtPfcY0AYiy5ZDUg-Sh3iYJA4,1627
|
2
|
-
indoxrouter/client.py,sha256=0FZ-7mgE_kxbRpmRwJrucpvHme4MQOToX2VqVw9PKQE,34706
|
3
|
-
indoxrouter/constants.py,sha256=GezZ9nuwK3A37xpWlcfXCrMsIIlCdP7xnvEkPBMyn5g,1383
|
4
|
-
indoxrouter/exceptions.py,sha256=qs7f9AnJ7SkOyf9N5qRaZIKpECE8uBq1Pvcg19Jif-U,1718
|
5
|
-
indoxrouter-0.1.17.dist-info/METADATA,sha256=XFpOPo3DdQQuiPzmAOTbQvVc0bJRxPgD6FkNLkEyMFA,6639
|
6
|
-
indoxrouter-0.1.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
indoxrouter-0.1.17.dist-info/top_level.txt,sha256=v6FGWkw0QAnXhyYtnXLI1cxzna0iveNvZUotVzCWabM,12
|
8
|
-
indoxrouter-0.1.17.dist-info/RECORD,,
|
File without changes
|
File without changes
|