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.
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/GPTRouter.egg-info/PKG-INFO +1 -1
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/PKG-INFO +1 -1
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/gpt_router/client.py +6 -2
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/gpt_router/enums.py +2 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/setup.py +1 -1
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/GPTRouter.egg-info/SOURCES.txt +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/GPTRouter.egg-info/dependency_links.txt +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/GPTRouter.egg-info/requires.txt +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/GPTRouter.egg-info/top_level.txt +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/LICENSE +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/README.md +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/gpt_router/__init__.py +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/gpt_router/constants.py +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/gpt_router/exceptions.py +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/gpt_router/models.py +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/pyproject.toml +0 -0
- {GPTRouter-0.2.7 → GPTRouter-0.2.9}/setup.cfg +0 -0
|
@@ -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(
|
|
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"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|