From 05f863e8a238ccd4910c6e204ec3272083e3a6b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 17:53:01 +0000 Subject: [PATCH] feat(api): api update --- .stats.yml | 2 +- src/rizaio/resources/command.py | 8 ++++++++ src/rizaio/resources/tools.py | 14 ++++++++++++++ src/rizaio/types/command_exec_func_params.py | 6 ++++++ src/rizaio/types/command_exec_func_response.py | 1 + src/rizaio/types/tool.py | 1 + src/rizaio/types/tool_create_params.py | 1 + src/rizaio/types/tool_exec_params.py | 5 +++++ src/rizaio/types/tool_exec_response.py | 1 + src/rizaio/types/tool_update_params.py | 1 + 10 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0cbd972..b81d9c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-b027849e669ba3335a8dedda3bc5091b821fdf35036302b6f060e302ad7e7811.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-fee840a4b68f2e9d4676c380fc9b8134976c60dd0239bbd0cbb8d24c909a64a1.yml diff --git a/src/rizaio/resources/command.py b/src/rizaio/resources/command.py index 252338c..db21a21 100644 --- a/src/rizaio/resources/command.py +++ b/src/rizaio/resources/command.py @@ -161,6 +161,10 @@ def exec_func( http: Configuration for HTTP requests and authentication. + input: The input to the function. This must be a valid JSON-serializable object. If you + do not pass an input, your function will be called with None (Python) or null + (JavaScript/TypeScript) as the argument. + limits: Configuration for execution environment limits. runtime_revision_id: The ID of the runtime revision to use when executing code. @@ -328,6 +332,10 @@ async def exec_func( http: Configuration for HTTP requests and authentication. + input: The input to the function. This must be a valid JSON-serializable object. If you + do not pass an input, your function will be called with None (Python) or null + (JavaScript/TypeScript) as the argument. + limits: Configuration for execution environment limits. runtime_revision_id: The ID of the runtime revision to use when executing code. diff --git a/src/rizaio/resources/tools.py b/src/rizaio/resources/tools.py index 1c7239e..8a027ce 100644 --- a/src/rizaio/resources/tools.py +++ b/src/rizaio/resources/tools.py @@ -80,6 +80,8 @@ def create( description: A description of the tool. + input_schema: The input schema of the tool. This must be a valid JSON Schema object. + runtime_revision_id: The ID of the runtime revision to use when executing the tool. extra_headers: Send extra headers @@ -136,6 +138,8 @@ def update( description: A description of the tool. + input_schema: The input schema of the tool. This must be a valid JSON Schema object. + language: The language of the tool's code. name: The name of the tool. @@ -217,6 +221,9 @@ def exec( http: Configuration for HTTP requests and authentication. + input: The input to the tool. This must be a valid JSON-serializable object. It will be + validated against the tool's input schema. + revision_id: The Tool revision ID to execute. This optional parmeter is used to pin executions to specific versions of the Tool. If not provided, the latest (current) version of the Tool will be executed. @@ -333,6 +340,8 @@ async def create( description: A description of the tool. + input_schema: The input schema of the tool. This must be a valid JSON Schema object. + runtime_revision_id: The ID of the runtime revision to use when executing the tool. extra_headers: Send extra headers @@ -389,6 +398,8 @@ async def update( description: A description of the tool. + input_schema: The input schema of the tool. This must be a valid JSON Schema object. + language: The language of the tool's code. name: The name of the tool. @@ -470,6 +481,9 @@ async def exec( http: Configuration for HTTP requests and authentication. + input: The input to the tool. This must be a valid JSON-serializable object. It will be + validated against the tool's input schema. + revision_id: The Tool revision ID to execute. This optional parmeter is used to pin executions to specific versions of the Tool. If not provided, the latest (current) version of the Tool will be executed. diff --git a/src/rizaio/types/command_exec_func_params.py b/src/rizaio/types/command_exec_func_params.py index 3437f89..d403e0e 100644 --- a/src/rizaio/types/command_exec_func_params.py +++ b/src/rizaio/types/command_exec_func_params.py @@ -40,6 +40,12 @@ class CommandExecFuncParams(TypedDict, total=False): """Configuration for HTTP requests and authentication.""" input: object + """The input to the function. + + This must be a valid JSON-serializable object. If you do not pass an input, your + function will be called with None (Python) or null (JavaScript/TypeScript) as + the argument. + """ limits: Limits """Configuration for execution environment limits.""" diff --git a/src/rizaio/types/command_exec_func_response.py b/src/rizaio/types/command_exec_func_response.py index 3da61bd..f626cfb 100644 --- a/src/rizaio/types/command_exec_func_response.py +++ b/src/rizaio/types/command_exec_func_response.py @@ -25,6 +25,7 @@ class CommandExecFuncResponse(BaseModel): execution: Execution output: object + """The output of the function.""" output_status: Literal["error", "json_serialization_error", "valid"] """The status of the output. diff --git a/src/rizaio/types/tool.py b/src/rizaio/types/tool.py index f255659..703e7be 100644 --- a/src/rizaio/types/tool.py +++ b/src/rizaio/types/tool.py @@ -24,6 +24,7 @@ class Tool(BaseModel): """A description of the tool.""" input_schema: object + """The input schema of the tool. This must be a valid JSON Schema object.""" language: Literal["python", "javascript", "typescript"] """The language of the tool's code.""" diff --git a/src/rizaio/types/tool_create_params.py b/src/rizaio/types/tool_create_params.py index 6da09d5..0d20928 100644 --- a/src/rizaio/types/tool_create_params.py +++ b/src/rizaio/types/tool_create_params.py @@ -26,6 +26,7 @@ class ToolCreateParams(TypedDict, total=False): """A description of the tool.""" input_schema: object + """The input schema of the tool. This must be a valid JSON Schema object.""" runtime_revision_id: str """The ID of the runtime revision to use when executing the tool.""" diff --git a/src/rizaio/types/tool_exec_params.py b/src/rizaio/types/tool_exec_params.py index 2d6fcf2..c410a5b 100644 --- a/src/rizaio/types/tool_exec_params.py +++ b/src/rizaio/types/tool_exec_params.py @@ -25,6 +25,11 @@ class ToolExecParams(TypedDict, total=False): """Configuration for HTTP requests and authentication.""" input: object + """The input to the tool. + + This must be a valid JSON-serializable object. It will be validated against the + tool's input schema. + """ revision_id: str """The Tool revision ID to execute. diff --git a/src/rizaio/types/tool_exec_response.py b/src/rizaio/types/tool_exec_response.py index 4614497..b6f10a0 100644 --- a/src/rizaio/types/tool_exec_response.py +++ b/src/rizaio/types/tool_exec_response.py @@ -20,6 +20,7 @@ class ToolExecResponse(BaseModel): """The execution details of the Tool.""" output: object + """The returned value of the Tool's execute function.""" output_status: Literal["error", "json_serialization_error", "valid"] """The status of the output. diff --git a/src/rizaio/types/tool_update_params.py b/src/rizaio/types/tool_update_params.py index 70903ed..0a1f99e 100644 --- a/src/rizaio/types/tool_update_params.py +++ b/src/rizaio/types/tool_update_params.py @@ -20,6 +20,7 @@ class ToolUpdateParams(TypedDict, total=False): """A description of the tool.""" input_schema: object + """The input schema of the tool. This must be a valid JSON Schema object.""" language: Literal["python", "javascript", "typescript"] """The language of the tool's code."""