From e99afef36ca922845294ad300c9b64151c2de623 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 16 Jul 2024 16:59:30 +0000 Subject: [PATCH] chore(internal): version bump --- .stats.yml | 2 +- README.md | 2 +- pyproject.toml | 2 +- src/prompt_foundry_python_sdk/_base_client.py | 12 ++++++------ src/prompt_foundry_python_sdk/_compat.py | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 21eba64..25869cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 21 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-a552977d2b7ab16d16020c083420cadbca97d5766ea0df7b49b3ed275626b995.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-779e0476f300f24a63672c480d6b2c6ee2468925c122f449d9a74ffe05e5c7b3.yml diff --git a/README.md b/README.md index 1908da6..0317980 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/). ## Documentation -The REST API documentation can be found [on docs.promptfoundry.ai](https://docs.promptfoundry.ai). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found on [docs.promptfoundry.ai](https://docs.promptfoundry.ai). The full API of this library can be found in [api.md](api.md). ## Installation diff --git a/pyproject.toml b/pyproject.toml index 61ce559..d0cb51c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "prompt_foundry_python_sdk" -version = "0.1.0-alpha.8" +version = "0.1.0-alpha.9" description = "The official Python library for the prompt-foundry API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/prompt_foundry_python_sdk/_base_client.py b/src/prompt_foundry_python_sdk/_base_client.py index ea90ae8..8cac501 100644 --- a/src/prompt_foundry_python_sdk/_base_client.py +++ b/src/prompt_foundry_python_sdk/_base_client.py @@ -879,9 +879,9 @@ def __exit__( def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options def _prepare_request( self, @@ -961,7 +961,7 @@ def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - self._prepare_options(options) + options = self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1442,9 +1442,9 @@ async def __aexit__( async def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options async def _prepare_request( self, @@ -1529,7 +1529,7 @@ async def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - await self._prepare_options(options) + options = await self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) diff --git a/src/prompt_foundry_python_sdk/_compat.py b/src/prompt_foundry_python_sdk/_compat.py index 74c7639..c919b5a 100644 --- a/src/prompt_foundry_python_sdk/_compat.py +++ b/src/prompt_foundry_python_sdk/_compat.py @@ -118,10 +118,10 @@ def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: return model.__fields__ # type: ignore -def model_copy(model: _ModelT) -> _ModelT: +def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: if PYDANTIC_V2: - return model.model_copy() - return model.copy() # type: ignore + return model.model_copy(deep=deep) + return model.copy(deep=deep) # type: ignore def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: