GPTRouter 0.2.1__tar.gz → 0.2.2__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.1
2
2
  Name: GPTRouter
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A Python package for working with GPTRouter APIs
5
5
  Author-email: sirjanpreet@writesonic.com
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GPTRouter
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A Python package for working with GPTRouter APIs
5
5
  Author-email: sirjanpreet@writesonic.com
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -242,6 +242,9 @@ class GPTRouterClient:
242
242
  payload=api_payload,
243
243
  )
244
244
  generated_images = api_response.get("response", [])
245
+ if isinstance(generated_images, dict):
246
+ generated_images = generated_images.get('artifacts', [])
247
+
245
248
  return [
246
249
  parse_obj_as(ImageGenerationResponse, generated_img)
247
250
  for generated_img in generated_images
@@ -7,6 +7,7 @@ class ProvidersEnum(Enum):
7
7
  AZURE_CHAT_OPENAI = "azure_chat_openai"
8
8
  COHERE = "cohere"
9
9
  DALLE = "dall-e"
10
+ STABLE_DIFFUSION = "stable-diffusion-v1-6"
10
11
 
11
12
  class ModelsEnum(Enum):
12
13
  OPENAI_GPT_35_TURBO_16K = "gpt-3.5-turbo-16k"
@@ -31,6 +32,9 @@ class ModelsEnum(Enum):
31
32
  CLAUDE_INSTANT_12 = "claude-instant-1.2"
32
33
 
33
34
  DALLE_3 = "dall-e-3"
35
+
36
+ STABLE_DIFFUSION_XL = "stable-diffusion-xl-1024-v1-0"
37
+ STABLE_DIFFUSION_V6 = "stable-diffusion-v1-6"
34
38
 
35
39
  class StreamingEventType(Enum):
36
40
  UPDATE = "update"
@@ -92,5 +92,6 @@ class ImageGenerationRequest(BaseModel):
92
92
 
93
93
 
94
94
  class ImageGenerationResponse(BaseModel):
95
- revised_prompt: str
96
- url: str
95
+ url: str = None
96
+ base64: str = None
97
+ finish_reason: Optional[str] = Field(default="SUCCESS", alias='finishReason')
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name="GPTRouter",
8
- version="0.2.1",
8
+ version="0.2.2",
9
9
  description="A Python package for working with GPTRouter APIs",
10
10
  long_description=long_description,
11
11
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes