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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GPTRouter
3
- Version: 1.0.0
3
+ Version: 1.0.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: 1.0.0
3
+ Version: 1.0.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,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
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name="GPTRouter",
8
- version="v1.0.0",
8
+ version="1.0.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
File without changes