diff --git a/.stats.yml b/.stats.yml index c68f156..cdad2d4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 14 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-7b19b1d717fd64001c4c4e27294c423357318869415232142073c716811df72c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-fbf471c508c87d8f33abb016566e4a23c1a188f8097af9bab707cd0f13c0663b.yml diff --git a/src/rizaio/resources/tools.py b/src/rizaio/resources/tools.py index 26960e8..63e6382 100644 --- a/src/rizaio/resources/tools.py +++ b/src/rizaio/resources/tools.py @@ -53,10 +53,10 @@ def create( self, *, code: str, + language: Literal["python", "javascript", "typescript"], name: str, description: str | NotGiven = NOT_GIVEN, input_schema: object | NotGiven = NOT_GIVEN, - language: Literal["python", "javascript", "typescript"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -81,10 +81,10 @@ def create( body=maybe_transform( { "code": code, + "language": language, "name": name, "description": description, "input_schema": input_schema, - "language": language, }, tool_create_params.ToolCreateParams, ), @@ -267,10 +267,10 @@ async def create( self, *, code: str, + language: Literal["python", "javascript", "typescript"], name: str, description: str | NotGiven = NOT_GIVEN, input_schema: object | NotGiven = NOT_GIVEN, - language: Literal["python", "javascript", "typescript"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -295,10 +295,10 @@ async def create( body=await async_maybe_transform( { "code": code, + "language": language, "name": name, "description": description, "input_schema": input_schema, - "language": language, }, tool_create_params.ToolCreateParams, ), diff --git a/src/rizaio/types/tool_create_params.py b/src/rizaio/types/tool_create_params.py index 09f3246..e086846 100644 --- a/src/rizaio/types/tool_create_params.py +++ b/src/rizaio/types/tool_create_params.py @@ -10,10 +10,10 @@ class ToolCreateParams(TypedDict, total=False): code: Required[str] + language: Required[Literal["python", "javascript", "typescript"]] + name: Required[str] description: str input_schema: object - - language: Literal["python", "javascript", "typescript"] diff --git a/tests/api_resources/test_tools.py b/tests/api_resources/test_tools.py index 69498ba..477d461 100644 --- a/tests/api_resources/test_tools.py +++ b/tests/api_resources/test_tools.py @@ -25,6 +25,7 @@ class TestTools: def test_method_create(self, client: Riza) -> None: tool = client.tools.create( code="code", + language="python", name="name", ) assert_matches_type(Tool, tool, path=["response"]) @@ -33,10 +34,10 @@ def test_method_create(self, client: Riza) -> None: def test_method_create_with_all_params(self, client: Riza) -> None: tool = client.tools.create( code="code", + language="python", name="name", description="description", input_schema={}, - language="python", ) assert_matches_type(Tool, tool, path=["response"]) @@ -44,6 +45,7 @@ def test_method_create_with_all_params(self, client: Riza) -> None: def test_raw_response_create(self, client: Riza) -> None: response = client.tools.with_raw_response.create( code="code", + language="python", name="name", ) @@ -56,6 +58,7 @@ def test_raw_response_create(self, client: Riza) -> None: def test_streaming_response_create(self, client: Riza) -> None: with client.tools.with_streaming_response.create( code="code", + language="python", name="name", ) as response: assert not response.is_closed @@ -264,6 +267,7 @@ class TestAsyncTools: async def test_method_create(self, async_client: AsyncRiza) -> None: tool = await async_client.tools.create( code="code", + language="python", name="name", ) assert_matches_type(Tool, tool, path=["response"]) @@ -272,10 +276,10 @@ async def test_method_create(self, async_client: AsyncRiza) -> None: async def test_method_create_with_all_params(self, async_client: AsyncRiza) -> None: tool = await async_client.tools.create( code="code", + language="python", name="name", description="description", input_schema={}, - language="python", ) assert_matches_type(Tool, tool, path=["response"]) @@ -283,6 +287,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRiza) -> N async def test_raw_response_create(self, async_client: AsyncRiza) -> None: response = await async_client.tools.with_raw_response.create( code="code", + language="python", name="name", ) @@ -295,6 +300,7 @@ async def test_raw_response_create(self, async_client: AsyncRiza) -> None: async def test_streaming_response_create(self, async_client: AsyncRiza) -> None: async with async_client.tools.with_streaming_response.create( code="code", + language="python", name="name", ) as response: assert not response.is_closed