GPTRouter 0.2.2__tar.gz → 0.2.4__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.2 → GPTRouter-0.2.4}/GPTRouter.egg-info/PKG-INFO +1 -1
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/PKG-INFO +1 -1
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/gpt_router/client.py +7 -1
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/gpt_router/models.py +1 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/setup.py +1 -1
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/GPTRouter.egg-info/SOURCES.txt +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/GPTRouter.egg-info/dependency_links.txt +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/GPTRouter.egg-info/requires.txt +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/GPTRouter.egg-info/top_level.txt +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/LICENSE +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/README.md +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/gpt_router/__init__.py +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/gpt_router/constants.py +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/gpt_router/enums.py +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/gpt_router/exceptions.py +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/pyproject.toml +0 -0
- {GPTRouter-0.2.2 → GPTRouter-0.2.4}/setup.cfg +0 -0
|
@@ -3,7 +3,7 @@ from pydantic import parse_obj_as
|
|
|
3
3
|
import logging
|
|
4
4
|
import json
|
|
5
5
|
import httpx
|
|
6
|
-
from typing import Generator, List, Union
|
|
6
|
+
from typing import Generator, List, Optional, Union
|
|
7
7
|
|
|
8
8
|
from gpt_router.models import (
|
|
9
9
|
ImageGenerationRequest,
|
|
@@ -206,6 +206,9 @@ class GPTRouterClient:
|
|
|
206
206
|
*,
|
|
207
207
|
ordered_generation_requests: List[ModelGenerationRequest],
|
|
208
208
|
is_stream=False,
|
|
209
|
+
tag: Optional[str] = None,
|
|
210
|
+
user_id: Optional[str] = None,
|
|
211
|
+
history_id: Optional[str] = None,
|
|
209
212
|
) -> GenerationResponse:
|
|
210
213
|
api_path = "/v1/generate"
|
|
211
214
|
api_method = "POST"
|
|
@@ -215,6 +218,9 @@ class GPTRouterClient:
|
|
|
215
218
|
request.dict(exclude_none=True, by_alias=True)
|
|
216
219
|
for request in ordered_generation_requests
|
|
217
220
|
],
|
|
221
|
+
"tag": tag,
|
|
222
|
+
"createdByUserId": user_id,
|
|
223
|
+
"historyId": history_id,
|
|
218
224
|
}
|
|
219
225
|
if is_stream:
|
|
220
226
|
return self.astream_events(
|
|
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
|