indoxrouter 0.1.17__tar.gz → 0.1.18__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: indoxrouter
3
- Version: 0.1.17
3
+ Version: 0.1.18
4
4
  Summary: A unified client for various AI providers
5
5
  Author-email: indoxRouter Team <ashkan.eskandari.dev@gmail.com>
6
6
  License: MIT
@@ -531,10 +531,10 @@ class Client:
531
531
  self,
532
532
  prompt: str,
533
533
  model: str = DEFAULT_IMAGE_MODEL,
534
- size: str = "1024x1024",
535
- n: int = 1,
536
- quality: str = "standard",
537
- style: str = "vivid",
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
- size: Image size (e.g., "1024x1024")
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: indoxrouter
3
- Version: 0.1.17
3
+ Version: 0.1.18
4
4
  Summary: A unified client for various AI providers
5
5
  Author-email: indoxRouter Team <ashkan.eskandari.dev@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "indoxrouter"
7
- version = "0.1.17"
7
+ version = "0.1.18"
8
8
  authors = [
9
9
  {name = "indoxRouter Team", email = "ashkan.eskandari.dev@gmail.com"},
10
10
  ]
File without changes
File without changes
File without changes