GPTRouter 0.4.3__tar.gz → 0.4.5__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.4.3 → GPTRouter-0.4.5}/GPTRouter.egg-info/PKG-INFO +1 -1
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/PKG-INFO +1 -1
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/gpt_router/models.py +8 -4
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/setup.py +1 -1
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/GPTRouter.egg-info/SOURCES.txt +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/GPTRouter.egg-info/dependency_links.txt +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/GPTRouter.egg-info/requires.txt +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/GPTRouter.egg-info/top_level.txt +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/LICENSE +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/README.md +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/gpt_router/__init__.py +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/gpt_router/client.py +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/gpt_router/constants.py +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/gpt_router/enums.py +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/gpt_router/exceptions.py +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/pyproject.toml +0 -0
- {GPTRouter-0.4.3 → GPTRouter-0.4.5}/setup.cfg +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from uuid import UUID
|
|
2
2
|
from pydantic import BaseModel, Field
|
|
3
3
|
|
|
4
|
-
from typing import List, Optional, Dict, Any
|
|
4
|
+
from typing import List, Optional, Dict, Any, Union
|
|
5
5
|
from humps import camelize
|
|
6
6
|
|
|
7
7
|
|
|
@@ -15,6 +15,7 @@ class GPTRouterMetadata(BaseModel):
|
|
|
15
15
|
created_by_user_id: Optional[str] = None
|
|
16
16
|
appId: Optional[str] = None
|
|
17
17
|
|
|
18
|
+
|
|
18
19
|
class GenerationParams(BaseModel):
|
|
19
20
|
messages: Optional[List[Any]] = None
|
|
20
21
|
max_tokens: Optional[int] = None
|
|
@@ -28,6 +29,7 @@ class GenerationParams(BaseModel):
|
|
|
28
29
|
functions: Optional[List[Any]] = None
|
|
29
30
|
function_call: Optional[dict] = None
|
|
30
31
|
tools: Optional[List[Any]] = None
|
|
32
|
+
tool_choice: Optional[Union[str, dict]] = None
|
|
31
33
|
response_format: Optional[Dict[str, Any]] = None
|
|
32
34
|
parallel_tool_calls: Optional[bool] = None
|
|
33
35
|
tag: Optional[str] = None
|
|
@@ -111,7 +113,7 @@ class ImageGenerationRequest(BaseModel):
|
|
|
111
113
|
class ImageGenerationResponse(BaseModel):
|
|
112
114
|
url: str = None
|
|
113
115
|
base64: str = None
|
|
114
|
-
finish_reason: Optional[str] = Field(default="SUCCESS", alias=
|
|
116
|
+
finish_reason: Optional[str] = Field(default="SUCCESS", alias="finishReason")
|
|
115
117
|
|
|
116
118
|
|
|
117
119
|
class ModelRouterGenerationRequest(BaseModel):
|
|
@@ -134,6 +136,7 @@ class ModelRouterGenerationRequest(BaseModel):
|
|
|
134
136
|
|
|
135
137
|
return result
|
|
136
138
|
|
|
139
|
+
|
|
137
140
|
class ModelRouterEmbeddingsGenerationParams(BaseModel):
|
|
138
141
|
input: List[str]
|
|
139
142
|
|
|
@@ -141,6 +144,7 @@ class ModelRouterEmbeddingsGenerationParams(BaseModel):
|
|
|
141
144
|
class ModelRouterEmbeddingsGenerationRequest(ModelRouterGenerationRequest):
|
|
142
145
|
prompt_params: ModelRouterEmbeddingsGenerationParams = Field(alias="promptParams")
|
|
143
146
|
|
|
147
|
+
|
|
144
148
|
class ModelRouterGenerationResponse(BaseModel):
|
|
145
149
|
id: str
|
|
146
150
|
choices: List[Choice]
|
|
@@ -150,9 +154,9 @@ class ModelRouterGenerationResponse(BaseModel):
|
|
|
150
154
|
meta: Optional[Usage]
|
|
151
155
|
|
|
152
156
|
|
|
153
|
-
|
|
154
157
|
class EmbeddingsChoice(BaseModel):
|
|
155
158
|
embedding: List[float]
|
|
156
159
|
|
|
160
|
+
|
|
157
161
|
class ModelRouterEmbeddingsGenerationResponse(BaseModel):
|
|
158
|
-
choices: List[EmbeddingsChoice]
|
|
162
|
+
choices: List[EmbeddingsChoice]
|
|
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
|