GPTRouter 0.2.7__tar.gz → 0.2.9__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.7
3
+ Version: 0.2.9
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.7
3
+ Version: 0.2.9
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
@@ -181,6 +181,7 @@ class GPTRouterClient:
181
181
  tag: Optional[str] = None,
182
182
  user_id: Optional[str] = None,
183
183
  history_id: Optional[str] = None,
184
+ metadata: Optional[dict] = None,
184
185
  ) -> Union[GenerationResponse, Generator[ChunkedGenerationResponse]]:
185
186
  api_path = "/v1/generate"
186
187
  api_method = "POST"
@@ -193,6 +194,7 @@ class GPTRouterClient:
193
194
  "tag": tag,
194
195
  "createdByUserId": user_id,
195
196
  "historyId": history_id,
197
+ "metadata": metadata,
196
198
  }
197
199
  if is_stream:
198
200
  return self.stream_events(
@@ -215,6 +217,7 @@ class GPTRouterClient:
215
217
  tag: Optional[str] = None,
216
218
  user_id: Optional[str] = None,
217
219
  history_id: Optional[str] = None,
220
+ metadata: Optional[dict] = None,
218
221
  ) -> GenerationResponse:
219
222
  api_path = "/v1/generate"
220
223
  api_method = "POST"
@@ -227,6 +230,7 @@ class GPTRouterClient:
227
230
  "tag": tag,
228
231
  "createdByUserId": user_id,
229
232
  "historyId": history_id,
233
+ "metadata": metadata,
230
234
  }
231
235
  if is_stream:
232
236
  return self.astream_events(
@@ -255,8 +259,8 @@ class GPTRouterClient:
255
259
  )
256
260
  generated_images = api_response.get("response", [])
257
261
  if isinstance(generated_images, dict):
258
- generated_images = generated_images.get('artifacts', [])
259
-
262
+ generated_images = generated_images.get("artifacts", [])
263
+
260
264
  return [
261
265
  parse_obj_as(ImageGenerationResponse, generated_img)
262
266
  for generated_img in generated_images
@@ -91,6 +91,8 @@ class GPTRouterEngines(Enum):
91
91
  )
92
92
 
93
93
  OPENAI_GPT_4_O = ModelDetails(ProvidersEnum.CHAT_OPENAI.value, "gpt-4o")
94
+
95
+ OPENAI_GPT_4_O_MINI = ModelDetails(ProvidersEnum.CHAT_OPENAI.value, "gpt-4o-mini")
94
96
 
95
97
  OPENAI_GPT_4_32K_0613 = ModelDetails(
96
98
  ProvidersEnum.CHAT_OPENAI.value, "gpt-4-32k-0613"
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name="GPTRouter",
8
- version="0.2.7",
8
+ version="0.2.9",
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