Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): api update #123

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions src/rizaio/resources/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions src/rizaio/resources/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions src/rizaio/types/command_exec_func_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 1 addition & 0 deletions src/rizaio/types/command_exec_func_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions src/rizaio/types/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 1 addition & 0 deletions src/rizaio/types/tool_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
5 changes: 5 additions & 0 deletions src/rizaio/types/tool_exec_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions src/rizaio/types/tool_exec_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions src/rizaio/types/tool_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down