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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GPTRouter
3
- Version: 0.2.2
3
+ Version: 0.2.4
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: 0.2.2
3
+ Version: 0.2.4
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
@@ -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(
@@ -21,6 +21,7 @@ class GenerationParams(BaseModel):
21
21
  functions: Optional[List[Any]] = None
22
22
  function_call: Optional[dict] = None
23
23
  tools: Optional[List[Any]] = None
24
+ response_format: Optional[Dict[str, Any]] = None
24
25
 
25
26
 
26
27
  class ModelGenerationRequest(BaseModel):
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name="GPTRouter",
8
- version="0.2.2",
8
+ version="0.2.4",
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