GPTRouter 1.0.0__tar.gz → 1.0.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.
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/GPTRouter.egg-info/PKG-INFO +1 -1
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/PKG-INFO +1 -1
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/gpt_router/models.py +21 -3
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/setup.py +1 -1
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/GPTRouter.egg-info/SOURCES.txt +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/GPTRouter.egg-info/dependency_links.txt +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/GPTRouter.egg-info/requires.txt +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/GPTRouter.egg-info/top_level.txt +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/LICENSE +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/README.md +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/gpt_router/__init__.py +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/gpt_router/client.py +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/gpt_router/constants.py +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/gpt_router/enums.py +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/gpt_router/exceptions.py +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/pyproject.toml +0 -0
- {GPTRouter-1.0.0 → GPTRouter-1.0.2}/setup.cfg +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from uuid import UUID
|
|
2
2
|
from pydantic import BaseModel, Field, root_validator, validator
|
|
3
3
|
from enum import Enum
|
|
4
|
-
from typing import Dict, List, Optional, Any, Union
|
|
4
|
+
from typing import Dict, List, Literal, Optional, Any, Union
|
|
5
5
|
from humps import camelize
|
|
6
6
|
|
|
7
7
|
|
|
@@ -32,8 +32,21 @@ class ExtendedThinking(BaseModel):
|
|
|
32
32
|
budget_tokens: Optional[int] = 1024
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
class UserLocationApproximate(BaseModel):
|
|
36
|
+
city: Optional[str] = None
|
|
37
|
+
country: Optional[str] = None
|
|
38
|
+
region: Optional[str] = None
|
|
39
|
+
timezone: Optional[str] = None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class UserLocation(BaseModel):
|
|
43
|
+
type: Optional[str] = None
|
|
44
|
+
approximate: Optional[UserLocationApproximate] = None
|
|
45
|
+
|
|
46
|
+
|
|
35
47
|
class WebSearchOptions(BaseModel):
|
|
36
48
|
search_context_size: Optional[SearchContextSize] = None
|
|
49
|
+
user_location: Optional[Union[UserLocation, dict]] = None
|
|
37
50
|
|
|
38
51
|
|
|
39
52
|
class GenerationParams(BaseModel):
|
|
@@ -62,6 +75,7 @@ class GenerationParams(BaseModel):
|
|
|
62
75
|
colasce_into_thinking_tag: Optional[bool] = None
|
|
63
76
|
use_response_api: Optional[bool] = None
|
|
64
77
|
web_search_options: Optional[WebSearchOptions] = None
|
|
78
|
+
reasoning_effort: Optional[Literal["low", "medium", "high"]] = None
|
|
65
79
|
|
|
66
80
|
|
|
67
81
|
class ModelGenerationRequest(BaseModel):
|
|
@@ -119,6 +133,10 @@ class ImageGenerationRequest(BaseModel):
|
|
|
119
133
|
width: Optional[int] = Field(None, alias="width")
|
|
120
134
|
height: Optional[int] = Field(None, alias="height")
|
|
121
135
|
num_inference_steps: Optional[int] = Field(None, alias="numInferenceSteps")
|
|
136
|
+
app_id: Optional[str] = Field(None, alias="appId")
|
|
137
|
+
user_id: Optional[str] = Field(None, alias="createdByUserId")
|
|
138
|
+
history_id: Optional[str] = Field(None, alias="historyId")
|
|
139
|
+
feature: Optional[str] = Field(None, alias="feature")
|
|
122
140
|
|
|
123
141
|
class Config:
|
|
124
142
|
allow_population_by_field_name = True
|
|
@@ -151,11 +169,11 @@ class ImageEditRequest(BaseModel):
|
|
|
151
169
|
response_format: Optional[str] = Field(alias="responseFormat", default=None)
|
|
152
170
|
size: Optional[str] = Field(default="1024x1024")
|
|
153
171
|
user: Optional[str] = Field(default=None)
|
|
154
|
-
|
|
172
|
+
|
|
155
173
|
class Config:
|
|
156
174
|
allow_population_by_field_name = True
|
|
157
175
|
protected_namespaces = ()
|
|
158
|
-
|
|
176
|
+
|
|
159
177
|
def dict(self, *args, **kwargs):
|
|
160
178
|
base_dict = super().dict(*args, **kwargs, exclude_none=True, by_alias=True)
|
|
161
179
|
return base_dict
|
|
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
|
|
File without changes
|