mirror of
https://github.com/anomalyco/opencode-sdk-python.git
synced 2026-04-28 12:39:54 +00:00
feat(api): api update
This commit is contained in:
parent
a617d3359f
commit
5e3dae765d
6 changed files with 56 additions and 36 deletions
|
|
@ -51,9 +51,11 @@ from .session_chat_params import SessionChatParams as SessionChatParams
|
|||
from .session_init_params import SessionInitParams as SessionInitParams
|
||||
from .file_status_response import FileStatusResponse as FileStatusResponse
|
||||
from .tool_state_completed import ToolStateCompleted as ToolStateCompleted
|
||||
from .file_part_input_param import FilePartInputParam as FilePartInputParam
|
||||
from .find_symbols_response import FindSymbolsResponse as FindSymbolsResponse
|
||||
from .session_init_response import SessionInitResponse as SessionInitResponse
|
||||
from .session_list_response import SessionListResponse as SessionListResponse
|
||||
from .text_part_input_param import TextPartInputParam as TextPartInputParam
|
||||
from .app_providers_response import AppProvidersResponse as AppProvidersResponse
|
||||
from .session_abort_response import SessionAbortResponse as SessionAbortResponse
|
||||
from .session_delete_response import SessionDeleteResponse as SessionDeleteResponse
|
||||
|
|
|
|||
19
src/opencode_ai/types/file_part_input_param.py
Normal file
19
src/opencode_ai/types/file_part_input_param.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing_extensions import Literal, Required, TypedDict
|
||||
|
||||
__all__ = ["FilePartInputParam"]
|
||||
|
||||
|
||||
class FilePartInputParam(TypedDict, total=False):
|
||||
mime: Required[str]
|
||||
|
||||
type: Required[Literal["file"]]
|
||||
|
||||
url: Required[str]
|
||||
|
||||
id: str
|
||||
|
||||
filename: str
|
||||
|
|
@ -3,11 +3,13 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Union, Iterable
|
||||
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
||||
from typing_extensions import Required, Annotated, TypeAlias, TypedDict
|
||||
|
||||
from .._utils import PropertyInfo
|
||||
from .file_part_input_param import FilePartInputParam
|
||||
from .text_part_input_param import TextPartInputParam
|
||||
|
||||
__all__ = ["SessionChatParams", "Part", "PartUnionMember0", "PartUnionMember0Time", "PartUnionMember1"]
|
||||
__all__ = ["SessionChatParams", "Part"]
|
||||
|
||||
|
||||
class SessionChatParams(TypedDict, total=False):
|
||||
|
|
@ -24,34 +26,4 @@ class SessionChatParams(TypedDict, total=False):
|
|||
mode: str
|
||||
|
||||
|
||||
class PartUnionMember0Time(TypedDict, total=False):
|
||||
start: Required[float]
|
||||
|
||||
end: float
|
||||
|
||||
|
||||
class PartUnionMember0(TypedDict, total=False):
|
||||
text: Required[str]
|
||||
|
||||
type: Required[Literal["text"]]
|
||||
|
||||
id: str
|
||||
|
||||
synthetic: bool
|
||||
|
||||
time: PartUnionMember0Time
|
||||
|
||||
|
||||
class PartUnionMember1(TypedDict, total=False):
|
||||
mime: Required[str]
|
||||
|
||||
type: Required[Literal["file"]]
|
||||
|
||||
url: Required[str]
|
||||
|
||||
id: str
|
||||
|
||||
filename: str
|
||||
|
||||
|
||||
Part: TypeAlias = Union[PartUnionMember0, PartUnionMember1]
|
||||
Part: TypeAlias = Union[TextPartInputParam, FilePartInputParam]
|
||||
|
|
|
|||
25
src/opencode_ai/types/text_part_input_param.py
Normal file
25
src/opencode_ai/types/text_part_input_param.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing_extensions import Literal, Required, TypedDict
|
||||
|
||||
__all__ = ["TextPartInputParam", "Time"]
|
||||
|
||||
|
||||
class Time(TypedDict, total=False):
|
||||
start: Required[float]
|
||||
|
||||
end: float
|
||||
|
||||
|
||||
class TextPartInputParam(TypedDict, total=False):
|
||||
text: Required[str]
|
||||
|
||||
type: Required[Literal["text"]]
|
||||
|
||||
id: str
|
||||
|
||||
synthetic: bool
|
||||
|
||||
time: Time
|
||||
Loading…
Add table
Add a link
Reference in a new issue