mirror of
https://github.com/anomalyco/opencode-sdk-python.git
synced 2026-05-06 08:22:07 +00:00
feat(api): api update
This commit is contained in:
parent
a617d3359f
commit
5e3dae765d
6 changed files with 56 additions and 36 deletions
|
|
@ -1,4 +1,4 @@
|
|||
configured_endpoints: 22
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-68cbf6e18d22079b425afcaed2bd8f3e6d728aeded96ea31261e81acf2664895.yml
|
||||
openapi_spec_hash: 1e2f53491687817ec77f4929b469ce29
|
||||
config_hash: b7f3d9742335715c458494988498b183
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-186e713234760e9f755b35c78809f89378e4f778a451cd5e30649f41489e0bfd.yml
|
||||
openapi_spec_hash: 5fb2ce9d8055253d597567a8a3293e73
|
||||
config_hash: a8441af7cb2db855d79fd372ee3b9fb1
|
||||
|
|
|
|||
2
api.md
2
api.md
|
|
@ -102,6 +102,7 @@ Types:
|
|||
from opencode_ai.types import (
|
||||
AssistantMessage,
|
||||
FilePart,
|
||||
FilePartInput,
|
||||
Message,
|
||||
Part,
|
||||
Session,
|
||||
|
|
@ -109,6 +110,7 @@ from opencode_ai.types import (
|
|||
StepFinishPart,
|
||||
StepStartPart,
|
||||
TextPart,
|
||||
TextPartInput,
|
||||
ToolPart,
|
||||
ToolStateCompleted,
|
||||
ToolStateError,
|
||||
|
|
|
|||
|
|
@ -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