payi 0.1.0a110__tar.gz → 0.1.0a111__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.
Potentially problematic release.
This version of payi might be problematic. Click here for more details.
- payi-0.1.0a111/.release-please-manifest.json +3 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/CHANGELOG.md +8 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/PKG-INFO +2 -1
- {payi-0.1.0a110 → payi-0.1.0a111}/pyproject.toml +2 -1
- {payi-0.1.0a110 → payi-0.1.0a111}/requirements-dev.lock +16 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/requirements.lock +18 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_version.py +1 -1
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/AnthropicInstrumentor.py +67 -20
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/BedrockInstrumentor.py +35 -1
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/VertexRequest.py +3 -1
- payi-0.1.0a111/src/payi/lib/data/cohere_embed_english_v3.json +30706 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/instrument.py +4 -2
- payi-0.1.0a110/.release-please-manifest.json +0 -3
- {payi-0.1.0a110 → payi-0.1.0a111}/.gitignore +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/LICENSE +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/README.md +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/SECURITY.md +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/api.md +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/bin/check-release-environment +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/bin/publish-pypi +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/examples/.keep +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/mypy.ini +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/noxfile.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/release-please-config.json +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_base_client.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_client.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_compat.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_constants.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_files.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_models.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_qs.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_resource.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_types.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/_resources_proxy.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/GoogleGenAiInstrumentor.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/OpenAIInstrumentor.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/Stopwatch.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/VertexInstrumentor.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/helpers.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/lib/version_helper.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/pagination.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/py.typed +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/categories/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/categories/categories.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/categories/fixed_cost_resources.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/categories/resources.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/ingest.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/limits/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/limits/limits.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/limits/tags.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/request_id/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/request_id/properties.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/request_id/request_id.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/request_id/result.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/requests.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/response_id/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/response_id/properties.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/response_id/response_id.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/requests/response_id/result.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/use_cases/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/version.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/use_cases/kpis.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/use_cases/properties.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/resources/use_cases/use_cases.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/bulk_ingest_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/categories/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/categories/resource_create_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/categories/resource_list_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/category_delete_resource_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/category_delete_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/category_list_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/category_list_resources_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/category_resource_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/category_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/cost_details.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/ingest_bulk_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/ingest_event_param.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/ingest_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/ingest_units_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limit_create_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limit_history_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limit_list_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limit_list_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limit_reset_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limit_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limit_update_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/limit_tags.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/tag_create_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/tag_create_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/tag_delete_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/tag_list_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/tag_remove_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/tag_remove_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/tag_update_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/limits/tag_update_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/request_result.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/requests/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/requests/request_id/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/requests/request_id/property_update_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/requests/response_id/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/requests/response_id/property_update_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/requests_data.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared/evaluation_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared/ingest_units.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared/properties_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared/xproxy_error.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared/xproxy_result.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared_params/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared_params/ingest_units.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/total_cost_data.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_case_instance_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definition_create_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definition_list_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definition_update_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/kpi_list_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/kpi_list_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/kpi_update_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/property_update_params.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/src/payi/types/use_cases/use_case_definition.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/categories/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/categories/test_fixed_cost_resources.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/categories/test_resources.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/limits/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/limits/test_tags.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/requests/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/requests/request_id/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/requests/request_id/test_properties.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/requests/request_id/test_result.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/requests/response_id/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/requests/response_id/test_properties.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/requests/response_id/test_result.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/test_categories.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/test_ingest.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/test_limits.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/test_use_cases.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/use_cases/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/use_cases/test_definitions.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/use_cases/test_kpis.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/api_resources/use_cases/test_properties.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/conftest.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/sample_file.txt +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_client.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_files.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_models.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_qs.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_required_args.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_response.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_streaming.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_transform.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a110 → payi-0.1.0a111}/tests/utils.py +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.111 (2025-08-18)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.110...v0.1.0-alpha.111](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.110...v0.1.0-alpha.111)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* anthropic large context, cohere english v3 embed, amazon titan v1 text embed ([#356](https://github.com/Pay-i/pay-i-python/issues/356)) ([9a3549e](https://github.com/Pay-i/pay-i-python/commit/9a3549e1abd284d1647d7c63fa3cdff01ac14a98))
|
|
10
|
+
|
|
3
11
|
## 0.1.0-alpha.110 (2025-08-09)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.1.0-alpha.109...v0.1.0-alpha.110](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.109...v0.1.0-alpha.110)
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "payi"
|
|
3
|
-
version = "0.1.0-alpha.
|
|
3
|
+
version = "0.1.0-alpha.111"
|
|
4
4
|
description = "The official Python library for the payi API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -17,6 +17,7 @@ dependencies = [
|
|
|
17
17
|
"wrapt>=1.17.2",
|
|
18
18
|
"tiktoken>=0.8.0",
|
|
19
19
|
"nest-asyncio>=1.6.0",
|
|
20
|
+
"tokenizers>=0.21.4"
|
|
20
21
|
]
|
|
21
22
|
requires-python = ">= 3.8"
|
|
22
23
|
classifiers = [
|
|
@@ -47,12 +47,17 @@ exceptiongroup==1.2.2
|
|
|
47
47
|
execnet==2.1.1
|
|
48
48
|
# via pytest-xdist
|
|
49
49
|
filelock==3.12.4
|
|
50
|
+
# via huggingface-hub
|
|
50
51
|
# via virtualenv
|
|
51
52
|
frozenlist==1.6.2
|
|
52
53
|
# via aiohttp
|
|
53
54
|
# via aiosignal
|
|
55
|
+
fsspec==2025.7.0
|
|
56
|
+
# via huggingface-hub
|
|
54
57
|
h11==0.16.0
|
|
55
58
|
# via httpcore
|
|
59
|
+
hf-xet==1.1.7
|
|
60
|
+
# via huggingface-hub
|
|
56
61
|
httpcore==1.0.9
|
|
57
62
|
# via httpx
|
|
58
63
|
httpx==0.28.1
|
|
@@ -61,6 +66,8 @@ httpx==0.28.1
|
|
|
61
66
|
# via respx
|
|
62
67
|
httpx-aiohttp==0.1.8
|
|
63
68
|
# via payi
|
|
69
|
+
huggingface-hub==0.34.4
|
|
70
|
+
# via tokenizers
|
|
64
71
|
idna==3.4
|
|
65
72
|
# via anyio
|
|
66
73
|
# via httpx
|
|
@@ -85,6 +92,7 @@ nodeenv==1.8.0
|
|
|
85
92
|
# via pyright
|
|
86
93
|
nox==2023.4.22
|
|
87
94
|
packaging==23.2
|
|
95
|
+
# via huggingface-hub
|
|
88
96
|
# via nox
|
|
89
97
|
# via pytest
|
|
90
98
|
platformdirs==3.11.0
|
|
@@ -110,9 +118,12 @@ python-dateutil==2.8.2
|
|
|
110
118
|
# via time-machine
|
|
111
119
|
pytz==2023.3.post1
|
|
112
120
|
# via dirty-equals
|
|
121
|
+
pyyaml==6.0.2
|
|
122
|
+
# via huggingface-hub
|
|
113
123
|
regex==2024.11.6
|
|
114
124
|
# via tiktoken
|
|
115
125
|
requests==2.32.3
|
|
126
|
+
# via huggingface-hub
|
|
116
127
|
# via tiktoken
|
|
117
128
|
respx==0.22.0
|
|
118
129
|
rich==13.7.1
|
|
@@ -127,11 +138,16 @@ sniffio==1.3.0
|
|
|
127
138
|
tiktoken==0.8.0
|
|
128
139
|
# via payi
|
|
129
140
|
time-machine==2.9.0
|
|
141
|
+
tokenizers==0.21.4
|
|
142
|
+
# via payi
|
|
130
143
|
tomli==2.0.2
|
|
131
144
|
# via mypy
|
|
132
145
|
# via pytest
|
|
146
|
+
tqdm==4.67.1
|
|
147
|
+
# via huggingface-hub
|
|
133
148
|
typing-extensions==4.12.2
|
|
134
149
|
# via anyio
|
|
150
|
+
# via huggingface-hub
|
|
135
151
|
# via multidict
|
|
136
152
|
# via mypy
|
|
137
153
|
# via payi
|
|
@@ -36,11 +36,17 @@ distro==1.8.0
|
|
|
36
36
|
# via payi
|
|
37
37
|
exceptiongroup==1.2.2
|
|
38
38
|
# via anyio
|
|
39
|
+
filelock==3.19.1
|
|
40
|
+
# via huggingface-hub
|
|
39
41
|
frozenlist==1.6.2
|
|
40
42
|
# via aiohttp
|
|
41
43
|
# via aiosignal
|
|
44
|
+
fsspec==2025.7.0
|
|
45
|
+
# via huggingface-hub
|
|
42
46
|
h11==0.16.0
|
|
43
47
|
# via httpcore
|
|
48
|
+
hf-xet==1.1.7
|
|
49
|
+
# via huggingface-hub
|
|
44
50
|
httpcore==1.0.9
|
|
45
51
|
# via httpx
|
|
46
52
|
httpx==0.28.1
|
|
@@ -48,6 +54,8 @@ httpx==0.28.1
|
|
|
48
54
|
# via payi
|
|
49
55
|
httpx-aiohttp==0.1.8
|
|
50
56
|
# via payi
|
|
57
|
+
huggingface-hub==0.34.4
|
|
58
|
+
# via tokenizers
|
|
51
59
|
idna==3.4
|
|
52
60
|
# via anyio
|
|
53
61
|
# via httpx
|
|
@@ -58,6 +66,8 @@ multidict==6.4.4
|
|
|
58
66
|
# via yarl
|
|
59
67
|
nest-asyncio==1.6.0
|
|
60
68
|
# via payi
|
|
69
|
+
packaging==25.0
|
|
70
|
+
# via huggingface-hub
|
|
61
71
|
propcache==0.3.1
|
|
62
72
|
# via aiohttp
|
|
63
73
|
# via yarl
|
|
@@ -65,17 +75,25 @@ pydantic==2.10.3
|
|
|
65
75
|
# via payi
|
|
66
76
|
pydantic-core==2.27.1
|
|
67
77
|
# via pydantic
|
|
78
|
+
pyyaml==6.0.2
|
|
79
|
+
# via huggingface-hub
|
|
68
80
|
regex==2024.11.6
|
|
69
81
|
# via tiktoken
|
|
70
82
|
requests==2.32.3
|
|
83
|
+
# via huggingface-hub
|
|
71
84
|
# via tiktoken
|
|
72
85
|
sniffio==1.3.0
|
|
73
86
|
# via anyio
|
|
74
87
|
# via payi
|
|
75
88
|
tiktoken==0.8.0
|
|
76
89
|
# via payi
|
|
90
|
+
tokenizers==0.21.4
|
|
91
|
+
# via payi
|
|
92
|
+
tqdm==4.67.1
|
|
93
|
+
# via huggingface-hub
|
|
77
94
|
typing-extensions==4.12.2
|
|
78
95
|
# via anyio
|
|
96
|
+
# via huggingface-hub
|
|
79
97
|
# via multidict
|
|
80
98
|
# via payi
|
|
81
99
|
# via pydantic
|
|
@@ -45,6 +45,18 @@ class AnthropicInstrumentor:
|
|
|
45
45
|
stream_messages_wrapper(instrumentor),
|
|
46
46
|
)
|
|
47
47
|
|
|
48
|
+
wrap_function_wrapper(
|
|
49
|
+
"anthropic.resources.beta.messages",
|
|
50
|
+
"Messages.create",
|
|
51
|
+
messages_wrapper(instrumentor),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
wrap_function_wrapper(
|
|
55
|
+
"anthropic.resources.beta.messages",
|
|
56
|
+
"Messages.stream",
|
|
57
|
+
stream_messages_wrapper(instrumentor),
|
|
58
|
+
)
|
|
59
|
+
|
|
48
60
|
wrap_function_wrapper(
|
|
49
61
|
"anthropic.resources.messages",
|
|
50
62
|
"AsyncMessages.create",
|
|
@@ -57,6 +69,18 @@ class AnthropicInstrumentor:
|
|
|
57
69
|
astream_messages_wrapper(instrumentor),
|
|
58
70
|
)
|
|
59
71
|
|
|
72
|
+
wrap_function_wrapper(
|
|
73
|
+
"anthropic.resources.beta.messages",
|
|
74
|
+
"AsyncMessages.create",
|
|
75
|
+
amessages_wrapper(instrumentor),
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
wrap_function_wrapper(
|
|
79
|
+
"anthropic.resources.beta.messages",
|
|
80
|
+
"AsyncMessages.stream",
|
|
81
|
+
astream_messages_wrapper(instrumentor),
|
|
82
|
+
)
|
|
83
|
+
|
|
60
84
|
except Exception as e:
|
|
61
85
|
instrumentor._logger.debug(f"Error instrumenting anthropic: {e}")
|
|
62
86
|
return
|
|
@@ -220,23 +244,52 @@ class _AnthropicProviderRequest(_ProviderRequest):
|
|
|
220
244
|
|
|
221
245
|
return True
|
|
222
246
|
|
|
223
|
-
def
|
|
224
|
-
usage = response['usage']
|
|
247
|
+
def anthropic_process_compute_input_cost(request: _ProviderRequest, usage: 'dict[str, Any]') -> int:
|
|
225
248
|
input = usage['input_tokens']
|
|
226
|
-
output = usage['output_tokens']
|
|
227
249
|
units: dict[str, Units] = request._ingest["units"]
|
|
228
250
|
|
|
229
251
|
cache_creation_input_tokens = usage.get("cache_creation_input_tokens", 0)
|
|
230
|
-
|
|
231
|
-
|
|
252
|
+
cache_read_input_tokens = usage.get("cache_read_input_tokens", 0)
|
|
253
|
+
|
|
254
|
+
total_input_tokens = input + cache_creation_input_tokens + cache_read_input_tokens
|
|
255
|
+
|
|
256
|
+
request._is_large_context = total_input_tokens > 200000
|
|
257
|
+
large_context = "_large_context" if request._is_large_context else ""
|
|
258
|
+
|
|
259
|
+
cache_creation: dict[str, int] = usage.get("cache_creation", {})
|
|
260
|
+
ephemeral_5m_input_tokens: Optional[int] = None
|
|
261
|
+
ephemeral_1h_input_tokens: Optional[int] = None
|
|
262
|
+
textCacheWriteAdded = False
|
|
263
|
+
|
|
264
|
+
if cache_creation:
|
|
265
|
+
ephemeral_5m_input_tokens = cache_creation.get("ephemeral_5m_input_tokens", 0)
|
|
266
|
+
if ephemeral_5m_input_tokens > 0:
|
|
267
|
+
textCacheWriteAdded = True
|
|
268
|
+
units["text_cache_write"+large_context] = Units(input=ephemeral_5m_input_tokens, output=0)
|
|
269
|
+
|
|
270
|
+
ephemeral_1h_input_tokens = cache_creation.get("ephemeral_1h_input_tokens", 0)
|
|
271
|
+
if ephemeral_1h_input_tokens > 0:
|
|
272
|
+
textCacheWriteAdded = True
|
|
273
|
+
units["text_cache_write_1h"+large_context] = Units(input=ephemeral_1h_input_tokens, output=0)
|
|
274
|
+
|
|
275
|
+
if textCacheWriteAdded is False and cache_creation_input_tokens > 0:
|
|
276
|
+
units["text_cache_write"+large_context] = Units(input=cache_creation_input_tokens, output=0)
|
|
232
277
|
|
|
233
278
|
cache_read_input_tokens = usage.get("cache_read_input_tokens", 0)
|
|
234
279
|
if cache_read_input_tokens > 0:
|
|
235
|
-
units["text_cache_read"] = Units(input=cache_read_input_tokens, output=0)
|
|
280
|
+
units["text_cache_read"+large_context] = Units(input=cache_read_input_tokens, output=0)
|
|
236
281
|
|
|
237
|
-
|
|
282
|
+
return _PayiInstrumentor.update_for_vision(input, units, request._estimated_prompt_tokens, is_large_context=request._is_large_context)
|
|
238
283
|
|
|
239
|
-
|
|
284
|
+
def anthropic_process_synchronous_response(request: _ProviderRequest, response: 'dict[str, Any]', log_prompt_and_response: bool, assign_id: bool) -> Any:
|
|
285
|
+
usage = response['usage']
|
|
286
|
+
units: dict[str, Units] = request._ingest["units"]
|
|
287
|
+
|
|
288
|
+
input_tokens = anthropic_process_compute_input_cost(request, usage)
|
|
289
|
+
output = usage['output_tokens']
|
|
290
|
+
|
|
291
|
+
large_context = "_large_context" if request._is_large_context else ""
|
|
292
|
+
units["text"+large_context] = Units(input=input_tokens, output=output)
|
|
240
293
|
|
|
241
294
|
content = response.get('content', [])
|
|
242
295
|
if content:
|
|
@@ -277,31 +330,25 @@ def anthropic_process_chunk(request: _ProviderRequest, chunk: 'dict[str, Any]',
|
|
|
277
330
|
usage = message['usage']
|
|
278
331
|
units = request._ingest["units"]
|
|
279
332
|
|
|
280
|
-
input =
|
|
281
|
-
|
|
282
|
-
units["text"] = Units(input=input, output=0)
|
|
283
|
-
|
|
284
|
-
text_cache_write: int = usage.get("cache_creation_input_tokens", 0)
|
|
285
|
-
if text_cache_write > 0:
|
|
286
|
-
units["text_cache_write"] = Units(input=text_cache_write, output=0)
|
|
333
|
+
input = anthropic_process_compute_input_cost(request, usage)
|
|
287
334
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
units["text_cache_read"] = Units(input=text_cache_read, output=0)
|
|
335
|
+
large_context = "_large_context" if request._is_large_context else ""
|
|
336
|
+
units["text"+large_context] = Units(input=input, output=0)
|
|
291
337
|
|
|
292
338
|
request._instrumentor._logger.debug(f"Anthropic streaming captured {input} input tokens, ")
|
|
293
339
|
|
|
294
340
|
elif type == "message_delta":
|
|
295
341
|
usage = chunk.get('usage', {})
|
|
296
342
|
ingest = True
|
|
343
|
+
large_context = "_large_context" if request._is_large_context else ""
|
|
297
344
|
|
|
298
345
|
# Web search will return an updated input tokens value at the end of streaming
|
|
299
346
|
input_tokens = usage.get('input_tokens', None)
|
|
300
347
|
if input_tokens is not None:
|
|
301
348
|
request._instrumentor._logger.debug(f"Anthropic streaming finished, updated input tokens: {input_tokens}")
|
|
302
|
-
request._ingest["units"]["text"]["input"] = input_tokens
|
|
349
|
+
request._ingest["units"]["text"+large_context]["input"] = input_tokens
|
|
303
350
|
|
|
304
|
-
request._ingest["units"]["text"]["output"] = usage.get('output_tokens', 0)
|
|
351
|
+
request._ingest["units"]["text"+large_context]["output"] = usage.get('output_tokens', 0)
|
|
305
352
|
|
|
306
353
|
request._instrumentor._logger.debug(f"Anthropic streaming finished: output tokens {usage.get('output_tokens', 0)} ")
|
|
307
354
|
|
|
@@ -5,6 +5,7 @@ from functools import wraps
|
|
|
5
5
|
from typing_extensions import override
|
|
6
6
|
|
|
7
7
|
from wrapt import ObjectProxy, wrap_function_wrapper # type: ignore
|
|
8
|
+
from tokenizers import Tokenizer # type: ignore
|
|
8
9
|
|
|
9
10
|
from payi.lib.helpers import PayiCategories, PayiHeaderNames, payi_aws_bedrock_url
|
|
10
11
|
from payi.types.ingest_units_params import Units
|
|
@@ -102,6 +103,8 @@ def _redirect_to_payi(request: Any, event_name: str, **_: 'dict[str, Any]') -> N
|
|
|
102
103
|
|
|
103
104
|
|
|
104
105
|
class InvokeResponseWrapper(ObjectProxy): # type: ignore
|
|
106
|
+
_cohere_embed_english_v3_tokenizer: Optional[Tokenizer] = None
|
|
107
|
+
|
|
105
108
|
def __init__(
|
|
106
109
|
self,
|
|
107
110
|
response: Any,
|
|
@@ -160,6 +163,25 @@ class InvokeResponseWrapper(ObjectProxy): # type: ignore
|
|
|
160
163
|
|
|
161
164
|
bedrock_converse_process_synchronous_function_call(self._request, response)
|
|
162
165
|
|
|
166
|
+
elif self._request._is_amazon_titan_embed_text_v1:
|
|
167
|
+
input = response.get('inputTextTokenCount', 0)
|
|
168
|
+
units["text"] = Units(input=input, output=0)
|
|
169
|
+
|
|
170
|
+
elif self._request._is_cohere_embed_english_v3:
|
|
171
|
+
texts: list[str] = response.get("texts", [])
|
|
172
|
+
if texts and len(texts) > 0:
|
|
173
|
+
text = " ".join(texts)
|
|
174
|
+
|
|
175
|
+
if self._cohere_embed_english_v3_tokenizer is None:
|
|
176
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
177
|
+
tokenizer_path = os.path.join(current_dir, "data", "cohere_embed_english_v3.json")
|
|
178
|
+
self._cohere_embed_english_v3_tokenizer = Tokenizer.from_file(tokenizer_path) # type: ignore
|
|
179
|
+
|
|
180
|
+
tokens: list = self._cohere_embed_english_v3_tokenizer.encode(text, add_special_tokens=False).tokens # type: ignore
|
|
181
|
+
|
|
182
|
+
if tokens and isinstance(tokens, list):
|
|
183
|
+
units["text"] = Units(input=len(tokens), output=0) # type: ignore
|
|
184
|
+
|
|
163
185
|
if self._log_prompt_and_response:
|
|
164
186
|
ingest["provider_response_json"] = data.decode('utf-8') # type: ignore
|
|
165
187
|
|
|
@@ -287,6 +309,8 @@ class _BedrockInvokeProviderRequest(_BedrockProviderRequest):
|
|
|
287
309
|
self._is_anthropic: bool = 'anthropic' in model_id
|
|
288
310
|
self._is_nova: bool = 'nova' in model_id
|
|
289
311
|
self._is_meta: bool = 'meta' in model_id
|
|
312
|
+
self._is_amazon_titan_embed_text_v1: bool = 'amazon.titan-embed-text-v1' == model_id
|
|
313
|
+
self._is_cohere_embed_english_v3: bool = 'cohere.embed-english-v3' == model_id
|
|
290
314
|
|
|
291
315
|
@override
|
|
292
316
|
def process_request(self, instance: Any, extra_headers: 'dict[str, str]', args: Sequence[Any], kwargs: Any) -> bool:
|
|
@@ -302,7 +326,17 @@ class _BedrockInvokeProviderRequest(_BedrockProviderRequest):
|
|
|
302
326
|
anthropic_has_image_and_get_texts(self, messages)
|
|
303
327
|
except Exception as e:
|
|
304
328
|
self._instrumentor._logger.debug(f"Bedrock invoke error processing request body: {e}")
|
|
305
|
-
|
|
329
|
+
elif self._is_cohere_embed_english_v3:
|
|
330
|
+
try:
|
|
331
|
+
body = json.loads( kwargs.get("body", ""))
|
|
332
|
+
input_type = body.get("input_type", "")
|
|
333
|
+
if input_type == 'image':
|
|
334
|
+
images = body.get("images", [])
|
|
335
|
+
if (len(images) > 0):
|
|
336
|
+
# only supports one image according to docs
|
|
337
|
+
self._ingest["units"]["vision"] = Units(input=1, output=0)
|
|
338
|
+
except Exception as e:
|
|
339
|
+
self._instrumentor._logger.debug(f"Bedrock invoke error processing request body: {e}")
|
|
306
340
|
return True
|
|
307
341
|
|
|
308
342
|
@override
|
|
@@ -148,7 +148,7 @@ class _VertexRequest(_ProviderRequest): # type: ignore
|
|
|
148
148
|
return model.startswith("gemini-1.")
|
|
149
149
|
|
|
150
150
|
def is_large_context_token_model(model: str, input_tokens: int) -> bool:
|
|
151
|
-
return model.startswith("gemini-2.5-pro") and input_tokens >
|
|
151
|
+
return model.startswith("gemini-2.5-pro") and input_tokens > 200000
|
|
152
152
|
|
|
153
153
|
def add_units(request: _ProviderRequest, key: str, input: Optional[int] = None, output: Optional[int] = None) -> None:
|
|
154
154
|
if key not in request._ingest["units"]:
|
|
@@ -172,6 +172,7 @@ class _VertexRequest(_ProviderRequest): # type: ignore
|
|
|
172
172
|
|
|
173
173
|
if is_character_billing_model(model):
|
|
174
174
|
if input > 128000:
|
|
175
|
+
self._is_large_context = True
|
|
175
176
|
large_context = "_large_context"
|
|
176
177
|
|
|
177
178
|
# gemini 1.0 and 1.5 units are reported in characters, per second, per image, etc...
|
|
@@ -222,6 +223,7 @@ class _VertexRequest(_ProviderRequest): # type: ignore
|
|
|
222
223
|
thinking_token_count = usage.get("thoughts_token_count", 0)
|
|
223
224
|
|
|
224
225
|
if is_large_context_token_model(model, input):
|
|
226
|
+
self._is_large_context = True
|
|
225
227
|
large_context = "_large_context"
|
|
226
228
|
|
|
227
229
|
cache_details: dict[str, int] = {}
|