GPTRouter 0.3.0__tar.gz → 0.3.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-0.3.0 → GPTRouter-0.3.2}/GPTRouter.egg-info/PKG-INFO +1 -1
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/PKG-INFO +1 -1
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/gpt_router/client.py +7 -7
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/gpt_router/models.py +1 -1
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/setup.py +1 -1
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/GPTRouter.egg-info/SOURCES.txt +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/GPTRouter.egg-info/dependency_links.txt +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/GPTRouter.egg-info/requires.txt +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/GPTRouter.egg-info/top_level.txt +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/LICENSE +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/README.md +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/gpt_router/__init__.py +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/gpt_router/constants.py +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/gpt_router/enums.py +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/gpt_router/exceptions.py +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/pyproject.toml +0 -0
- {GPTRouter-0.3.0 → GPTRouter-0.3.2}/setup.cfg +0 -0
|
@@ -62,9 +62,9 @@ class GPTRouterClient:
|
|
|
62
62
|
payload.update(
|
|
63
63
|
{
|
|
64
64
|
"metadata": metadata,
|
|
65
|
-
"tag":
|
|
66
|
-
"createdByUserId":
|
|
67
|
-
"historyId": str(
|
|
65
|
+
"tag": metadata.get('tag'),
|
|
66
|
+
"createdByUserId": metadata['created_by_user_id'],
|
|
67
|
+
"historyId": str(metadata['history_id']) if metadata.get('history_id') else None,
|
|
68
68
|
}
|
|
69
69
|
)
|
|
70
70
|
|
|
@@ -76,7 +76,7 @@ class GPTRouterClient:
|
|
|
76
76
|
async with httpx.AsyncClient() as client:
|
|
77
77
|
response = await client.request(
|
|
78
78
|
method,
|
|
79
|
-
url=self.base_url +
|
|
79
|
+
url=self.base_url.rstrip('/') + ('/api' if not self.base_url.endswith('/api') else '') + path,
|
|
80
80
|
headers={
|
|
81
81
|
"content-type": "application/json",
|
|
82
82
|
"ws-secret": self.api_key,
|
|
@@ -102,7 +102,7 @@ class GPTRouterClient:
|
|
|
102
102
|
with httpx.Client() as client:
|
|
103
103
|
response = client.request(
|
|
104
104
|
method,
|
|
105
|
-
url=self.base_url +
|
|
105
|
+
url=self.base_url.rstrip('/') + ('/api' if not self.base_url.endswith('/api') else '') + path,
|
|
106
106
|
headers={
|
|
107
107
|
"content-type": "application/json",
|
|
108
108
|
"ws-secret": self.api_key,
|
|
@@ -128,7 +128,7 @@ class GPTRouterClient:
|
|
|
128
128
|
async with httpx.AsyncClient() as client:
|
|
129
129
|
async with client.stream(
|
|
130
130
|
method,
|
|
131
|
-
url=
|
|
131
|
+
url=self.base_url.rstrip('/') + ('/api' if not self.base_url.endswith('/api') else '') + path,
|
|
132
132
|
data=json.dumps(payload),
|
|
133
133
|
headers={
|
|
134
134
|
"Content-type": "application/json",
|
|
@@ -167,7 +167,7 @@ class GPTRouterClient:
|
|
|
167
167
|
with httpx.Client() as client:
|
|
168
168
|
with client.stream(
|
|
169
169
|
method=method,
|
|
170
|
-
url=
|
|
170
|
+
url=self.base_url.rstrip('/') + ('/api' if not self.base_url.endswith('/api') else '') + path,
|
|
171
171
|
data=json.dumps(payload),
|
|
172
172
|
headers={
|
|
173
173
|
"Content-type": "application/json",
|
|
@@ -28,7 +28,7 @@ class GenerationParams(BaseModel):
|
|
|
28
28
|
function_call: Optional[dict] = None
|
|
29
29
|
tools: Optional[List[Any]] = None
|
|
30
30
|
response_format: Optional[Dict[str, Any]] = None
|
|
31
|
-
parallel_tool_calls: Optional[bool] =
|
|
31
|
+
parallel_tool_calls: Optional[bool] = None
|
|
32
32
|
tag: Optional[str] = None
|
|
33
33
|
user_id: Optional[str] = None
|
|
34
34
|
history_id: Optional[str] = None
|
|
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
|