payi 0.1.0a109__py3-none-any.whl → 0.1.0a111__py3-none-any.whl
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.
Potentially problematic release.
This version of payi might be problematic. Click here for more details.
- payi/_version.py +1 -1
- payi/lib/AnthropicInstrumentor.py +67 -20
- payi/lib/BedrockInstrumentor.py +35 -1
- payi/lib/VertexRequest.py +3 -1
- payi/lib/data/cohere_embed_english_v3.json +30706 -0
- payi/lib/instrument.py +4 -2
- {payi-0.1.0a109.dist-info → payi-0.1.0a111.dist-info}/METADATA +2 -1
- {payi-0.1.0a109.dist-info → payi-0.1.0a111.dist-info}/RECORD +10 -9
- {payi-0.1.0a109.dist-info → payi-0.1.0a111.dist-info}/WHEEL +0 -0
- {payi-0.1.0a109.dist-info → payi-0.1.0a111.dist-info}/licenses/LICENSE +0 -0
payi/lib/instrument.py
CHANGED
|
@@ -58,6 +58,7 @@ class _ProviderRequest:
|
|
|
58
58
|
self._function_call_builder: Optional[dict[int, ProviderResponseFunctionCall]] = None
|
|
59
59
|
self._building_function_response: bool = False
|
|
60
60
|
self._function_calls: Optional[list[ProviderResponseFunctionCall]] = None
|
|
61
|
+
self._is_large_context: bool = False
|
|
61
62
|
|
|
62
63
|
def process_chunk(self, _chunk: Any) -> _ChunkResult:
|
|
63
64
|
return _ChunkResult(send_chunk_to_caller=True)
|
|
@@ -1305,11 +1306,12 @@ class _PayiInstrumentor:
|
|
|
1305
1306
|
extra_headers[PayiHeaderNames.resource_scope] = context_resource_scope
|
|
1306
1307
|
|
|
1307
1308
|
@staticmethod
|
|
1308
|
-
def update_for_vision(input: int, units: 'dict[str, Units]', estimated_prompt_tokens: Optional[int]) -> int:
|
|
1309
|
+
def update_for_vision(input: int, units: 'dict[str, Units]', estimated_prompt_tokens: Optional[int], is_large_context: bool = False) -> int:
|
|
1309
1310
|
if estimated_prompt_tokens:
|
|
1310
1311
|
vision = input - estimated_prompt_tokens
|
|
1311
1312
|
if (vision > 0):
|
|
1312
|
-
|
|
1313
|
+
key = "vision_large_context" if is_large_context else "vision"
|
|
1314
|
+
units[key] = Units(input=vision, output=0)
|
|
1313
1315
|
input = estimated_prompt_tokens
|
|
1314
1316
|
|
|
1315
1317
|
return input
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: payi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a111
|
|
4
4
|
Summary: The official Python library for the payi API
|
|
5
5
|
Project-URL: Homepage, https://github.com/Pay-i/pay-i-python
|
|
6
6
|
Project-URL: Repository, https://github.com/Pay-i/pay-i-python
|
|
@@ -29,6 +29,7 @@ Requires-Dist: nest-asyncio>=1.6.0
|
|
|
29
29
|
Requires-Dist: pydantic<3,>=1.9.0
|
|
30
30
|
Requires-Dist: sniffio
|
|
31
31
|
Requires-Dist: tiktoken>=0.8.0
|
|
32
|
+
Requires-Dist: tokenizers>=0.21.4
|
|
32
33
|
Requires-Dist: typing-extensions<5,>=4.10
|
|
33
34
|
Requires-Dist: wrapt>=1.17.2
|
|
34
35
|
Provides-Extra: aiohttp
|
|
@@ -11,7 +11,7 @@ payi/_resource.py,sha256=j2jIkTr8OIC8sU6-05nxSaCyj4MaFlbZrwlyg4_xJos,1088
|
|
|
11
11
|
payi/_response.py,sha256=rh9oJAvCKcPwQFm4iqH_iVrmK8bNx--YP_A2a4kN1OU,28776
|
|
12
12
|
payi/_streaming.py,sha256=Z_wIyo206T6Jqh2rolFg2VXZgX24PahLmpURp0-NssU,10092
|
|
13
13
|
payi/_types.py,sha256=7jE5MoQQFVoVxw5vVzvZ2Ao0kcjfNOGsBgyJfLBEnMo,6195
|
|
14
|
-
payi/_version.py,sha256=
|
|
14
|
+
payi/_version.py,sha256=Vuxkk3k3LUgAPQb3t-r4Li23ZlRQbO9v-XdOnsghPg4,166
|
|
15
15
|
payi/pagination.py,sha256=k2356QGPOUSjRF2vHpwLBdF6P-2vnQzFfRIJQAHGQ7A,1258
|
|
16
16
|
payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
payi/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
|
@@ -25,16 +25,17 @@ payi/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88,156
|
|
|
25
25
|
payi/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,4602
|
|
26
26
|
payi/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
|
|
27
27
|
payi/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
28
|
-
payi/lib/AnthropicInstrumentor.py,sha256=
|
|
29
|
-
payi/lib/BedrockInstrumentor.py,sha256=
|
|
28
|
+
payi/lib/AnthropicInstrumentor.py,sha256=_moPMUCps6kExYxrkD9xpIbeVIj13MtYkzGpwAA6laA,16453
|
|
29
|
+
payi/lib/BedrockInstrumentor.py,sha256=sfkFeSmsNRTo_4kExdpylzSeZEyA1lIFU3UJGse8AI8,19834
|
|
30
30
|
payi/lib/GoogleGenAiInstrumentor.py,sha256=LHiEZ7G5IhCcDlpVzQlXW9Ok96MHLeq7emEhFzPBTm0,8836
|
|
31
31
|
payi/lib/OpenAIInstrumentor.py,sha256=_ULwIli11XP1yZK_pMGXuaSmHZ5pozuEt_v5DfhNuGw,22914
|
|
32
32
|
payi/lib/Stopwatch.py,sha256=7OJlxvr2Jyb6Zr1LYCYKczRB7rDVKkIR7gc4YoleNdE,764
|
|
33
33
|
payi/lib/VertexInstrumentor.py,sha256=OWuMPiW4LdLhj6DSAAy5qZiosVo8DSAuFWGxYpEucoE,7431
|
|
34
|
-
payi/lib/VertexRequest.py,sha256=
|
|
34
|
+
payi/lib/VertexRequest.py,sha256=42F7xCRYY6h3EMUZD1x4-_cwyAcVhnzT9M5zl4KwtE0,11801
|
|
35
35
|
payi/lib/helpers.py,sha256=jcMyxsuWmyPymDCYmDbQAb6IgbkmkiiNUaxeEPkCKZs,4457
|
|
36
|
-
payi/lib/instrument.py,sha256=
|
|
36
|
+
payi/lib/instrument.py,sha256=LquKtVUpKnVONnkGchRbLgbvLrhBOIYAwNieH9ANi-E,75500
|
|
37
37
|
payi/lib/version_helper.py,sha256=v0lC3kuaXn6PBDolE3mkmwJiA8Ot3z4RkVR7wlBuZCs,540
|
|
38
|
+
payi/lib/data/cohere_embed_english_v3.json,sha256=YEWwjml3_i16cdsOx_7UKe6xpVFnxTEhP8T1n54R6gY,718306
|
|
38
39
|
payi/resources/__init__.py,sha256=B2bn1ZfCf6TbHlzZvy5TpFPtALnFcBRPYVKQH3S5qfQ,2457
|
|
39
40
|
payi/resources/ingest.py,sha256=7HeaAnIhPmAYdom8tAPPTa1WlbKL8pFCuQdZ2QSFuyE,23079
|
|
40
41
|
payi/resources/categories/__init__.py,sha256=WeotN_d-0Ri8ohsrNPbve7RyViD9_N0NA9DrV3WYg3w,1701
|
|
@@ -139,7 +140,7 @@ payi/types/use_cases/definitions/kpi_retrieve_response.py,sha256=uQXliSvS3k-yDYw
|
|
|
139
140
|
payi/types/use_cases/definitions/kpi_update_params.py,sha256=jbawdWAdMnsTWVH0qfQGb8W7_TXe3lq4zjSRu44d8p8,373
|
|
140
141
|
payi/types/use_cases/definitions/kpi_update_response.py,sha256=zLyEoT0S8d7XHsnXZYT8tM7yDw0Aze0Mk-_Z6QeMtc8,459
|
|
141
142
|
payi/types/use_cases/definitions/limit_config_create_params.py,sha256=pzQza_16N3z8cFNEKr6gPbFvuGFrwNuGxAYb--Kbo2M,449
|
|
142
|
-
payi-0.1.
|
|
143
|
-
payi-0.1.
|
|
144
|
-
payi-0.1.
|
|
145
|
-
payi-0.1.
|
|
143
|
+
payi-0.1.0a111.dist-info/METADATA,sha256=f-K-Z7XT8C4FdpVWX6sROSa1FvmGpQh6WWvJBpqLOEE,16324
|
|
144
|
+
payi-0.1.0a111.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
145
|
+
payi-0.1.0a111.dist-info/licenses/LICENSE,sha256=CQt03aM-P4a3Yg5qBg3JSLVoQS3smMyvx7tYg_6V7Gk,11334
|
|
146
|
+
payi-0.1.0a111.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|