chore(types): change optional parameter type from NotGiven to Omit

This commit is contained in:
stainless-app[bot] 2025-09-19 02:34:35 +00:00
parent 9751764207
commit 215857f1ee
20 changed files with 272 additions and 256 deletions

View file

@ -5,7 +5,7 @@ from __future__ import annotations
import httpx
from ..types import agent_list_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -44,13 +44,13 @@ class AgentResource(SyncAPIResource):
def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AgentListResponse:
"""
List all agents
@ -100,13 +100,13 @@ class AsyncAgentResource(AsyncAPIResource):
async def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AgentListResponse:
"""
List all agents

View file

@ -8,7 +8,7 @@ from typing_extensions import Literal
import httpx
from ..types import app_log_params, app_providers_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -51,14 +51,14 @@ class AppResource(SyncAPIResource):
level: Literal["debug", "info", "error", "warn"],
message: str,
service: str,
directory: str | NotGiven = NOT_GIVEN,
extra: Dict[str, object] | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
extra: Dict[str, object] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AppLogResponse:
"""
Write a log entry to the server logs
@ -104,13 +104,13 @@ class AppResource(SyncAPIResource):
def providers(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AppProvidersResponse:
"""
List all providers
@ -163,14 +163,14 @@ class AsyncAppResource(AsyncAPIResource):
level: Literal["debug", "info", "error", "warn"],
message: str,
service: str,
directory: str | NotGiven = NOT_GIVEN,
extra: Dict[str, object] | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
extra: Dict[str, object] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AppLogResponse:
"""
Write a log entry to the server logs
@ -216,13 +216,13 @@ class AsyncAppResource(AsyncAPIResource):
async def providers(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AppProvidersResponse:
"""
List all providers

View file

@ -5,7 +5,7 @@ from __future__ import annotations
import httpx
from ..types import command_list_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -44,13 +44,13 @@ class CommandResource(SyncAPIResource):
def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CommandListResponse:
"""
List all commands
@ -100,13 +100,13 @@ class AsyncCommandResource(AsyncAPIResource):
async def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CommandListResponse:
"""
List all commands

View file

@ -5,7 +5,7 @@ from __future__ import annotations
import httpx
from ..types import config_get_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -44,13 +44,13 @@ class ConfigResource(SyncAPIResource):
def get(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Config:
"""
Get config info
@ -100,13 +100,13 @@ class AsyncConfigResource(AsyncAPIResource):
async def get(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Config:
"""
Get config info

View file

@ -7,7 +7,7 @@ from typing import Any, cast
import httpx
from ..types import event_list_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -47,13 +47,13 @@ class EventResource(SyncAPIResource):
def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Stream[EventListResponse]:
"""
Get events
@ -106,13 +106,13 @@ class AsyncEventResource(AsyncAPIResource):
async def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncStream[EventListResponse]:
"""
Get events

View file

@ -5,7 +5,7 @@ from __future__ import annotations
import httpx
from ..types import file_list_params, file_read_params, file_status_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -47,13 +47,13 @@ class FileResource(SyncAPIResource):
self,
*,
path: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FileListResponse:
"""
List files and directories
@ -89,13 +89,13 @@ class FileResource(SyncAPIResource):
self,
*,
path: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FileReadResponse:
"""
Read a file
@ -130,13 +130,13 @@ class FileResource(SyncAPIResource):
def status(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FileStatusResponse:
"""
Get file status
@ -187,13 +187,13 @@ class AsyncFileResource(AsyncAPIResource):
self,
*,
path: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FileListResponse:
"""
List files and directories
@ -229,13 +229,13 @@ class AsyncFileResource(AsyncAPIResource):
self,
*,
path: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FileReadResponse:
"""
Read a file
@ -270,13 +270,13 @@ class AsyncFileResource(AsyncAPIResource):
async def status(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FileStatusResponse:
"""
Get file status

View file

@ -5,7 +5,7 @@ from __future__ import annotations
import httpx
from ..types import find_text_params, find_files_params, find_symbols_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -47,13 +47,13 @@ class FindResource(SyncAPIResource):
self,
*,
query: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FindFilesResponse:
"""
Find files
@ -89,13 +89,13 @@ class FindResource(SyncAPIResource):
self,
*,
query: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FindSymbolsResponse:
"""
Find workspace symbols
@ -131,13 +131,13 @@ class FindResource(SyncAPIResource):
self,
*,
pattern: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FindTextResponse:
"""
Find text in files
@ -194,13 +194,13 @@ class AsyncFindResource(AsyncAPIResource):
self,
*,
query: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FindFilesResponse:
"""
Find files
@ -236,13 +236,13 @@ class AsyncFindResource(AsyncAPIResource):
self,
*,
query: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FindSymbolsResponse:
"""
Find workspace symbols
@ -278,13 +278,13 @@ class AsyncFindResource(AsyncAPIResource):
self,
*,
pattern: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FindTextResponse:
"""
Find text in files

View file

@ -5,7 +5,7 @@ from __future__ import annotations
import httpx
from ..types import path_get_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -44,13 +44,13 @@ class PathResource(SyncAPIResource):
def get(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Path:
"""
Get the current path
@ -100,13 +100,13 @@ class AsyncPathResource(AsyncAPIResource):
async def get(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Path:
"""
Get the current path

View file

@ -5,7 +5,7 @@ from __future__ import annotations
import httpx
from ..types import project_list_params, project_current_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -45,13 +45,13 @@ class ProjectResource(SyncAPIResource):
def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ProjectListResponse:
"""
List all projects
@ -80,13 +80,13 @@ class ProjectResource(SyncAPIResource):
def current(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Project:
"""
Get the current project
@ -136,13 +136,13 @@ class AsyncProjectResource(AsyncAPIResource):
async def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ProjectListResponse:
"""
List all projects
@ -171,13 +171,13 @@ class AsyncProjectResource(AsyncAPIResource):
async def current(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Project:
"""
Get the current project

View file

@ -6,7 +6,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,13 +49,13 @@ class PermissionsResource(SyncAPIResource):
*,
id: str,
response: Literal["once", "always", "reject"],
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PermissionRespondResponse:
"""
Respond to a permission request
@ -113,13 +113,13 @@ class AsyncPermissionsResource(AsyncAPIResource):
*,
id: str,
response: Literal["once", "always", "reject"],
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PermissionRespondResponse:
"""
Respond to a permission request

View file

@ -26,7 +26,7 @@ from ...types import (
session_unrevert_params,
session_summarize_params,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -88,15 +88,15 @@ class SessionResource(SyncAPIResource):
def create(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
parent_id: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
parent_id: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Create a new session
@ -133,14 +133,14 @@ class SessionResource(SyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Update session properties
@ -172,13 +172,13 @@ class SessionResource(SyncAPIResource):
def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionListResponse:
"""
List all sessions
@ -208,13 +208,13 @@ class SessionResource(SyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionDeleteResponse:
"""
Delete a session and all its data
@ -246,13 +246,13 @@ class SessionResource(SyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionAbortResponse:
"""
Abort a session
@ -284,13 +284,13 @@ class SessionResource(SyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionChildrenResponse:
"""
Get a session's children
@ -324,16 +324,16 @@ class SessionResource(SyncAPIResource):
*,
arguments: str,
command: str,
directory: str | NotGiven = NOT_GIVEN,
agent: str | NotGiven = NOT_GIVEN,
message_id: str | NotGiven = NOT_GIVEN,
model: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
agent: str | Omit = omit,
message_id: str | Omit = omit,
model: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionCommandResponse:
"""
Send a new command to a session
@ -377,13 +377,13 @@ class SessionResource(SyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Get session
@ -418,13 +418,13 @@ class SessionResource(SyncAPIResource):
message_id: str,
model_id: str,
provider_id: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionInitResponse:
"""
Analyze the app and create an AGENTS.md file
@ -467,13 +467,13 @@ class SessionResource(SyncAPIResource):
message_id: str,
*,
id: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionMessageResponse:
"""
Get a message from a session
@ -511,13 +511,13 @@ class SessionResource(SyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionMessagesResponse:
"""
List messages for a session
@ -552,18 +552,18 @@ class SessionResource(SyncAPIResource):
id: str,
*,
parts: Iterable[session_prompt_params.Part],
directory: str | NotGiven = NOT_GIVEN,
agent: str | NotGiven = NOT_GIVEN,
message_id: str | NotGiven = NOT_GIVEN,
model: session_prompt_params.Model | NotGiven = NOT_GIVEN,
system: str | NotGiven = NOT_GIVEN,
tools: Dict[str, bool] | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
agent: str | Omit = omit,
message_id: str | Omit = omit,
model: session_prompt_params.Model | Omit = omit,
system: str | Omit = omit,
tools: Dict[str, bool] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionPromptResponse:
"""
Create and send a new message to a session
@ -609,14 +609,14 @@ class SessionResource(SyncAPIResource):
id: str,
*,
message_id: str,
directory: str | NotGiven = NOT_GIVEN,
part_id: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
part_id: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Revert a message
@ -655,13 +655,13 @@ class SessionResource(SyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Share a session
@ -695,13 +695,13 @@ class SessionResource(SyncAPIResource):
*,
agent: str,
command: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AssistantMessage:
"""
Run a shell command
@ -744,13 +744,13 @@ class SessionResource(SyncAPIResource):
*,
model_id: str,
provider_id: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionSummarizeResponse:
"""
Summarize the session
@ -791,13 +791,13 @@ class SessionResource(SyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Restore all reverted messages
@ -829,13 +829,13 @@ class SessionResource(SyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Unshare the session
@ -891,15 +891,15 @@ class AsyncSessionResource(AsyncAPIResource):
async def create(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
parent_id: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
parent_id: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Create a new session
@ -936,14 +936,14 @@ class AsyncSessionResource(AsyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Update session properties
@ -975,13 +975,13 @@ class AsyncSessionResource(AsyncAPIResource):
async def list(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionListResponse:
"""
List all sessions
@ -1011,13 +1011,13 @@ class AsyncSessionResource(AsyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionDeleteResponse:
"""
Delete a session and all its data
@ -1049,13 +1049,13 @@ class AsyncSessionResource(AsyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionAbortResponse:
"""
Abort a session
@ -1087,13 +1087,13 @@ class AsyncSessionResource(AsyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionChildrenResponse:
"""
Get a session's children
@ -1129,16 +1129,16 @@ class AsyncSessionResource(AsyncAPIResource):
*,
arguments: str,
command: str,
directory: str | NotGiven = NOT_GIVEN,
agent: str | NotGiven = NOT_GIVEN,
message_id: str | NotGiven = NOT_GIVEN,
model: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
agent: str | Omit = omit,
message_id: str | Omit = omit,
model: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionCommandResponse:
"""
Send a new command to a session
@ -1184,13 +1184,13 @@ class AsyncSessionResource(AsyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Get session
@ -1225,13 +1225,13 @@ class AsyncSessionResource(AsyncAPIResource):
message_id: str,
model_id: str,
provider_id: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionInitResponse:
"""
Analyze the app and create an AGENTS.md file
@ -1274,13 +1274,13 @@ class AsyncSessionResource(AsyncAPIResource):
message_id: str,
*,
id: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionMessageResponse:
"""
Get a message from a session
@ -1320,13 +1320,13 @@ class AsyncSessionResource(AsyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionMessagesResponse:
"""
List messages for a session
@ -1363,18 +1363,18 @@ class AsyncSessionResource(AsyncAPIResource):
id: str,
*,
parts: Iterable[session_prompt_params.Part],
directory: str | NotGiven = NOT_GIVEN,
agent: str | NotGiven = NOT_GIVEN,
message_id: str | NotGiven = NOT_GIVEN,
model: session_prompt_params.Model | NotGiven = NOT_GIVEN,
system: str | NotGiven = NOT_GIVEN,
tools: Dict[str, bool] | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
agent: str | Omit = omit,
message_id: str | Omit = omit,
model: session_prompt_params.Model | Omit = omit,
system: str | Omit = omit,
tools: Dict[str, bool] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionPromptResponse:
"""
Create and send a new message to a session
@ -1420,14 +1420,14 @@ class AsyncSessionResource(AsyncAPIResource):
id: str,
*,
message_id: str,
directory: str | NotGiven = NOT_GIVEN,
part_id: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
part_id: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Revert a message
@ -1466,13 +1466,13 @@ class AsyncSessionResource(AsyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Share a session
@ -1506,13 +1506,13 @@ class AsyncSessionResource(AsyncAPIResource):
*,
agent: str,
command: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AssistantMessage:
"""
Run a shell command
@ -1555,13 +1555,13 @@ class AsyncSessionResource(AsyncAPIResource):
*,
model_id: str,
provider_id: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionSummarizeResponse:
"""
Summarize the session
@ -1604,13 +1604,13 @@ class AsyncSessionResource(AsyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Restore all reverted messages
@ -1644,13 +1644,13 @@ class AsyncSessionResource(AsyncAPIResource):
self,
id: str,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Session:
"""
Unshare the session

View file

@ -17,7 +17,7 @@ from ..types import (
tui_submit_prompt_params,
tui_execute_command_params,
)
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -65,13 +65,13 @@ class TuiResource(SyncAPIResource):
self,
*,
text: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiAppendPromptResponse:
"""
Append prompt to the TUI
@ -101,13 +101,13 @@ class TuiResource(SyncAPIResource):
def clear_prompt(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiClearPromptResponse:
"""
Clear the prompt
@ -137,13 +137,13 @@ class TuiResource(SyncAPIResource):
self,
*,
command: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiExecuteCommandResponse:
"""Execute a TUI command (e.g.
@ -174,13 +174,13 @@ class TuiResource(SyncAPIResource):
def open_help(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiOpenHelpResponse:
"""
Open the help dialog
@ -209,13 +209,13 @@ class TuiResource(SyncAPIResource):
def open_models(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiOpenModelsResponse:
"""
Open the model dialog
@ -244,13 +244,13 @@ class TuiResource(SyncAPIResource):
def open_sessions(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiOpenSessionsResponse:
"""
Open the session dialog
@ -279,13 +279,13 @@ class TuiResource(SyncAPIResource):
def open_themes(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiOpenThemesResponse:
"""
Open the theme dialog
@ -316,14 +316,14 @@ class TuiResource(SyncAPIResource):
*,
message: str,
variant: Literal["info", "success", "warning", "error"],
directory: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiShowToastResponse:
"""
Show a toast notification in the TUI
@ -360,13 +360,13 @@ class TuiResource(SyncAPIResource):
def submit_prompt(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiSubmitPromptResponse:
"""
Submit the prompt
@ -417,13 +417,13 @@ class AsyncTuiResource(AsyncAPIResource):
self,
*,
text: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiAppendPromptResponse:
"""
Append prompt to the TUI
@ -455,13 +455,13 @@ class AsyncTuiResource(AsyncAPIResource):
async def clear_prompt(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiClearPromptResponse:
"""
Clear the prompt
@ -493,13 +493,13 @@ class AsyncTuiResource(AsyncAPIResource):
self,
*,
command: str,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiExecuteCommandResponse:
"""Execute a TUI command (e.g.
@ -532,13 +532,13 @@ class AsyncTuiResource(AsyncAPIResource):
async def open_help(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiOpenHelpResponse:
"""
Open the help dialog
@ -567,13 +567,13 @@ class AsyncTuiResource(AsyncAPIResource):
async def open_models(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiOpenModelsResponse:
"""
Open the model dialog
@ -602,13 +602,13 @@ class AsyncTuiResource(AsyncAPIResource):
async def open_sessions(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiOpenSessionsResponse:
"""
Open the session dialog
@ -639,13 +639,13 @@ class AsyncTuiResource(AsyncAPIResource):
async def open_themes(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiOpenThemesResponse:
"""
Open the theme dialog
@ -676,14 +676,14 @@ class AsyncTuiResource(AsyncAPIResource):
*,
message: str,
variant: Literal["info", "success", "warning", "error"],
directory: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiShowToastResponse:
"""
Show a toast notification in the TUI
@ -720,13 +720,13 @@ class AsyncTuiResource(AsyncAPIResource):
async def submit_prompt(
self,
*,
directory: str | NotGiven = NOT_GIVEN,
directory: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TuiSubmitPromptResponse:
"""
Submit the prompt